diff --git a/assets/css/widgets.css b/assets/css/widgets.css deleted file mode 100644 index 8a1ff4bc..00000000 --- a/assets/css/widgets.css +++ /dev/null @@ -1,25 +0,0 @@ -.sp-prefs .button { - margin: 0 3px 4px 0; - padding: 0 7px 1px 5px; -} - -.sp-prefs .button input[type=checkbox] { - background: transparent; - border: none; - -webkit-box-shadow: none; - box-shadow: none; -} - -.sp-prefs .button input[type=checkbox]:not(:checked):before { - float: left; - display: inline-block; - vertical-align: middle; - width: 16px; - font: 400 21px/1 dashicons; - speak: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - content: '\f335'; - margin: -3px 0 0 -4px; - color: #a00; -} \ No newline at end of file diff --git a/includes/admin/class-sp-admin-assets.php b/includes/admin/class-sp-admin-assets.php index c8516a2f..7ec6b7c0 100644 --- a/includes/admin/class-sp-admin-assets.php +++ b/includes/admin/class-sp-admin-assets.php @@ -48,10 +48,6 @@ class SP_Admin_Assets { wp_enqueue_style( 'sportspress-admin-dashboard-styles', SP()->plugin_url() . '/assets/css/dashboard.css', array(), SP_VERSION ); } - if ( in_array( $screen->id, array( 'widgets' ) ) ) { - wp_enqueue_style( 'sportspress-admin-widgets-styles', SP()->plugin_url() . '/assets/css/widgets.css', array(), SP_VERSION ); - } - if ( in_array( $screen->id, array( 'customize' ) ) ) { wp_enqueue_style( 'sportspress-admin-customize-styles', SP()->plugin_url() . '/assets/css/customize.css', array(), SP_VERSION ); } @@ -92,23 +88,9 @@ class SP_Admin_Assets { wp_register_script( 'sportspress-admin-locationpicker', SP()->plugin_url() . '/assets/js/admin/locationpicker.js', array( 'jquery', 'google-maps', 'jquery-locationpicker' ), SP_VERSION, true ); wp_register_script( 'sportspress-admin-equationbuilder', SP()->plugin_url() . '/assets/js/admin/equationbuilder.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable' ), SP_VERSION, true ); - - wp_register_script( 'sportspress-admin', SP()->plugin_url() . '/assets/js/admin/sportspress-admin.js', array( 'jquery', 'chosen', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-tiptip', 'jquery-caret', 'jquery-countdown' ), SP_VERSION, true ); wp_register_script( 'sportspress-admin-widgets', SP()->plugin_url() . '/assets/js/admin/widgets.js', array( 'jquery' ), SP_VERSION, true ); - $strings = array( - 'none' => __( 'None', 'sportspress' ), - 'remove_text' => __( '— Remove —', 'sportspress' ), - 'days' => __( 'days', 'sportspress' ), - 'hrs' => __( 'hrs', 'sportspress' ), - 'mins' => __( 'mins', 'sportspress' ), - 'secs' => __( 'secs', 'sportspress' ) - ); - - // Localize scripts - wp_localize_script( 'sportspress-admin', 'localized_strings', $strings ); - // SportsPress admin pages if ( in_array( $screen->id, sp_get_screen_ids() ) ) { wp_enqueue_script( 'jquery' ); @@ -120,7 +102,19 @@ class SP_Admin_Assets { wp_enqueue_script( 'jquery-tiptip' ); wp_enqueue_script( 'jquery-caret' ); wp_enqueue_script( 'jquery-countdown' ); - wp_enqueue_script( 'sportspress-admin' ); + wp_enqueue_script( 'sportspress-admin', SP()->plugin_url() . '/assets/js/admin/sportspress-admin.js', array( 'jquery', 'chosen', 'jquery-ui-core', 'jquery-ui-draggable', 'jquery-ui-droppable', 'jquery-ui-sortable', 'jquery-tiptip', 'jquery-caret', 'jquery-countdown' ), SP_VERSION, true ); + + $strings = array( + 'none' => __( 'None', 'sportspress' ), + 'remove_text' => __( '— Remove —', 'sportspress' ), + 'days' => __( 'days', 'sportspress' ), + 'hrs' => __( 'hrs', 'sportspress' ), + 'mins' => __( 'mins', 'sportspress' ), + 'secs' => __( 'secs', 'sportspress' ) + ); + + // Localize scripts + wp_localize_script( 'sportspress-admin', 'localized_strings', $strings ); } if ( in_array( $screen->id, array( 'widgets' ) ) ) {