Version Description
- Provide icon selection fields on newly added menu items
Download this release
Release Info
Developer | kucrut |
Plugin | Menu Icons by ThemeIsle |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
- menu-icons.php +15 -10
- readme.txt +4 -3
menu-icons.php
CHANGED
@@ -4,14 +4,14 @@
|
|
4 |
* Menu Icons
|
5 |
*
|
6 |
* @package Menu_Icons
|
7 |
-
* @version 0.1.
|
8 |
* @author Dzikri Aziz <kvcrvt@gmail.com>
|
9 |
*
|
10 |
*
|
11 |
* Plugin name: Menu Icons
|
12 |
* Plugin URI: http://kucrut.org/
|
13 |
* Description: Easily add icons to your navigation menu items
|
14 |
-
* Version: 0.1.
|
15 |
* Author: Dzikri Aziz
|
16 |
* Author URI: http://kucrut.org/
|
17 |
* License: GPLv2
|
@@ -22,11 +22,11 @@
|
|
22 |
/**
|
23 |
* Main plugin class
|
24 |
*
|
25 |
-
* @
|
26 |
*/
|
27 |
final class Menu_Icons {
|
28 |
|
29 |
-
const VERSION = '0.1.
|
30 |
|
31 |
/**
|
32 |
* Holds plugin data
|
@@ -80,6 +80,7 @@ final class Menu_Icons {
|
|
80 |
);
|
81 |
|
82 |
add_action( 'wp_loaded', array( __CLASS__, 'init' ), 9 );
|
|
|
83 |
}
|
84 |
|
85 |
|
@@ -106,7 +107,6 @@ final class Menu_Icons {
|
|
106 |
return;
|
107 |
}
|
108 |
|
109 |
-
add_action( 'load-nav-menus.php', array( __CLASS__, '_load_nav_menus' ) );
|
110 |
add_action( 'get_header', array( __CLASS__, '_load_front_end' ) );
|
111 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, '_enqueue_styles' ), 7 );
|
112 |
}
|
@@ -153,20 +153,25 @@ final class Menu_Icons {
|
|
153 |
|
154 |
|
155 |
/**
|
156 |
-
* Prepare
|
157 |
*
|
158 |
-
*
|
|
|
|
|
|
|
|
|
159 |
* @access protected
|
160 |
-
* @wp_hook
|
161 |
-
* @link http://codex.wordpress.org/Plugin_API/Action_Reference/load-(page) Action: load-nav-menus.php/10
|
162 |
*/
|
163 |
-
public static function _load_nav_menus() {
|
164 |
// Load menu item custom fields plugin
|
165 |
require_once self::$data['dir'] . 'includes/menu-item-custom-fields/menu-item-custom-fields.php';
|
166 |
|
167 |
// Load custom fields
|
168 |
require_once self::$data['dir'] . 'includes/admin.php';
|
169 |
Menu_Icons_Admin_Nav_Menus::init();
|
|
|
|
|
170 |
}
|
171 |
|
172 |
|
4 |
* Menu Icons
|
5 |
*
|
6 |
* @package Menu_Icons
|
7 |
+
* @version 0.1.3
|
8 |
* @author Dzikri Aziz <kvcrvt@gmail.com>
|
9 |
*
|
10 |
*
|
11 |
* Plugin name: Menu Icons
|
12 |
* Plugin URI: http://kucrut.org/
|
13 |
* Description: Easily add icons to your navigation menu items
|
14 |
+
* Version: 0.1.3
|
15 |
* Author: Dzikri Aziz
|
16 |
* Author URI: http://kucrut.org/
|
17 |
* License: GPLv2
|
22 |
/**
|
23 |
* Main plugin class
|
24 |
*
|
25 |
+
* @version 0.1.3
|
26 |
*/
|
27 |
final class Menu_Icons {
|
28 |
|
29 |
+
const VERSION = '0.1.3';
|
30 |
|
31 |
/**
|
32 |
* Holds plugin data
|
80 |
);
|
81 |
|
82 |
add_action( 'wp_loaded', array( __CLASS__, 'init' ), 9 );
|
83 |
+
add_filter( 'wp_edit_nav_menu_walker', array( __CLASS__, '_load_nav_menus' ), 1 );
|
84 |
}
|
85 |
|
86 |
|
107 |
return;
|
108 |
}
|
109 |
|
|
|
110 |
add_action( 'get_header', array( __CLASS__, '_load_front_end' ) );
|
111 |
add_action( 'wp_enqueue_scripts', array( __CLASS__, '_enqueue_styles' ), 7 );
|
112 |
}
|
153 |
|
154 |
|
155 |
/**
|
156 |
+
* Prepare custom walker
|
157 |
*
|
158 |
+
* This is kind of dirty, because we're using a filter hook for doing an action.
|
159 |
+
* It's because we want our walker to always be used whether it's editing the current
|
160 |
+
* menu items, or adding new ones (via ajax).
|
161 |
+
*
|
162 |
+
* @since 0.1.3
|
163 |
* @access protected
|
164 |
+
* @wp_hook filter wp_edit_nav_menu_walker/10/1
|
|
|
165 |
*/
|
166 |
+
public static function _load_nav_menus( $walker ) {
|
167 |
// Load menu item custom fields plugin
|
168 |
require_once self::$data['dir'] . 'includes/menu-item-custom-fields/menu-item-custom-fields.php';
|
169 |
|
170 |
// Load custom fields
|
171 |
require_once self::$data['dir'] . 'includes/admin.php';
|
172 |
Menu_Icons_Admin_Nav_Menus::init();
|
173 |
+
|
174 |
+
return $walker;
|
175 |
}
|
176 |
|
177 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate Link: http://kucrut.org/#coffee
|
|
4 |
Tags: menu, nav-menu, icons, navigation
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.8.1
|
7 |
-
Stable tag: 0.1.
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -32,8 +32,6 @@ This plugin gives you the ability to add icons to your menu items, similar to th
|
|
32 |
= Planned features =
|
33 |
1. Provide modal popup that displays the icons for selection
|
34 |
|
35 |
-
See **Other Notes** to know about the *hidden* features.
|
36 |
-
|
37 |
Development of this plugin is done on [GitHub](https://github.com/kucrut/wp-menu-icons). **Pull requests welcome**. Please see [issues reported](https://github.com/kucrut/wp-menu-icons/issues) there before going to the plugin forum.
|
38 |
|
39 |
|
@@ -85,6 +83,9 @@ add_filter( 'menu_icons_load_extra_style', '__return_false' );
|
|
85 |
|
86 |
|
87 |
== Changelog ==
|
|
|
|
|
|
|
88 |
= 0.1.2 =
|
89 |
* Improve extra stylesheet
|
90 |
|
4 |
Tags: menu, nav-menu, icons, navigation
|
5 |
Requires at least: 3.8
|
6 |
Tested up to: 3.8.1
|
7 |
+
Stable tag: 0.1.3
|
8 |
License: GPLv2
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
32 |
= Planned features =
|
33 |
1. Provide modal popup that displays the icons for selection
|
34 |
|
|
|
|
|
35 |
Development of this plugin is done on [GitHub](https://github.com/kucrut/wp-menu-icons). **Pull requests welcome**. Please see [issues reported](https://github.com/kucrut/wp-menu-icons/issues) there before going to the plugin forum.
|
36 |
|
37 |
|
83 |
|
84 |
|
85 |
== Changelog ==
|
86 |
+
= 0.1.3 =
|
87 |
+
* Provide icon selection fields on newly added menu items
|
88 |
+
|
89 |
= 0.1.2 =
|
90 |
* Improve extra stylesheet
|
91 |
|