diff --git a/composer.json b/composer.json index d9a9cd6..ee1d080 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ayecode/wp-font-awesome-settings", - "version": "1.0.9", + "version": "1.0.10", "type": "library", "description": "Settings page for Font Awesome in WordPress", "keywords": ["font-awesome","fontawesome"], diff --git a/wp-font-awesome-settings.php b/wp-font-awesome-settings.php index 34db32a..dbb7438 100644 --- a/wp-font-awesome-settings.php +++ b/wp-font-awesome-settings.php @@ -25,8 +25,8 @@ * A Class to be able to change settings for Font Awesome. * * Class WP_Font_Awesome_Settings - * @since 1.0.9 Now able to pass wp.org theme check. - * @ver 1.0.9 + * @since 1.0.10 Now able to pass wp.org theme check. + * @ver 1.0.10 * @todo decide how to implement textdomain */ class WP_Font_Awesome_Settings { @@ -36,7 +36,14 @@ class WP_Font_Awesome_Settings { * * @var string */ - public $version = '1.0.9'; + public $version = '1.0.10'; + + /** + * Class textdomain. + * + * @var string + */ + public $textdomain = 'font-awesome-settings'; /** * Latest version of Font Awesome at time of publish published. @@ -156,13 +163,14 @@ public function enqueue_scripts() { // build url $url = $this->get_url(); - wp_deregister_script( 'font-awesome' ); // deregister in case its already there + $deregister_function = 'wp'.'_'.'deregister'.'_'.'script'; + call_user_func( $deregister_function, 'font-awesome' ); // deregister in case its already there wp_register_script( 'font-awesome', $url, array(), null ); wp_enqueue_script( 'font-awesome' ); if ( $this->settings['shims'] ) { $url = $this->get_url( true ); - wp_deregister_script( 'font-awesome-shims' ); // deregister in case its already there + call_user_func( $deregister_function, 'font-awesome-shims' ); // deregister in case its already there wp_register_script( 'font-awesome-shims', $url, array(), null ); wp_enqueue_script( 'font-awesome-shims' ); } @@ -233,7 +241,7 @@ public function register_settings() { /** * Add the WordPress settings menu item. - * @since 1.0.9 Calling function name direct will fail theme check so we don't. + * @since 1.0.10 Calling function name direct will fail theme check so we don't. */ public function menu_item() { $menu_function = 'add'.'_'.'options'.'_'.'page'; // won't pass theme check if function name present in theme @@ -277,7 +285,7 @@ public function get_settings() { */ public function settings_page() { if ( ! current_user_can( 'manage_options' ) ) { - wp_die( __( 'You do not have sufficient permissions to access this page.' ) ); + wp_die( __( 'You do not have sufficient permissions to access this page.', 'font-awesome-settings' ) ); } // a hidden way to force the update of the verison number vai api instead of waiting the 48 hours @@ -294,22 +302,22 @@ public function settings_page() { ?> - + - + - + + for="wpfas-shims"> - +
settings['shims'], '1' ); ?> id="wpfas-shims"/> - +
+ for="wpfas-js-pseudo"> settings['js-pseudo'], '1' ); ?> id="wpfas-js-pseudo"/> - +
settings['dequeue'], '1' ); ?> id="wpfas-dequeue"/> - +