@@ -47,26 +47,13 @@ class Custom_Featured_Image_Metabox_Admin {
47
47
*/
48
48
private function __construct () {
49
49
50
- /*
51
- * @TODO :
52
- *
53
- * - Uncomment following lines if the admin class should only be available for super admins
54
- */
55
- /* if( ! is_super_admin() ) {
56
- return;
57
- } */
58
-
59
50
/*
60
51
* Call $plugin_slug from public plugin class.
61
52
*
62
53
*/
63
54
$ plugin = Custom_Featured_Image_Metabox::get_instance ();
64
55
$ this ->plugin_slug = $ plugin ->get_plugin_slug ();
65
56
66
- // Load admin style sheet and JavaScript.
67
- // add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
68
- // add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
69
-
70
57
// Add the options page and menu item.
71
58
add_action ( 'admin_menu ' , array ( $ this , 'add_plugin_admin_menu ' ) );
72
59
@@ -102,46 +89,6 @@ public static function get_instance() {
102
89
return self ::$ instance ;
103
90
}
104
91
105
- /**
106
- * Register and enqueue admin-specific style sheet.
107
- *
108
- * @since 0.1.0
109
- *
110
- * @return null Return early if no settings page is registered.
111
- */
112
- public function enqueue_admin_styles () {
113
-
114
- if ( ! isset ( $ this ->plugin_screen_hook_suffix ) ) {
115
- return ;
116
- }
117
-
118
- $ screen = get_current_screen ();
119
- if ( $ this ->plugin_screen_hook_suffix == $ screen ->id ) {
120
- wp_enqueue_style ( $ this ->plugin_slug .'-admin-styles ' , plugins_url ( 'assets/css/admin.css ' , __FILE__ ), array (), Custom_Featured_Image_Metabox::VERSION );
121
- }
122
-
123
- }
124
-
125
- /**
126
- * Register and enqueue admin-specific JavaScript.
127
- *
128
- * @since 0.1.0
129
- *
130
- * @return null Return early if no settings page is registered.
131
- */
132
- public function enqueue_admin_scripts () {
133
-
134
- if ( ! isset ( $ this ->plugin_screen_hook_suffix ) ) {
135
- return ;
136
- }
137
-
138
- $ screen = get_current_screen ();
139
- if ( $ this ->plugin_screen_hook_suffix == $ screen ->id ) {
140
- wp_enqueue_script ( $ this ->plugin_slug . '-admin-script ' , plugins_url ( 'assets/js/admin.js ' , __FILE__ ), array ( 'jquery ' ), Custom_Featured_Image_Metabox::VERSION );
141
- }
142
-
143
- }
144
-
145
92
/**
146
93
* Register the administration menu for this plugin into the WordPress Dashboard menu.
147
94
*
@@ -156,12 +103,6 @@ public function add_plugin_admin_menu() {
156
103
*
157
104
* Administration Menus: http://codex.wordpress.org/Administration_Menus
158
105
*
159
- * @TODO:
160
- *
161
- * - Change 'Custom Featured Image Metabox' to the title of your plugin admin page
162
- * - Change 'Custom Featured Image Metabox' to the text for menu item for the plugin settings page
163
- * - Change 'manage_options' to the capability you see fit
164
- * For reference: http://codex.wordpress.org/Roles_and_Capabilities
165
106
*/
166
107
$ this ->plugin_screen_hook_suffix = add_options_page (
167
108
__ ( 'Custom Featured Image Metabox ' , $ this ->plugin_slug ),
0 commit comments