Changeset 1507117
- Timestamp:
- 10/03/2016 06:36:16 AM (9 years ago)
- Location:
- dplayer-for-wp
- Files:
-
- 3 edited
- 2 copied
-
tags/1.0.8 (copied) (copied from dplayer-for-wp/tags/1.0.7)
-
tags/1.0.8/dplayer.php (copied) (copied from dplayer-for-wp/tags/1.0.7/dplayer.php) (6 diffs)
-
tags/1.0.8/readme.txt (modified) (2 diffs)
-
trunk/dplayer.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dplayer-for-wp/tags/1.0.8/dplayer.php
r1503993 r1507117 3 3 * Plugin Name: DPlayer for WordPress 4 4 * Description: Wow, such a lovely HTML5 danmaku video player comes to WordPress 5 * Version: 1.0. 75 * Version: 1.0.8 6 6 * Author: 0xBBC 7 7 * Author URI: https://blog.0xbbc.com/ 8 * License: GPLv 29 * License URI: http://www.gnu.org/licenses/gpl- 2.0.html8 * License: GPLv3 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 * 11 11 * Acknowledgement … … 17 17 */ 18 18 19 require_once( dirname( __FILE__ ) . '/dplayer-admin.php' ); 20 19 21 class DPlayer { 20 22 static $add_script; … … 24 26 add_action( 'wp_footer', array( __CLASS__, 'add_script' ) ); 25 27 add_shortcode( 'dplayer', array( __CLASS__, 'dplayer_load') ); 28 add_filter( 'plugin_action_links', array( __CLASS__, 'dplayer_settings_link' ), 9, 2 ); 26 29 } 27 30 … … 30 33 <script>var dPlayers = [];var dPlayerOptions = [];</script> 31 34 <?php 35 } 36 37 // registers default options 38 public static function dplayer_install() { 39 add_option( 'kblog_danmaku_url', '//danmaku.daoapp.io' ); 40 add_option( 'kblog_danmaku_token', 'tokendemo' ); 41 } 42 43 public static function dplayer_uninstall() { 44 delete_option( 'kblog_danmaku_url' ); 45 delete_option( 'kblog_danmaku_token' ); 32 46 } 33 47 … … 68 82 $danmaku = array( 69 83 'id' => md5($id), 70 'token' => 'tokendemo',71 'api' => '//danmaku.daoapp.io/',84 'token' => get_option( 'kblog_danmaku_token', '' ), 85 'api' => get_option( 'kblog_danmaku_url', '' ), 72 86 ); 73 87 $data['danmaku'] = ($atts['danmu'] != 'false') ? $danmaku : null; … … 80 94 } 81 95 96 public static function dplayer_settings_link( $links, $file ) { 97 if ( plugins_url('dplayer-admin.php', __FILE__) === $file && function_exists( 'admin_url' ) ) { 98 $settings_link = '<a href="' . esc_url( admin_url( 'options-general.php?page=kblog-dplayer' ) ) . '">' . esc_html__( 'Settings' ) . '</a>'; 99 array_unshift( $links, $settings_link ); 100 } 101 return $links; 102 } 103 82 104 public static function add_script() { 83 105 if (!self::$add_script) { 84 wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.0. 9', false );106 wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.0.10', false ); 85 107 wp_enqueue_script( 'init-dplayer', plugins_url('js/init-dplayer.js', __FILE__), false, '1.0.0', false ); 86 108 self::$add_script = true; -
dplayer-for-wp/tags/1.0.8/readme.txt
r1503969 r1507117 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 1. Write the shortcode manually in your editor 36 36 2. Save and you’ll get this lovely danmuku video player! 37 3. Config Danmaku API URL and token in settings page 37 38 38 39 == Changelog == 40 41 = 1.0.8 = 42 * Add settings page for API URL and token 39 43 40 44 = 1.0.7 = -
dplayer-for-wp/trunk/dplayer.php
r1503993 r1507117 3 3 * Plugin Name: DPlayer for WordPress 4 4 * Description: Wow, such a lovely HTML5 danmaku video player comes to WordPress 5 * Version: 1.0. 75 * Version: 1.0.8 6 6 * Author: 0xBBC 7 7 * Author URI: https://blog.0xbbc.com/ 8 * License: GPLv 29 * License URI: http://www.gnu.org/licenses/gpl- 2.0.html8 * License: GPLv3 9 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 10 10 * 11 11 * Acknowledgement … … 17 17 */ 18 18 19 require_once( dirname( __FILE__ ) . '/dplayer-admin.php' ); 20 19 21 class DPlayer { 20 22 static $add_script; … … 24 26 add_action( 'wp_footer', array( __CLASS__, 'add_script' ) ); 25 27 add_shortcode( 'dplayer', array( __CLASS__, 'dplayer_load') ); 28 add_filter( 'plugin_action_links', array( __CLASS__, 'dplayer_settings_link' ), 9, 2 ); 26 29 } 27 30 … … 30 33 <script>var dPlayers = [];var dPlayerOptions = [];</script> 31 34 <?php 35 } 36 37 // registers default options 38 public static function dplayer_install() { 39 add_option( 'kblog_danmaku_url', '//danmaku.daoapp.io' ); 40 add_option( 'kblog_danmaku_token', 'tokendemo' ); 41 } 42 43 public static function dplayer_uninstall() { 44 delete_option( 'kblog_danmaku_url' ); 45 delete_option( 'kblog_danmaku_token' ); 32 46 } 33 47 … … 68 82 $danmaku = array( 69 83 'id' => md5($id), 70 'token' => 'tokendemo',71 'api' => '//danmaku.daoapp.io/',84 'token' => get_option( 'kblog_danmaku_token', '' ), 85 'api' => get_option( 'kblog_danmaku_url', '' ), 72 86 ); 73 87 $data['danmaku'] = ($atts['danmu'] != 'false') ? $danmaku : null; … … 80 94 } 81 95 96 public static function dplayer_settings_link( $links, $file ) { 97 if ( plugins_url('dplayer-admin.php', __FILE__) === $file && function_exists( 'admin_url' ) ) { 98 $settings_link = '<a href="' . esc_url( admin_url( 'options-general.php?page=kblog-dplayer' ) ) . '">' . esc_html__( 'Settings' ) . '</a>'; 99 array_unshift( $links, $settings_link ); 100 } 101 return $links; 102 } 103 82 104 public static function add_script() { 83 105 if (!self::$add_script) { 84 wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.0. 9', false );106 wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.0.10', false ); 85 107 wp_enqueue_script( 'init-dplayer', plugins_url('js/init-dplayer.js', __FILE__), false, '1.0.0', false ); 86 108 self::$add_script = true; -
dplayer-for-wp/trunk/readme.txt
r1503969 r1507117 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.6.1 6 Stable tag: 1.0. 76 Stable tag: 1.0.8 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 1. Write the shortcode manually in your editor 36 36 2. Save and you’ll get this lovely danmuku video player! 37 3. Config Danmaku API URL and token in settings page 37 38 38 39 == Changelog == 40 41 = 1.0.8 = 42 * Add settings page for API URL and token 39 43 40 44 = 1.0.7 =
Note: See TracChangeset
for help on using the changeset viewer.