Plugin Directory

Changeset 2711799


Ignore:
Timestamp:
04/20/2022 01:13:31 AM (4 years ago)
Author:
macbookandrew
Message:

Update to version 1.8.2 from GitHub

Location:
wp-youtube-live
Files:
2 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wp-youtube-live/tags/1.8.2/wp-youtube-live.php

    r2711798 r2711799  
    44 * Plugin URI: https://github.com/macbookandrew/wp-youtube-live
    55 * Description: Displays the current YouTube live video from a specified channel
    6  * Version: 1.8.1
     6 * Version: 1.8.2
    77 * Author: Andrew Minion
    88 * Author URI: https://andrewrminion.com/
     
    1313}
    1414
    15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.1' );
     15define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.2' );
    1616
    1717/**
     
    166166        } elseif ( 'playlist' === $request_options['fallback_behavior'] ) {
    167167            add_filter( 'oembed_result', 'wp_ytl_add_player_attributes_result', 10, 3 );
    168             echo wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     168            echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ) );
    169169        } elseif ( 'video' === $request_options['fallback_behavior'] && isset( $youtube_options['fallback_video'] ) ) {
    170170            add_filter( 'oembed_result', 'wp_ytl_add_player_attributes_result', 10, 3 );
    171             echo wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     171            echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ) );
    172172        } elseif ( 'message' === $request_options['fallback_behavior'] && 'no_message' !== $request_options['fallback_message'] ) {
    173173            echo wp_kses_post( apply_filters( 'wp_youtube_live_no_stream_available', $request_options['fallback_message'] ) );
     
    207207    // return the content.
    208208    if ( wp_youtube_live_is_ajax() ) {
    209         if ( isset( $_POST['requestType'] ) && sanitize_key( wp_unslash( $_POST['requestType'] ) ) !== 'refresh' || $is_live ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
     209        if ( isset( $_POST['requestType'] ) && sanitize_key( wp_unslash( $_POST['requestType'] ) ) !== 'refresh' || $is_live ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- because we have to allow unauthenticated users the ability to check for live videos, as well as handle statically-cached markup that might contain a stale nonce.
    210210            $json_data['content'] = ob_get_clean();
    211211        } else {
  • wp-youtube-live/trunk/wp-youtube-live.php

    r2711798 r2711799  
    44 * Plugin URI: https://github.com/macbookandrew/wp-youtube-live
    55 * Description: Displays the current YouTube live video from a specified channel
    6  * Version: 1.8.1
     6 * Version: 1.8.2
    77 * Author: Andrew Minion
    88 * Author URI: https://andrewrminion.com/
     
    1313}
    1414
    15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.1' );
     15define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.2' );
    1616
    1717/**
     
    166166        } elseif ( 'playlist' === $request_options['fallback_behavior'] ) {
    167167            add_filter( 'oembed_result', 'wp_ytl_add_player_attributes_result', 10, 3 );
    168             echo wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     168            echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ) );
    169169        } elseif ( 'video' === $request_options['fallback_behavior'] && isset( $youtube_options['fallback_video'] ) ) {
    170170            add_filter( 'oembed_result', 'wp_ytl_add_player_attributes_result', 10, 3 );
    171             echo wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
     171            echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ) );
    172172        } elseif ( 'message' === $request_options['fallback_behavior'] && 'no_message' !== $request_options['fallback_message'] ) {
    173173            echo wp_kses_post( apply_filters( 'wp_youtube_live_no_stream_available', $request_options['fallback_message'] ) );
     
    207207    // return the content.
    208208    if ( wp_youtube_live_is_ajax() ) {
    209         if ( isset( $_POST['requestType'] ) && sanitize_key( wp_unslash( $_POST['requestType'] ) ) !== 'refresh' || $is_live ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
     209        if ( isset( $_POST['requestType'] ) && sanitize_key( wp_unslash( $_POST['requestType'] ) ) !== 'refresh' || $is_live ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing -- because we have to allow unauthenticated users the ability to check for live videos, as well as handle statically-cached markup that might contain a stale nonce.
    210210            $json_data['content'] = ob_get_clean();
    211211        } else {
Note: See TracChangeset for help on using the changeset viewer.