Plugin Directory

Changeset 3117803


Ignore:
Timestamp:
07/14/2024 04:39:17 PM (21 months ago)
Author:
streamweasels
Message:

updating hideShorts option

Location:
streamweasels-youtube-integration/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • streamweasels-youtube-integration/trunk/README.txt

    r3115055 r3117803  
    44Requires at least: 5.0
    55Tested up to: 6.5
    6 Stable tag: 1.2.9
     6Stable tag: 1.3.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    8585== Changelog ==
    8686
    87 = 1.2.9 =
     87= 1.3.0 =
    8888* fixed an issue with undefined variables
    8989* updating freemius
  • streamweasels-youtube-integration/trunk/public/class-streamweasels-youtube-public.php

    r3115055 r3117803  
    204204        $layout = sanitize_text_field( $args['layout'] ?? $options['swyi_layout'] ?? 'wall' );
    205205        $titleOverride = sanitize_text_field( $args['channel-title'] ?? '' );
     206        $hideShorts = sanitize_text_field( $args['hide-shorts'] ?? $optionsWall['swyi_wall_hide_shorts'] ?? 0 );
     207        $shortIds = '';
    206208        $embed = 'page';
    207209        $autoplay = 0;
     
    273275        } else {
    274276            $inlineScriptHandle = $this->plugin_name;
     277        }
     278        if ( $hideShorts && $layout == 'wall' && $youtubeChannelID !== '' && $youtubeAPIKey !== '' && $youtubePlaylistID == '' && $youtubeLiveStreamID == '' ) {
     279            $youTubeAPI = new SWYI_YouTube_API();
     280            $shortIds = $youTubeAPI->check_shorts( $youtubeAPIKey, $youtubeChannelID );
    275281        }
    276282        wp_add_inline_script( $inlineScriptHandle, 'const streamWeaselsYouTubeVars' . $uuid . ' = ' . json_encode( array(
     
    299305            'hoverColour'          => '',
    300306            'enableCache'          => '',
    301             'hideShorts'           => '',
    302             'shortsIds'            => '',
     307            'hideShorts'           => (int) $hideShorts,
     308            'shortsIds'            => esc_attr( $shortIds ),
    303309            'translationsLive'     => wp_kses_post( $translationsLive ),
    304310            'translationsViews'    => wp_kses_post( $translationsViews ),
  • streamweasels-youtube-integration/trunk/streamweasels-youtube.php

    r3115055 r3117803  
    1616 * Plugin Name:       SW YouTube Integration - Blocks and Shortcodes for Embedding YouTube
    1717 * Description:       Embed YouTube content like Shorts, Video and Live Streams with our collection of YouTube Blocks and Shortcodes.
    18  * Version:           1.2.9
     18 * Version:           1.3.0
    1919 * Author:            StreamWeasels
    2020 * Author URI:        https://www.streamweasels.com/
     
    3333 * Rename this for your plugin and update it as you release new versions.
    3434 */
    35 define( 'STREAMWEASELS_YOUTUBE_VERSION', '1.2.9' );
     35define( 'STREAMWEASELS_YOUTUBE_VERSION', '1.3.0' );
    3636if ( !defined( 'SWYI_PLUGIN_DIR' ) ) {
    3737    define( 'SWYI_PLUGIN_DIR', plugin_dir_url( __FILE__ ) );
Note: See TracChangeset for help on using the changeset viewer.