Changeset 2711799
- Timestamp:
- 04/20/2022 01:13:31 AM (4 years ago)
- Location:
- wp-youtube-live
- Files:
-
- 2 edited
- 1 copied
-
tags/1.8.2 (copied) (copied from wp-youtube-live/trunk)
-
tags/1.8.2/wp-youtube-live.php (modified) (4 diffs)
-
trunk/wp-youtube-live.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-youtube-live/tags/1.8.2/wp-youtube-live.php
r2711798 r2711799 4 4 * Plugin URI: https://github.com/macbookandrew/wp-youtube-live 5 5 * Description: Displays the current YouTube live video from a specified channel 6 * Version: 1.8. 16 * Version: 1.8.2 7 7 * Author: Andrew Minion 8 8 * Author URI: https://andrewrminion.com/ … … 13 13 } 14 14 15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8. 1' );15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.2' ); 16 16 17 17 /** … … 166 166 } elseif ( 'playlist' === $request_options['fallback_behavior'] ) { 167 167 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.OutputNotEscaped168 echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ) ); 169 169 } elseif ( 'video' === $request_options['fallback_behavior'] && isset( $youtube_options['fallback_video'] ) ) { 170 170 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.OutputNotEscaped171 echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ) ); 172 172 } elseif ( 'message' === $request_options['fallback_behavior'] && 'no_message' !== $request_options['fallback_message'] ) { 173 173 echo wp_kses_post( apply_filters( 'wp_youtube_live_no_stream_available', $request_options['fallback_message'] ) ); … … 207 207 // return the content. 208 208 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. 210 210 $json_data['content'] = ob_get_clean(); 211 211 } else { -
wp-youtube-live/trunk/wp-youtube-live.php
r2711798 r2711799 4 4 * Plugin URI: https://github.com/macbookandrew/wp-youtube-live 5 5 * Description: Displays the current YouTube live video from a specified channel 6 * Version: 1.8. 16 * Version: 1.8.2 7 7 * Author: Andrew Minion 8 8 * Author URI: https://andrewrminion.com/ … … 13 13 } 14 14 15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8. 1' );15 define( 'WP_YOUTUBE_LIVE_VERSION', '1.8.2' ); 16 16 17 17 /** … … 166 166 } elseif ( 'playlist' === $request_options['fallback_behavior'] ) { 167 167 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.OutputNotEscaped168 echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_playlist'] ), $player_args ) ); 169 169 } elseif ( 'video' === $request_options['fallback_behavior'] && isset( $youtube_options['fallback_video'] ) ) { 170 170 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.OutputNotEscaped171 echo wp_kses_post( wp_oembed_get( esc_attr( $youtube_options['fallback_video'] ), $player_args ) ); 172 172 } elseif ( 'message' === $request_options['fallback_behavior'] && 'no_message' !== $request_options['fallback_message'] ) { 173 173 echo wp_kses_post( apply_filters( 'wp_youtube_live_no_stream_available', $request_options['fallback_message'] ) ); … … 207 207 // return the content. 208 208 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. 210 210 $json_data['content'] = ob_get_clean(); 211 211 } else {
Note: See TracChangeset
for help on using the changeset viewer.