Plugin Directory

Changeset 1666497


Ignore:
Timestamp:
05/29/2017 01:41:14 PM (9 years ago)
Author:
0xbbc
Message:

Improve compatibility on old versions of PHP.

Location:
dplayer-for-wp
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • dplayer-for-wp/tags/1.1.6/dplayer.php

    r1534780 r1666497  
    33* Plugin Name: DPlayer for WordPress
    44* Description: Wow, such a lovely HTML5 danmaku video player comes to WordPress
    5 * Version: 1.1.4
     5* Version: 1.1.6
    66* Author: 0xBBC
    77* Author URI: https://blog.0xbbc.com/
     
    9292    }
    9393   
    94     public static function dplayer_load($atts = [], $content = null, $tag = '') {
     94    public static function dplayer_load($atts, $content, $tag) {
     95        if ($atts == null) $atts = [];
     96        if ($tag == null) $tag = '';
     97       
    9598        // normalize attribute keys, lowercase
    9699        $atts = array_change_key_case((array)$atts, CASE_LOWER);
     
    154157        if (!self::$add_script) {
    155158            if ( get_option( 'kblog_enable_flv' ) ) {
    156                 wp_enqueue_script( '0-dplayer-flv', plugins_url('js/plugin/flv.min.js', __FILE__), false, '1.1.2', false );
     159                wp_enqueue_script( '0-dplayer-flv', plugins_url('js/plugin/flv.min.js', __FILE__), false, '1.1.3', false );
    157160            }
    158161            if ( get_option( 'kblog_enable_hls' ) ) {
    159                 wp_enqueue_script( '0-dplayer-hls', plugins_url('js/plugin/hls.min.js', __FILE__), false, '1.1.2', false );
     162                wp_enqueue_script( '0-dplayer-hls', plugins_url('js/plugin/hls.min.js', __FILE__), false, '1.1.3', false );
    160163            }
    161             wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.1.2', false );
     164            wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.1.3', false );
    162165            wp_enqueue_script( 'init-dplayer', plugins_url('js/init-dplayer.js', __FILE__), false, '1.0.0', false );
    163166            self::$add_script = true;
  • dplayer-for-wp/tags/1.1.6/readme.txt

    r1534781 r1666497  
    33Tags: video, player, shortcode
    44Requires at least: 3.0.1
    5 Tested up to: 4.6.1
    6 Stable tag: 1.1.4
     5Tested up to: 4.7.3
     6Stable tag: 1.1.6
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1414
    1515Usage is rather simple, and here is the template of shortcode we supported.
    16 [dplayer url="http://xxx.xxx.com/xxx.mp4" pic="http://xxx.xxx.com/xxx.png" autoplay="true" danmu="true"/]
     16[dplayer url="https://anotherhome.net/DIYgod-cannot-even-discribe.mp4" pic="https://anotherhome.com/DIYgod-cannot-even-discribe.png" autoplay="true" danmu="true"/]
    1717
    1818Parameter 'url' is the source URL to the video file, you can upload the video to your WordPress library, then use it here.
     
    4040== Changelog ==
    4141
     42= 1.1.6 =
     43Improve compatibility on old versions of PHP.
     44
     45= 1.1.5 =
     46Update DPlayer to release 1.1.3. Please visit https://github.com/DIYgod/DPlayer/releases for details.
     47
    4248= 1.1.4 =
    43 * Extended support for bilibili param
    44 
    45 now you can use either to load additional danmaku.
    46 
     49* Extended support for bilibili param, now you can use either
    4750- bilibili='23333'
    4851- bilibili='http://www.bilibili.com/video/av2333333/index_233.html#page=2333'
     52to load additional danmaku.
    4953
    5054This plugin will give you exactly the danma that you need, which means,
    5155
    52 If you give the original URL to the bilibili video, this plugin will identify the URL format, load the right danmaku.
    53 
    54 In this example, 'http://www.bilibili.com/video/av2333333/index_233.html#page=2333' is given. And the plugin knows that aid is 2333333 and your requested page is 2333.
    55 
    56 (According to bilibili, 'index_233.html#page=2333' means that you starts at page 233 but currently you're watching page 2333)
     56If you give the original URL to the bilibili video, this plugin will identify the URL format, load the right danmaku. In this example, 'http://www.bilibili.com/video/av2333333/index_23333#page=233' is given. And the plugin knows that aid is 2333333 and your requested page is 2333. (According to bilibili, 'index_233.html#page=2333' means that you starts at page 233 but currently you're watching page 2333)
    5757
    5858= 1.1.3 =
  • dplayer-for-wp/trunk/dplayer.php

    r1534780 r1666497  
    33* Plugin Name: DPlayer for WordPress
    44* Description: Wow, such a lovely HTML5 danmaku video player comes to WordPress
    5 * Version: 1.1.4
     5* Version: 1.1.6
    66* Author: 0xBBC
    77* Author URI: https://blog.0xbbc.com/
     
    9292    }
    9393   
    94     public static function dplayer_load($atts = [], $content = null, $tag = '') {
     94    public static function dplayer_load($atts, $content, $tag) {
     95        if ($atts == null) $atts = [];
     96        if ($tag == null) $tag = '';
     97       
    9598        // normalize attribute keys, lowercase
    9699        $atts = array_change_key_case((array)$atts, CASE_LOWER);
     
    154157        if (!self::$add_script) {
    155158            if ( get_option( 'kblog_enable_flv' ) ) {
    156                 wp_enqueue_script( '0-dplayer-flv', plugins_url('js/plugin/flv.min.js', __FILE__), false, '1.1.2', false );
     159                wp_enqueue_script( '0-dplayer-flv', plugins_url('js/plugin/flv.min.js', __FILE__), false, '1.1.3', false );
    157160            }
    158161            if ( get_option( 'kblog_enable_hls' ) ) {
    159                 wp_enqueue_script( '0-dplayer-hls', plugins_url('js/plugin/hls.min.js', __FILE__), false, '1.1.2', false );
     162                wp_enqueue_script( '0-dplayer-hls', plugins_url('js/plugin/hls.min.js', __FILE__), false, '1.1.3', false );
    160163            }
    161             wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.1.2', false );
     164            wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.1.3', false );
    162165            wp_enqueue_script( 'init-dplayer', plugins_url('js/init-dplayer.js', __FILE__), false, '1.0.0', false );
    163166            self::$add_script = true;
  • dplayer-for-wp/trunk/readme.txt

    r1534781 r1666497  
    33Tags: video, player, shortcode
    44Requires at least: 3.0.1
    5 Tested up to: 4.6.1
    6 Stable tag: 1.1.4
     5Tested up to: 4.7.5
     6Stable tag: 1.1.6
    77License: GPLv3
    88License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    1414
    1515Usage is rather simple, and here is the template of shortcode we supported.
    16 [dplayer url="http://xxx.xxx.com/xxx.mp4" pic="http://xxx.xxx.com/xxx.png" autoplay="true" danmu="true"/]
     16[dplayer url="https://anotherhome.net/DIYgod-cannot-even-discribe.mp4" pic="https://anotherhome.com/DIYgod-cannot-even-discribe.png" autoplay="true" danmu="true"/]
    1717
    1818Parameter 'url' is the source URL to the video file, you can upload the video to your WordPress library, then use it here.
     
    4040== Changelog ==
    4141
     42= 1.1.6 =
     43Improve compatibility on old versions of PHP.
     44
     45= 1.1.5 =
     46Update DPlayer to release 1.1.3. Please visit https://github.com/DIYgod/DPlayer/releases for details.
     47
    4248= 1.1.4 =
    43 * Extended support for bilibili param
    44 
    45 now you can use either to load additional danmaku.
    46 
     49* Extended support for bilibili param, now you can use either
    4750- bilibili='23333'
    4851- bilibili='http://www.bilibili.com/video/av2333333/index_233.html#page=2333'
     52to load additional danmaku.
    4953
    5054This plugin will give you exactly the danma that you need, which means,
    5155
    52 If you give the original URL to the bilibili video, this plugin will identify the URL format, load the right danmaku.
    53 
    54 In this example, 'http://www.bilibili.com/video/av2333333/index_233.html#page=2333' is given. And the plugin knows that aid is 2333333 and your requested page is 2333.
    55 
    56 (According to bilibili, 'index_233.html#page=2333' means that you starts at page 233 but currently you're watching page 2333)
     56If you give the original URL to the bilibili video, this plugin will identify the URL format, load the right danmaku. In this example, 'http://www.bilibili.com/video/av2333333/index_23333#page=233' is given. And the plugin knows that aid is 2333333 and your requested page is 2333. (According to bilibili, 'index_233.html#page=2333' means that you starts at page 233 but currently you're watching page 2333)
    5757
    5858= 1.1.3 =
Note: See TracChangeset for help on using the changeset viewer.