Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions assets/src/js/learndash/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Turning the switch off clears that marker from the field so a real video URL
* can go in.
*
* @since n.e.x.t
* @since 2.11.0
*/

/**
Expand All @@ -17,7 +17,7 @@
* replacement, so the value is never reinterpreted as HTML. `&` is decoded
* last so an already-escaped ampersand (`<`) is not decoded twice.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {string} value Field value.
* @return {string} Decoded value.
Expand All @@ -34,7 +34,7 @@ const decode = ( value ) =>
/**
* Whether a Video URL value is the GoDAM marker, with or without a picked video.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {string} value Decoded Video URL value.
* @param {string} tag Marker shortcode tag.
Expand All @@ -46,7 +46,7 @@ export const isMarker = ( value, tag ) =>
/**
* Wire up the switch in each LearnDash settings metabox on the page.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Document} doc Document.
* @param {Object} config `rtgodamLearnDashAdmin`.
Expand Down Expand Up @@ -95,7 +95,7 @@ export function setupUseGoDAMSwitch( doc, config ) {
/**
* Show a video in a picker: its title, a preview player and the buttons.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {HTMLElement} picker The `.rtgodam-ld-video-picker` element.
* @param {Object|null} attachment Media attachment, or null for none.
Expand Down Expand Up @@ -147,7 +147,7 @@ export function renderPicked( picker, attachment, i18n ) {
/**
* Wire up the video picker in each LearnDash settings metabox on the page.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Document} doc Document.
* @param {Object} config `rtgodamLearnDashAdmin`.
Expand Down
16 changes: 8 additions & 8 deletions assets/src/js/learndash/frontend.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Both GoDAM Video blocks (a `<video>` the GoDAM player wraps) and GoDAM embeds
* (an iframe driven through the GoDAM Player SDK) are supported.
*
* @since n.e.x.t
* @since 2.11.0
*/

/**
Expand All @@ -21,7 +21,7 @@
* LearnDash passes its flags through wp_localize_script(), which turns `true`
* and `1` into "1" and `false` and `0` into "" and "0".
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {*} value Flag value.
* @return {boolean} Whether the flag is on.
Expand All @@ -36,7 +36,7 @@ export const isOn = ( value ) => value === true || value === 1 || value === '1';
* are empty for admins and on completed steps. GoDAM passes the step's
* settings as `rtgodam_player` so the player follows them every time.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Object} data `learndash_video_data`.
* @return {{autoStart: boolean, showControls: boolean, focusPause: boolean, trackTime: boolean}} Settings.
Expand Down Expand Up @@ -66,7 +66,7 @@ export function getPlayerSettings( data ) {
*
* Browsers reject play() when autoplay is blocked, which is not an error here.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Function} call Call to run.
*/
Expand All @@ -88,7 +88,7 @@ const quietly = ( call ) => {
* not the GoDAM player has wrapped it yet, and goes through the video.js
* player for commands when there is one.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {HTMLVideoElement} video The block's video element.
* @param {Window} win Window.
Expand Down Expand Up @@ -154,7 +154,7 @@ export function createBlockAdapter( video, win ) {
* listening for is lost. If the ready message came before the SDK was
* listening, they go out after `readyTimeout` anyway.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {HTMLIFrameElement} iframe The embed iframe.
* @param {Window} win Window.
Expand Down Expand Up @@ -244,7 +244,7 @@ export function createEmbedAdapter( iframe, win, apiOrigin, readyTimeout = 5000
*
* Follows LearnDash's handling of its `local` provider (assets/js/learndash_video_script.js).
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Object} args
* @param {Object} args.adapter Player controls, from createBlockAdapter() or createEmbedAdapter().
Expand Down Expand Up @@ -376,7 +376,7 @@ export function connectPlayer( { adapter, ldPlayer, data, ld, win, now = Date.no
* only where LearnDash enforces progression (`data-video-progression="true"`):
* not for admins who bypass it, and not on a step the learner completed.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param {Window} win Window.
* @return {Object[]} The LearnDash player entries it connected.
Expand Down
2 changes: 1 addition & 1 deletion inc/classes/class-media-library-ajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@
* the CDN's sizes can stop at 768px, and without the full file a large or high-DPI
* screen could only get the 768px copy.
*
* @since n.e.x.t
* @since 2.11.0
*
* @param array $rtgodam_image_sizes CDN size map keyed by size name.
* @param array $size_array The displayed size as [width, height].
Expand All @@ -1640,7 +1640,7 @@
}

/** This filter is documented in wp-includes/media.php */
$max_width = apply_filters( 'max_srcset_image_width', 2048, $size_array );

Check warning on line 1643 in inc/classes/class-media-library-ajax.php

View workflow job for this annotation

GitHub Actions / Run Plugin Check

WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound

Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "max_srcset_image_width".

$candidates = array_values( $rtgodam_image_sizes );

Expand Down
Loading
Loading