Skip to content

Commit b9ce8ad

Browse files
committed
Code clean up
1 parent ddc39a0 commit b9ce8ad

File tree

4 files changed

+4
-85
lines changed

4 files changed

+4
-85
lines changed

README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Donate link: http://1fix.io/
55
Tags: featured image, metabox
66
Requires at least: 3.5
77
Tested up to: 3.9.1
8-
Stable tag: 0.1.0
8+
Stable tag: 0.2.0
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
1111

@@ -46,5 +46,5 @@ Custom the title, content and link / button text in the Featured Image metabox.
4646

4747
== Changelog ==
4848

49-
= 0.1.0 =
49+
= 0.2.0 =
5050
* The first version

admin/class-custom-featured-image-metabox-admin.php

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,13 @@ class Custom_Featured_Image_Metabox_Admin {
4747
*/
4848
private function __construct() {
4949

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-
5950
/*
6051
* Call $plugin_slug from public plugin class.
6152
*
6253
*/
6354
$plugin = Custom_Featured_Image_Metabox::get_instance();
6455
$this->plugin_slug = $plugin->get_plugin_slug();
6556

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-
7057
// Add the options page and menu item.
7158
add_action( 'admin_menu', array( $this, 'add_plugin_admin_menu' ) );
7259

@@ -102,46 +89,6 @@ public static function get_instance() {
10289
return self::$instance;
10390
}
10491

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-
14592
/**
14693
* Register the administration menu for this plugin into the WordPress Dashboard menu.
14794
*
@@ -156,12 +103,6 @@ public function add_plugin_admin_menu() {
156103
*
157104
* Administration Menus: http://codex.wordpress.org/Administration_Menus
158105
*
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
165106
*/
166107
$this->plugin_screen_hook_suffix = add_options_page(
167108
__( 'Custom Featured Image Metabox', $this->plugin_slug ),

custom-featured-image-metabox.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* Plugin Name: Custom Featured Image Metabox
1515
* Plugin URI: http://1fix.io
1616
* Description: Custom the title, content and link / button text in the Featured Image metabox.
17-
* Version: 0.1.0
17+
* Version: 0.2.0
1818
* Author: 1fixdotio
1919
* Author URI: http://1fix.io
2020
* Text Domain: cfim

public/class-custom-featured-image-metabox.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Custom_Featured_Image_Metabox {
2828
*
2929
* @var string
3030
*/
31-
const VERSION = '0.1.0';
31+
const VERSION = '0.2.0';
3232

3333
/**
3434
* Unique identifier for your plugin.
@@ -67,10 +67,6 @@ private function __construct() {
6767
// Activate plugin when new blog is added
6868
add_action( 'wpmu_new_blog', array( $this, 'activate_new_site' ) );
6969

70-
// Load public-facing style sheet and JavaScript.
71-
// add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_styles' ) );
72-
// add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
73-
7470
/* Define custom functionality.
7571
* Refer To http://codex.wordpress.org/Plugin_API#Hooks.2C_Actions_and_Filters
7672
*/
@@ -257,24 +253,6 @@ public function load_plugin_textdomain() {
257253

258254
}
259255

260-
/**
261-
* Register and enqueue public-facing style sheet.
262-
*
263-
* @since 0.1.0
264-
*/
265-
public function enqueue_styles() {
266-
wp_enqueue_style( $this->plugin_slug . '-plugin-styles', plugins_url( 'assets/css/public.css', __FILE__ ), array(), self::VERSION );
267-
}
268-
269-
/**
270-
* Register and enqueues public-facing JavaScript files.
271-
*
272-
* @since 0.1.0
273-
*/
274-
public function enqueue_scripts() {
275-
wp_enqueue_script( $this->plugin_slug . '-plugin-script', plugins_url( 'assets/js/public.js', __FILE__ ), array( 'jquery' ), self::VERSION );
276-
}
277-
278256
/**
279257
* NOTE: Actions are points in the execution of a page or process
280258
* lifecycle that WordPress fires.

0 commit comments

Comments
 (0)