Plugin Directory

Changeset 2779637


Ignore:
Timestamp:
09/03/2022 06:08:40 PM (4 years ago)
Author:
macbookandrew
Message:

Update to version 1.8.4 from GitHub

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

Legend:

Unmodified
Added
Removed
  • wp-youtube-live/tags/1.8.4/inc/admin.php

    r2711798 r2779637  
    1111 */
    1212function youtube_live_backend_assets() {
    13     wp_register_script( 'wp-youtube-live-backend', plugin_dir_url( __FILE__ ) . '../js/wp-youtube-live-backend.min.js', array( 'jquery' ), WP_YOUTUBE_LIVE_VERSION, true );
     13    wp_enqueue_script( 'wp-youtube-live-backend', plugin_dir_url( __FILE__ ) . '../js/wp-youtube-live-backend.min.js', array( 'jquery' ), WP_YOUTUBE_LIVE_VERSION, true );
    1414}
    1515add_action( 'admin_enqueue_scripts', 'youtube_live_backend_assets' );
     
    127127 */
    128128function youtube_live_api_key_render() {
    129     wp_enqueue_script( 'wp-youtube-live-backend' );
    130 
    131129    $options = get_option( 'youtube_live_settings' ); ?>
    132130    <input type="text" name="youtube_live_settings[youtube_live_api_key]" placeholder="AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI" size="45" value="<?php echo esc_attr( $options['youtube_live_api_key'] ); ?>">
     
    468466 */
    469467function wp_youtube_live_dismiss_notice_1714() {
    470     update_option( 'wp-youtube-live-1714-notice-dismissed', 1, false );
    471 }
    472 
     468    update_option( 'wp-youtube-live-1714-notice-dismissed', true, false );
     469}
     470
  • wp-youtube-live/tags/1.8.4/readme.txt

    r2712290 r2779637  
    55Requires at least: 3.6
    66Tested up to:      5.9.3
    7 Stable tag:        1.8.3
     7Stable tag:        1.8.4
    88License:           GPLv2 or later
    99License URI:       http://www.gnu.org/licenses/gpl-2.0.html
     
    179179== Changelog ==
    180180
     181= 1.8.4 =
     182- Fix “undefined index” issue in debug logs
     183- Fix persistent update notice
     184
    181185= 1.8.3 =
    182186- Escape admin-visible debug output
  • wp-youtube-live/tags/1.8.4/wp-youtube-live.php

    r2712290 r2779637  
    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.3
     6 * Version: 1.8.4
    77 * Author: Andrew Minion
    88 * Author URI: https://andrewrminion.com/
     
    5151            'height'            => $settings['default_height'],
    5252            'autoplay'          => $settings['autoplay'],
    53             'showRelated'       => $settings['show_related'],
     53            'show_related'      => $settings['show_related'],
    5454            'js_only'           => false,
    5555            'ajaxUrl'           => admin_url( 'admin-ajax.php' ),
     
    121121    $youtube_live->show_related       = wp_youtube_live_is_ajax() && array_key_exists( 'show_related', $_POST )
    122122        ? sanitize_key( wp_unslash( $_POST['show_related'] ) )
    123         : sanitize_key( $request_options['showRelated'] );
     123        : sanitize_key( $request_options['show_related'] );
    124124    $youtube_live->completed_video_id = wp_youtube_live_is_ajax() && array_key_exists( 'completedVideoID', $_POST )
    125125        ? sanitize_key( wp_unslash( $_POST['completedVideoID'] ) )
     
    139139
    140140    if ( $youtube_live->isLive ) {
    141         if ( 'true' !== $request_options['js_only'] || ( 'true' === $request_options['js_only'] && wp_youtube_live_is_ajax() ) ) {
     141        if ( ( array_key_exists( 'js_only', $request_options ) && 'true' !== $request_options['js_only'] ) || ( array_key_exists( 'js_only', $request_options ) && 'true' === $request_options['js_only'] && wp_youtube_live_is_ajax() ) ) {
    142142            $is_live = true;
    143143            // TODO: load a placeholder or nothing on initial page load?
     
    197197        $debugging_code = var_export( $youtube_live, true ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export -- because this is only available for admins if they enable the debug option.
    198198        echo '<!-- YouTube Live debugging: ' . PHP_EOL . wp_kses_post( $debugging_code ) . PHP_EOL . ' -->';
    199         $json_data['error'] . $debugging_code;
     199        $json_data['error'] = $debugging_code;
    200200    }
    201201
  • wp-youtube-live/trunk/inc/admin.php

    r2711798 r2779637  
    1111 */
    1212function youtube_live_backend_assets() {
    13     wp_register_script( 'wp-youtube-live-backend', plugin_dir_url( __FILE__ ) . '../js/wp-youtube-live-backend.min.js', array( 'jquery' ), WP_YOUTUBE_LIVE_VERSION, true );
     13    wp_enqueue_script( 'wp-youtube-live-backend', plugin_dir_url( __FILE__ ) . '../js/wp-youtube-live-backend.min.js', array( 'jquery' ), WP_YOUTUBE_LIVE_VERSION, true );
    1414}
    1515add_action( 'admin_enqueue_scripts', 'youtube_live_backend_assets' );
     
    127127 */
    128128function youtube_live_api_key_render() {
    129     wp_enqueue_script( 'wp-youtube-live-backend' );
    130 
    131129    $options = get_option( 'youtube_live_settings' ); ?>
    132130    <input type="text" name="youtube_live_settings[youtube_live_api_key]" placeholder="AIzaSyD4iE2xVSpkLLOXoyqT-RuPwURN3ddScAI" size="45" value="<?php echo esc_attr( $options['youtube_live_api_key'] ); ?>">
     
    468466 */
    469467function wp_youtube_live_dismiss_notice_1714() {
    470     update_option( 'wp-youtube-live-1714-notice-dismissed', 1, false );
    471 }
    472 
     468    update_option( 'wp-youtube-live-1714-notice-dismissed', true, false );
     469}
     470
  • wp-youtube-live/trunk/readme.txt

    r2712290 r2779637  
    55Requires at least: 3.6
    66Tested up to:      5.9.3
    7 Stable tag:        1.8.3
     7Stable tag:        1.8.4
    88License:           GPLv2 or later
    99License URI:       http://www.gnu.org/licenses/gpl-2.0.html
     
    179179== Changelog ==
    180180
     181= 1.8.4 =
     182- Fix “undefined index” issue in debug logs
     183- Fix persistent update notice
     184
    181185= 1.8.3 =
    182186- Escape admin-visible debug output
  • wp-youtube-live/trunk/wp-youtube-live.php

    r2712290 r2779637  
    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.3
     6 * Version: 1.8.4
    77 * Author: Andrew Minion
    88 * Author URI: https://andrewrminion.com/
     
    5151            'height'            => $settings['default_height'],
    5252            'autoplay'          => $settings['autoplay'],
    53             'showRelated'       => $settings['show_related'],
     53            'show_related'      => $settings['show_related'],
    5454            'js_only'           => false,
    5555            'ajaxUrl'           => admin_url( 'admin-ajax.php' ),
     
    121121    $youtube_live->show_related       = wp_youtube_live_is_ajax() && array_key_exists( 'show_related', $_POST )
    122122        ? sanitize_key( wp_unslash( $_POST['show_related'] ) )
    123         : sanitize_key( $request_options['showRelated'] );
     123        : sanitize_key( $request_options['show_related'] );
    124124    $youtube_live->completed_video_id = wp_youtube_live_is_ajax() && array_key_exists( 'completedVideoID', $_POST )
    125125        ? sanitize_key( wp_unslash( $_POST['completedVideoID'] ) )
     
    139139
    140140    if ( $youtube_live->isLive ) {
    141         if ( 'true' !== $request_options['js_only'] || ( 'true' === $request_options['js_only'] && wp_youtube_live_is_ajax() ) ) {
     141        if ( ( array_key_exists( 'js_only', $request_options ) && 'true' !== $request_options['js_only'] ) || ( array_key_exists( 'js_only', $request_options ) && 'true' === $request_options['js_only'] && wp_youtube_live_is_ajax() ) ) {
    142142            $is_live = true;
    143143            // TODO: load a placeholder or nothing on initial page load?
     
    197197        $debugging_code = var_export( $youtube_live, true ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_var_export -- because this is only available for admins if they enable the debug option.
    198198        echo '<!-- YouTube Live debugging: ' . PHP_EOL . wp_kses_post( $debugging_code ) . PHP_EOL . ' -->';
    199         $json_data['error'] . $debugging_code;
     199        $json_data['error'] = $debugging_code;
    200200    }
    201201
Note: See TracChangeset for help on using the changeset viewer.