|
2 | 2 | /* |
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.3 |
| 5 | +* Version: 1.0.4 |
6 | 6 | * Author: 0xBBC |
7 | 7 | * Author URI: https://blog.0xbbc.com/ |
| 8 | +* License: GPLv2 |
| 9 | +* License URI: http://www.gnu.org/licenses/gpl-2.0.html |
8 | 10 | * |
9 | 11 | * Acknowledgement |
10 | | -* Part of this work is done under Copy and paste programming :) |
11 | | -* Thanks to https://github.com/volio/DPlayer-for-typecho |
12 | | -*/ |
13 | | - |
14 | | -/* |
15 | | -The Star And Thank Author License (SATA) |
16 | | -
|
17 | | -Copyright (c) 2016 DIYgod(i@html.love) |
18 | | -
|
19 | | -Project Url: https://github.com/DIYgod/DPlayer |
20 | | -
|
21 | | -Permission is hereby granted, free of charge, to any person obtaining a copy |
22 | | -of this software and associated documentation files (the "Software"), to deal |
23 | | -in the Software without restriction, including without limitation the rights |
24 | | -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
25 | | -copies of the Software, and to permit persons to whom the Software is |
26 | | -furnished to do so, subject to the following conditions: |
27 | | -
|
28 | | -The above copyright notice and this permission notice shall be included in |
29 | | -all copies or substantial portions of the Software. |
30 | | -
|
31 | | -And wait, the most important, you shall star/+1/like the project(s) in project url |
32 | | -section above first, and then thank the author(s) in Copyright section. |
33 | | -
|
34 | | -Here are some suggested ways: |
35 | | -
|
36 | | - - Email the authors a thank-you letter, and make friends with him/her/them. |
37 | | - - Report bugs or issues. |
38 | | - - Tell friends what a wonderful project this is. |
39 | | - - And, sure, you can just express thanks in your mind without telling the world. |
40 | | -
|
41 | | -Contributors of this project by forking have the option to add his/her name and |
42 | | -forked project url at copyright and project url sections, but shall not delete |
43 | | -or modify anything else in these two sections. |
44 | | -
|
45 | | -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
46 | | -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
47 | | -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
48 | | -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
49 | | -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
50 | | -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
51 | | -THE SOFTWARE. |
| 12 | +* DPlayer by DIYgod |
| 13 | +* https://github.com/DIYgod/DPlayer |
| 14 | +* |
| 15 | +* And part of this work is done under Copy and paste programming :) |
| 16 | +* Thanks to https://github.com/volio/DPlayer-for-typecho |
52 | 17 | */ |
53 | 18 |
|
54 | 19 | class DPlayer { |
@@ -116,8 +81,8 @@ public static function dplayer_load($atts = [], $content = null, $tag = '') { |
116 | 81 |
|
117 | 82 | public static function add_script() { |
118 | 83 | if (!self::$add_script) { |
119 | | - wp_enqueue_script( 'dplayer', site_url('/wp-content/plugins/dplayer/js/DPlayer.min.js'), false, '1.0.9', false ); |
120 | | - wp_enqueue_script( 'init-dplayer', site_url('/wp-content/plugins/dplayer/js/init-dplayer.js'), false, '1.0.0', false ); |
| 84 | + wp_enqueue_script( 'dplayer', plugins_url('js/DPlayer.min.js', __FILE__), false, '1.0.9', false ); |
| 85 | + wp_enqueue_script( 'init-dplayer', plugins_url('js/init-dplayer.js', __FILE__), false, '1.0.0', false ); |
121 | 86 | self::$add_script = true; |
122 | 87 | } |
123 | 88 | } |
|
0 commit comments