WordPress.org

Plugin Directory

Changeset 1666747


Ignore:
Timestamp:
05/29/17 22:26:27 (4 weeks ago)
Author:
urkekg
Message:

Fix multy-byte chatected cut-off in description and undefined nolightbox

Location:
youtube-channel
Files:
44 added
4 edited

Legend:

Unmodified
Added
Removed
  • youtube-channel/trunk/inc/settings-usage-shortcode.php

    r1565501 r1666747  
    6060    <li><code>autoplay</code> <em>(bool)</em> Enable autoplay of first video in YTC video stack by setting this option to <code>1</code> or <code>true</code></li> 
    6161    <li><code>mute</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to mute videos set to autoplay on load</li> 
    62     <li><code>norel</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hire related videos after finished playbak</li> 
    63     <li><code>nobrand</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hire YouTube logo from playback control bar</li> 
     62    <li><code>norel</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide related videos after finished playbak</li> 
     63    <li><code>nobrand</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to hide YouTube logo from playback control bar</li> 
     64    <li><code>nolightbox</code> <em>(bool)</em> Set this option to <code>1</code> or <code>true</code> to disable lightbox and open thumbnail link in new tab/windows instead in lightbox</li> 
    6465</ul> 
    6566</div> 
  • youtube-channel/trunk/readme.txt

    r1644170 r1666747  
    44Tags: youtube, channel, playlist, single, widget, widgets, youtube player, feed, video, thumbnail, embed, sidebar, iframe, html5, responsive 
    55Requires at least: 4.0 
    6 Tested up to: 4.7.4 
    7 Stable tag: 3.0.11 
     6Tested up to: 4.7.5 
     7Stable tag: 3.0.11.1 
    88License: GPLv3 
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html 
     
    338338= How I can add pagination (for example to Dynamic Wall view)? = 
    339339 
    340 Unfortunately, YouTube Channel does not support pagination, so you’ll get only defined number of YouTube items in block in single view, no matter did you choose thumbnail or HTML5 Embed as mode.  
     340Unfortunately, YouTube Channel does not support pagination, so you’ll get only defined number of YouTube items in block in single view, no matter did you choose thumbnail or HTML5 Embed as mode. 
    341341 
    342342= How to reduce size of/remove thumbnail Play button? = 
     
    360360 
    361361== Changelog == 
     362= 3.0.11.1 (20170530) = 
     363* Fix: cut description in the middle of multy-byte characters (reported by @funfrog) 
     364* (20170509) Fix: undefined variable `nolightbox` 
     365* Fix: add `nolightbox` shortcode parameter and fix typos on Help section 
     366 
    362367= 3.0.11 (20170424) = 
    363368* Fix: added all 3 parameters to `widget_title` filter (reported by @squarestar) 
    364 * (20170301) Add: New shortcode options `nolightbox` and `target`, to make available opening thumbnail anchors in new tab/window 
     369* (20170301) Add: New shortcode options `nolightbox` and `target`, to make available opening thumbnail anchors in new tab/window (requested by @bakercreative) 
    365370 
    366371= 3.0.10.5 (20170225) = 
  • youtube-channel/trunk/update.php

    r1603068 r1666747  
    457457} // END function au_youtube_channel_update_routine_16() 
    458458 
     459/** 
     460 * Add default value for new global option nolightbox 
     461 */ 
     462function au_youtube_channel_update_routine_19() { 
     463 
     464    // get options from DB 
     465    $defaults = get_option( 'youtube_channel_defaults' ); 
     466 
     467    if ( ! isset( $defaults['nolightbox'] ) ) { 
     468        $defaults['nolightbox'] = '0'; 
     469    } 
     470 
     471    if ( isset( $defaults ) ) { 
     472        update_option( 'youtube_channel_defaults', $defaults ); 
     473        unset( $defaults ); 
     474    } 
     475 
     476} // END function au_youtube_channel_update_routine_19() 
  • youtube-channel/trunk/youtube-channel.php

    r1644170 r1666747  
    44Plugin URI: https://urosevic.net/wordpress/plugins/youtube-channel/ 
    55Description: Quick and easy embed latest or random videos from YouTube channel (user uploads, liked or favourited videos) or playlist. Use <a href="widgets.php">widget</a> for sidebar or shortcode for content. Works with <em>YouTube Data API v3</em>. 
    6 Version: 3.0.11 
     6Version: 3.0.11.1 
    77Author: Aleksandar Urošević 
    88Author URI: https://urosevic.net/ 
     
    1818    class WPAU_YOUTUBE_CHANNEL { 
    1919 
    20         const DB_VER = 18; 
    21         const VER = '3.0.11'; 
     20        const DB_VER = 19; 
     21        const VER = '3.0.11.1'; 
    2222 
    2323        public $plugin_name   = 'YouTube Channel'; 
     
    135135                'link_to'        => 'none', // 0 legacy username, 1 channel, 2 vanity 
    136136                'tinymce'        => 1, // show TinyMCE button by default 
     137                'nolightbox'     => 0, // do not use lightbox global setting 
    137138            ); 
    138139 
     
    525526                    'class'          => ! empty( $instance['class'] ) ? $instance['class'] : '', 
    526527 
    527                     'nolightbox'     => $instance['nolightbox'], 
     528                    'nolightbox'     => ! empty( $instance['nolightbox'] ) ? $instance['nolightbox'] : '0', 
    528529                    'target'         => '', 
    529530                    ), 
     
    12531254                ##TODO: If description should note be shortened, print HTML formatted desc 
    12541255                if ( $instance['desclen'] > 0 ) { 
    1255                     if ( strlen( $video_description ) > $instance['desclen'] ) { 
    1256                         $video_description = substr( $video_description, 0, $instance['desclen'] ); 
    1257                         $etcetera = '&hellip;'; 
     1256                    if ( function_exists( 'mb_strlen' ) && function_exists( 'mb_substr' ) ) { 
     1257                        if ( mb_strlen( $video_description ) > $instance['desclen'] ) { 
     1258                            $video_description = mb_substr( $video_description, 0, $instance['desclen'] ); 
     1259                            $etcetera = '&hellip;'; 
     1260                        } 
     1261                    } else { 
     1262                        if ( strlen( $video_description ) > $instance['desclen'] ) { 
     1263                            $video_description = substr( $video_description, 0, $instance['desclen'] ); 
     1264                            $etcetera = '&hellip;'; 
     1265                        } 
    12581266                    } 
    12591267                } 
Note: See TracChangeset for help on using the changeset viewer.