Skip to content

Commit 4c316c9

Browse files
committed
deploy: f480454
1 parent fc204d9 commit 4c316c9

File tree

5 files changed

+19
-25
lines changed

5 files changed

+19
-25
lines changed

able_player_css.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line74">line 74</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line77">line 77</a>
161161
</li></ul></dd>
162162

163163

able_player_js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line63">line 63</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line66">line 66</a>
161161
</li></ul></dd>
162162

163163

ableplayer.php.html

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
// Get current version number.
5151
define( 'ABLEPLAYER_VERSION', '1.2.2' );
5252

53+
require_once plugin_dir_path( __FILE__ ) . 'inc/settings.php';
54+
require_once plugin_dir_path( __FILE__ ) . 'inc/kses.php';
55+
5356
register_activation_hook( __FILE__, 'ableplayer_activation' );
5457
/**
5558
* Configure plugin on activation.
@@ -127,29 +130,20 @@
127130
add_action( 'wp_enqueue_scripts', 'ableplayer_enqueue_scripts' );
128131

129132
/**
130-
* Get Able Player settings.
131-
*
132-
* @param string $setting A specific setting key. Default empty string.
133-
*
134-
* @return array|mixed The full settings array or a specific setting value.
135-
*/
136-
function ableplayer_get_settings( $setting = '' ) {
137-
$settings = get_option( 'ableplayer_settings', ableplayer_default_settings() );
138-
if ( $setting &amp;&amp; isset( $settings[ $setting ] ) ) {
139-
return $settings[ $setting ];
140-
}
141-
142-
return $settings;
143-
}
144-
145-
/**
146-
* Get Able Player default settings.
147-
*
148-
* @return array
133+
* Enqueue admin JS and CSS.
149134
*/
150-
function ableplayer_default_settings() {
151-
return array();
135+
function ableplayer_admin_scripts() {
136+
wp_enqueue_script( 'ableplayer-js', plugins_url( '/assets/js/admin.js', __FILE__ ), array( 'jquery' ), ABLEPLAYER_VERSION, true );
137+
wp_localize_script(
138+
'ableplayer-js',
139+
'ableplayer',
140+
array(
141+
'firstItem' => 'tab_settings',
142+
)
143+
);
144+
wp_enqueue_style( 'ableplayer', plugins_url( '/assets/css/admin.css', __FILE__ ), array(), ABLEPLAYER_VERSION );
152145
}
146+
add_action( 'admin_enqueue_scripts', 'ableplayer_admin_scripts' );
153147

154148
/**
155149
* Self-documenting array of AblePlayer attributes.

ableplayer_dependencies.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ <h5>Parameters:</h5>
157157

158158
<dt class="tag-source">Source:</dt>
159159
<dd class="tag-source"><ul class="dummy"><li>
160-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line87">line 87</a>
160+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line90">line 90</a>
161161
</li></ul></dd>
162162

163163

ableplayer_parameters.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ <h5>Parameters:</h5>
136136

137137
<dt class="tag-source">Source:</dt>
138138
<dd class="tag-source"><ul class="dummy"><li>
139-
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line336">line 336</a>
139+
<a href="ableplayer.php.html">ableplayer.php</a>, <a href="ableplayer.php.html#line330">line 330</a>
140140
</li></ul></dd>
141141

142142

0 commit comments

Comments
 (0)