Version Description
Download this release
Release Info
Developer | Mat Lipe |
Plugin | Advanced Sidebar Menu |
Version | 7.4.1 |
Comparing to | |
See all releases |
Code changes from version 7.4.0 to 7.4.1
- advanced-sidebar-menu.php +43 -25
- readme.txt +1 -1
advanced-sidebar-menu.php
CHANGED
@@ -1,23 +1,29 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
Plugin Name: Advanced Sidebar Menu
|
4 |
-
Plugin URI: https://matlipe.com/advanced-sidebar-menu/
|
5 |
-
Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
-
Author: Mat Lipe
|
7 |
-
Version: 7.4.
|
8 |
-
Author URI: https://matlipe.com
|
9 |
-
Text Domain: advanced-sidebar-menu
|
10 |
-
|
11 |
-
|
|
|
12 |
|
13 |
if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
|
14 |
return;
|
15 |
}
|
16 |
|
17 |
-
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.4.
|
18 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
19 |
|
20 |
if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
|
|
|
|
|
|
|
|
|
|
|
21 |
function advanced_sidebar_menu_load() {
|
22 |
Advanced_Sidebar_Menu_Core::init();
|
23 |
Advanced_Sidebar_Menu_Cache::init();
|
@@ -31,18 +37,18 @@ if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
|
|
31 |
* Autoload classes from PSR4 src directory
|
32 |
* Mirrored after Composer dump-autoload for performance
|
33 |
*
|
34 |
-
* @param string $class
|
35 |
*
|
36 |
* @return void
|
37 |
*/
|
38 |
function advanced_sidebar_menu_autoload( $class ) {
|
39 |
$classes = array(
|
40 |
-
//widgets
|
41 |
'Advanced_Sidebar_Menu__Widget__Widget' => 'Widget/Widget.php',
|
42 |
'Advanced_Sidebar_Menu_Widget_Page' => 'Widget/Page.php',
|
43 |
'Advanced_Sidebar_Menu_Widget_Category' => 'Widget/Category.php',
|
44 |
|
45 |
-
//core
|
46 |
'Advanced_Sidebar_Menu_Cache' => 'Cache.php',
|
47 |
'Advanced_Sidebar_Menu_Core' => 'Core.php',
|
48 |
'Advanced_Sidebar_Menu_Debug' => 'Debug.php',
|
@@ -50,7 +56,7 @@ function advanced_sidebar_menu_autoload( $class ) {
|
|
50 |
'Advanced_Sidebar_Menu_Menu' => 'Menu.php',
|
51 |
'Advanced_Sidebar_Menu_Page_Walker' => 'Page_Walker.php',
|
52 |
|
53 |
-
//menus
|
54 |
'Advanced_Sidebar_Menu_Menus_Category' => 'Menus/Category.php',
|
55 |
'Advanced_Sidebar_Menu_Menus_Abstract' => 'Menus/Abstract.php',
|
56 |
'Advanced_Sidebar_Menu_Menus_Page' => 'Menus/Page.php',
|
@@ -63,26 +69,37 @@ function advanced_sidebar_menu_autoload( $class ) {
|
|
63 |
spl_autoload_register( 'advanced_sidebar_menu_autoload' );
|
64 |
|
65 |
|
66 |
-
#-- Translate
|
67 |
add_action( 'plugins_loaded', 'advanced_sidebar_menu_translate' );
|
|
|
|
|
|
|
|
|
|
|
68 |
function advanced_sidebar_menu_translate() {
|
69 |
load_plugin_textdomain( 'advanced-sidebar-menu', false, 'advanced-sidebar-menu/languages' );
|
70 |
}
|
71 |
|
72 |
add_action( 'admin_print_scripts', 'advanced_sidebar_menu_script' );
|
|
|
|
|
|
|
|
|
|
|
73 |
function advanced_sidebar_menu_script() {
|
74 |
wp_enqueue_script(
|
75 |
apply_filters( 'asm_script', 'advanced-sidebar-menu-script' ),
|
76 |
plugins_url( 'resources/js/advanced-sidebar-menu.js', __FILE__ ),
|
77 |
array( 'jquery' ),
|
78 |
-
ADVANCED_SIDEBAR_BASIC_VERSION
|
|
|
79 |
);
|
80 |
|
81 |
wp_enqueue_style(
|
82 |
apply_filters( 'asm_style', 'advanced-sidebar-menu-style' ),
|
83 |
plugins_url( 'resources/css/advanced-sidebar-menu.css', __FILE__ ),
|
84 |
array(),
|
85 |
-
ADVANCED_SIDEBAR_BASIC_VERSION
|
|
|
86 |
);
|
87 |
}
|
88 |
|
@@ -94,8 +111,8 @@ add_action( 'advanced-sidebar-menu/widget/page/right-column', 'advanced_sidebar_
|
|
94 |
/**
|
95 |
* Notify widget users about the PRO options
|
96 |
*
|
97 |
-
* @param array $instance
|
98 |
-
* @param WP_Widget $widget
|
99 |
*
|
100 |
* @return void
|
101 |
*/
|
@@ -110,14 +127,15 @@ function advanced_sidebar_menu_upgrade_notice( array $instance, WP_Widget $widge
|
|
110 |
<strong>
|
111 |
<?php
|
112 |
/* translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/ */
|
113 |
-
printf( esc_html_x( 'Upgrade to %1$sAdvanced Sidebar Menu Pro%2$s for these features and so much more!', '{<a>}{</a>}', 'advanced-sidebar-menu' ), '<a target="blank" href="https://matlipe.com/product/advanced-sidebar-menu-pro/">', '</a>' );
|
|
|
114 |
</strong>
|
115 |
<ol style="list-style: disc">
|
116 |
<li><?php esc_html_e( 'Priority support, including access to Members Only Support Area.', 'advanced-sidebar-menu' ); ?></li>
|
117 |
<li><?php esc_html_e( 'Accordion menu support.', 'advanced-sidebar-menu' ); ?></li>
|
118 |
<li><?php esc_html_e( 'Click and drag menu styling including bullets, colors, sizes, block styles, borders, and border colors.', 'advanced-sidebar-menu' ); ?></li>
|
119 |
<?php
|
120 |
-
//page widget options
|
121 |
if ( 'advanced_sidebar_menu' === $widget->id_base ) {
|
122 |
?>
|
123 |
<li><?php esc_html_e( "Ability to customize each page's link text.", 'advanced-sidebar-menu' ); ?></li>
|
@@ -126,18 +144,18 @@ function advanced_sidebar_menu_upgrade_notice( array $instance, WP_Widget $widge
|
|
126 |
<li><?php esc_html_e( 'Ability to select and display custom post types.', 'advanced-sidebar-menu' ); ?></li>
|
127 |
<li><?php esc_html_e( 'Option to display the current page’s parents, grandparents, and children only, as well as siblings options.', 'advanced-sidebar-menu' ); ?></li>
|
128 |
<?php
|
129 |
-
//category widget options
|
130 |
} else {
|
131 |
?>
|
132 |
<li><?php esc_html_e( 'Link ordering for the category widget.', 'advanced-sidebar-menu' ); ?></li>
|
133 |
<li><?php esc_html_e( 'Ability to select and display custom taxonomies.', 'advanced-sidebar-menu' ); ?></li>
|
134 |
-
<li><?php esc_html_e( 'Ability to display assigned posts or custom post types under categories.', 'advanced-sidebar-menu' );
|
135 |
<?php
|
136 |
}
|
137 |
?>
|
138 |
<li><?php esc_html_e( 'Ability to display the widgets everywhere the sidebar displays.', 'advanced-sidebar-menu' ); ?>
|
139 |
<strong> NEW</strong></li>
|
140 |
-
<li><?php esc_html_e( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' );
|
141 |
</ol>
|
142 |
<p>
|
143 |
</div>
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Plugin Name: Advanced Sidebar Menu
|
4 |
+
* Plugin URI: https://matlipe.com/advanced-sidebar-menu/
|
5 |
+
* Description: Creates dynamic menus based on parent/child relationship of your pages or categories.
|
6 |
+
* Author: Mat Lipe
|
7 |
+
* Version: 7.4.1
|
8 |
+
* Author URI: https://matlipe.com
|
9 |
+
* Text Domain: advanced-sidebar-menu
|
10 |
+
*
|
11 |
+
* @package advanced-sidebar-menu
|
12 |
+
*/
|
13 |
|
14 |
if ( defined( 'ADVANCED_SIDEBAR_BASIC_VERSION' ) ) {
|
15 |
return;
|
16 |
}
|
17 |
|
18 |
+
define( 'ADVANCED_SIDEBAR_BASIC_VERSION', '7.4.1' );
|
19 |
define( 'ADVANCED_SIDEBAR_DIR', plugin_dir_path( __FILE__ ) );
|
20 |
|
21 |
if ( ! function_exists( 'advanced_sidebar_menu_load' ) ) {
|
22 |
+
/**
|
23 |
+
* Load the plugin
|
24 |
+
*
|
25 |
+
* @return void
|
26 |
+
*/
|
27 |
function advanced_sidebar_menu_load() {
|
28 |
Advanced_Sidebar_Menu_Core::init();
|
29 |
Advanced_Sidebar_Menu_Cache::init();
|
37 |
* Autoload classes from PSR4 src directory
|
38 |
* Mirrored after Composer dump-autoload for performance
|
39 |
*
|
40 |
+
* @param string $class - class being loaded.
|
41 |
*
|
42 |
* @return void
|
43 |
*/
|
44 |
function advanced_sidebar_menu_autoload( $class ) {
|
45 |
$classes = array(
|
46 |
+
// widgets.
|
47 |
'Advanced_Sidebar_Menu__Widget__Widget' => 'Widget/Widget.php',
|
48 |
'Advanced_Sidebar_Menu_Widget_Page' => 'Widget/Page.php',
|
49 |
'Advanced_Sidebar_Menu_Widget_Category' => 'Widget/Category.php',
|
50 |
|
51 |
+
// core.
|
52 |
'Advanced_Sidebar_Menu_Cache' => 'Cache.php',
|
53 |
'Advanced_Sidebar_Menu_Core' => 'Core.php',
|
54 |
'Advanced_Sidebar_Menu_Debug' => 'Debug.php',
|
56 |
'Advanced_Sidebar_Menu_Menu' => 'Menu.php',
|
57 |
'Advanced_Sidebar_Menu_Page_Walker' => 'Page_Walker.php',
|
58 |
|
59 |
+
// menus.
|
60 |
'Advanced_Sidebar_Menu_Menus_Category' => 'Menus/Category.php',
|
61 |
'Advanced_Sidebar_Menu_Menus_Abstract' => 'Menus/Abstract.php',
|
62 |
'Advanced_Sidebar_Menu_Menus_Page' => 'Menus/Page.php',
|
69 |
spl_autoload_register( 'advanced_sidebar_menu_autoload' );
|
70 |
|
71 |
|
|
|
72 |
add_action( 'plugins_loaded', 'advanced_sidebar_menu_translate' );
|
73 |
+
/**
|
74 |
+
* Load translations
|
75 |
+
*
|
76 |
+
* @return void
|
77 |
+
*/
|
78 |
function advanced_sidebar_menu_translate() {
|
79 |
load_plugin_textdomain( 'advanced-sidebar-menu', false, 'advanced-sidebar-menu/languages' );
|
80 |
}
|
81 |
|
82 |
add_action( 'admin_print_scripts', 'advanced_sidebar_menu_script' );
|
83 |
+
/**
|
84 |
+
* Add js and css to the admin
|
85 |
+
*
|
86 |
+
* @return void
|
87 |
+
*/
|
88 |
function advanced_sidebar_menu_script() {
|
89 |
wp_enqueue_script(
|
90 |
apply_filters( 'asm_script', 'advanced-sidebar-menu-script' ),
|
91 |
plugins_url( 'resources/js/advanced-sidebar-menu.js', __FILE__ ),
|
92 |
array( 'jquery' ),
|
93 |
+
ADVANCED_SIDEBAR_BASIC_VERSION,
|
94 |
+
false
|
95 |
);
|
96 |
|
97 |
wp_enqueue_style(
|
98 |
apply_filters( 'asm_style', 'advanced-sidebar-menu-style' ),
|
99 |
plugins_url( 'resources/css/advanced-sidebar-menu.css', __FILE__ ),
|
100 |
array(),
|
101 |
+
ADVANCED_SIDEBAR_BASIC_VERSION,
|
102 |
+
false
|
103 |
);
|
104 |
}
|
105 |
|
111 |
/**
|
112 |
* Notify widget users about the PRO options
|
113 |
*
|
114 |
+
* @param array $instance - widget instance.
|
115 |
+
* @param WP_Widget $widget - widget class.
|
116 |
*
|
117 |
* @return void
|
118 |
*/
|
127 |
<strong>
|
128 |
<?php
|
129 |
/* translators: {<a>}{</a>} links to https://matlipe.com/product/advanced-sidebar-menu-pro/ */
|
130 |
+
printf( esc_html_x( 'Upgrade to %1$sAdvanced Sidebar Menu Pro%2$s for these features and so much more!', '{<a>}{</a>}', 'advanced-sidebar-menu' ), '<a target="blank" href="https://matlipe.com/product/advanced-sidebar-menu-pro/">', '</a>' );
|
131 |
+
?>
|
132 |
</strong>
|
133 |
<ol style="list-style: disc">
|
134 |
<li><?php esc_html_e( 'Priority support, including access to Members Only Support Area.', 'advanced-sidebar-menu' ); ?></li>
|
135 |
<li><?php esc_html_e( 'Accordion menu support.', 'advanced-sidebar-menu' ); ?></li>
|
136 |
<li><?php esc_html_e( 'Click and drag menu styling including bullets, colors, sizes, block styles, borders, and border colors.', 'advanced-sidebar-menu' ); ?></li>
|
137 |
<?php
|
138 |
+
// page widget options.
|
139 |
if ( 'advanced_sidebar_menu' === $widget->id_base ) {
|
140 |
?>
|
141 |
<li><?php esc_html_e( "Ability to customize each page's link text.", 'advanced-sidebar-menu' ); ?></li>
|
144 |
<li><?php esc_html_e( 'Ability to select and display custom post types.', 'advanced-sidebar-menu' ); ?></li>
|
145 |
<li><?php esc_html_e( 'Option to display the current page’s parents, grandparents, and children only, as well as siblings options.', 'advanced-sidebar-menu' ); ?></li>
|
146 |
<?php
|
147 |
+
// category widget options.
|
148 |
} else {
|
149 |
?>
|
150 |
<li><?php esc_html_e( 'Link ordering for the category widget.', 'advanced-sidebar-menu' ); ?></li>
|
151 |
<li><?php esc_html_e( 'Ability to select and display custom taxonomies.', 'advanced-sidebar-menu' ); ?></li>
|
152 |
+
<li><?php esc_html_e( 'Ability to display assigned posts or custom post types under categories.', 'advanced-sidebar-menu' ); ?></li>
|
153 |
<?php
|
154 |
}
|
155 |
?>
|
156 |
<li><?php esc_html_e( 'Ability to display the widgets everywhere the sidebar displays.', 'advanced-sidebar-menu' ); ?>
|
157 |
<strong> NEW</strong></li>
|
158 |
+
<li><?php esc_html_e( 'Support for custom navigation menus from Appearance -> Menus.', 'advanced-sidebar-menu' ); ?></li>
|
159 |
</ol>
|
160 |
<p>
|
161 |
</div>
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: menus, sidebar menu, hierarchy, category menu, pages menu
|
|
6 |
Requires at least: 4.6.0
|
7 |
Tested up to: 4.9.8
|
8 |
Requires PHP: 5.2.4
|
9 |
-
Stable tag: 7.4.
|
10 |
|
11 |
== Description ==
|
12 |
|
6 |
Requires at least: 4.6.0
|
7 |
Tested up to: 4.9.8
|
8 |
Requires PHP: 5.2.4
|
9 |
+
Stable tag: 7.4.1
|
10 |
|
11 |
== Description ==
|
12 |
|