Advanced Sidebar Menu - Version 4.3.3

Version Description

Download this release

Release Info

Developer Mat Lipe
Plugin Icon 128x128 Advanced Sidebar Menu
Version 4.3.3
Comparing to
See all releases

Code changes from version 4.3.2 to 4.3.3

advanced-sidebar-menu.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Advanced Sidebar Menu
4
  Plugin URI: http://lipeimagination.info/wordpress/advanced-sidebar-menu/
5
  Description: Creates dynamic menu based on child/parent relationship.
6
  Author: Mat Lipe
7
- Version: 4.3.2
8
  Author URI: http://lipeimagination.info
9
  Since: 6.13.13
10
  */
4
  Plugin URI: http://lipeimagination.info/wordpress/advanced-sidebar-menu/
5
  Description: Creates dynamic menu based on child/parent relationship.
6
  Author: Mat Lipe
7
+ Version: 4.3.3
8
  Author URI: http://lipeimagination.info
9
  Since: 6.13.13
10
  */
lib/advancedSidebarMenu.php CHANGED
@@ -4,7 +4,7 @@
4
  /**
5
  * These Functions are Specific to the Advanced Sidebar Menu
6
  * @author Mat Lipe
7
- * @since 6.13.13
8
  *
9
  * @package Advanced Sidebar Menu
10
  */
@@ -28,8 +28,7 @@ class advancedSidebarMenu{
28
  *
29
  * @param string $name - name of checkbox
30
  */
31
- function checked($name){
32
-
33
  if( isset( $this->instance[$name] ) && $this->instance[$name] == 'checked' ) return true;
34
 
35
  return false;
@@ -246,18 +245,12 @@ class advancedSidebarMenu{
246
 
247
  /**
248
  * Determines if all the children should be included
249
- * @since 5.19.13
250
  * @return bool
251
  */
252
  function display_all(){
253
 
254
- if( !isset( $this->instance['display_all'] ) ) return false;
255
-
256
- if( $this->instance['display_all'] == 'checked' ){
257
- return true;
258
- } else {
259
- return false;
260
- }
261
  }
262
 
263
  /**
@@ -293,25 +286,27 @@ class advancedSidebarMenu{
293
 
294
  /**
295
  * Determines if the parent page or cat should be included
296
- * @since 5.19.13
297
  * @return bool
298
  */
299
  function include_parent(){
300
- if( !isset( $this->instance['include_parent'] ) ) return false;
301
- if( ($this->instance['include_parent'] == 'checked') && (!in_array($this->top_id, $this->exclude)) ){
 
 
302
  return true;
303
- } else {
304
- return false;
305
  }
 
 
306
  }
307
 
308
 
309
  /**
310
  * Echos the title of the widget to the page
311
- * @since 5.31.13
312
  */
313
  function title(){
314
- if( $this->instance['title'] != '' ){
315
  $title = apply_filters('widget_title', $this->instance['title'], $this->args, $this->instance );
316
  $title = apply_filters('advanced_sidebar_menu_widget_title', $title, $this->args, $this->instance, $this );
317
 
4
  /**
5
  * These Functions are Specific to the Advanced Sidebar Menu
6
  * @author Mat Lipe
7
+ * @since 6.26.13
8
  *
9
  * @package Advanced Sidebar Menu
10
  */
28
  *
29
  * @param string $name - name of checkbox
30
  */
31
+ function checked($name){
 
32
  if( isset( $this->instance[$name] ) && $this->instance[$name] == 'checked' ) return true;
33
 
34
  return false;
245
 
246
  /**
247
  * Determines if all the children should be included
248
+ * @since 6.26.13
249
  * @return bool
250
  */
251
  function display_all(){
252
 
253
+ return $this->checked('display_all');
 
 
 
 
 
 
254
  }
255
 
256
  /**
286
 
287
  /**
288
  * Determines if the parent page or cat should be included
289
+ * @since 6.26.13
290
  * @return bool
291
  */
292
  function include_parent(){
293
+
294
+ if( !$this->checked('include_parent') ) return false;
295
+
296
+ if( (!in_array($this->top_id, $this->exclude)) ){
297
  return true;
 
 
298
  }
299
+
300
+ return false;
301
  }
302
 
303
 
304
  /**
305
  * Echos the title of the widget to the page
306
+ * @since 6.26.13
307
  */
308
  function title(){
309
+ if( isset( $this->instance['title']) && ($this->instance['title'] != '') ){
310
  $title = apply_filters('widget_title', $this->instance['title'], $this->args, $this->instance );
311
  $title = apply_filters('advanced_sidebar_menu_widget_title', $title, $this->args, $this->instance, $this );
312
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=paypa
4
  Tags: menus, sidebar menu, heirchy, category menu, pages menu
5
  Requires at least: 3.1
6
  Tested up to: 3.5.1
7
- Stable tag: 4.3.2
8
 
9
  Creates a widget for both page and categories that will display the current page/category and all child pages or categories.
10
 
4
  Tags: menus, sidebar menu, heirchy, category menu, pages menu
5
  Requires at least: 3.1
6
  Tested up to: 3.5.1
7
+ Stable tag: 4.3.3
8
 
9
  Creates a widget for both page and categories that will display the current page/category and all child pages or categories.
10
 
widgets/category.widget.php CHANGED
@@ -5,7 +5,7 @@
5
  * Creates a Widget of parent Child Categories
6
  *
7
  * @author mat lipe
8
- * @since 6.7.13
9
  * @package Advanced Sidebar Menu
10
  *
11
  */
@@ -138,7 +138,7 @@ class advanced_sidebar_menu_category extends WP_Widget {
138
  /**
139
  * Outputs the categories widget to the page
140
  *
141
- * @since 6.7.13
142
  * @uses loads the views/category_list.php
143
  *
144
  * @filters apply_filters('advanced_sidebar_menu_category_widget_output', $content, $args, $instance );
@@ -149,6 +149,23 @@ class advanced_sidebar_menu_category extends WP_Widget {
149
  */
150
  function widget($args, $instance) {
151
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  if( is_single() && !isset( $instance['single'] ) ) return;
153
  $asm = new advancedSidebarMenu;
154
  $asm->instance = $instance;
5
  * Creates a Widget of parent Child Categories
6
  *
7
  * @author mat lipe
8
+ * @since 6.26.13
9
  * @package Advanced Sidebar Menu
10
  *
11
  */
138
  /**
139
  * Outputs the categories widget to the page
140
  *
141
+ * @since 6.26.13
142
  * @uses loads the views/category_list.php
143
  *
144
  * @filters apply_filters('advanced_sidebar_menu_category_widget_output', $content, $args, $instance );
149
  */
150
  function widget($args, $instance) {
151
 
152
+ $defaults = array(
153
+ 'title' => '',
154
+ 'include_parent' => false,
155
+ 'include_childless_parent' => false,
156
+ 'css' => false,
157
+ 'single' => false,
158
+ 'new_widget' => 'widget',
159
+ 'exclude' => '',
160
+ 'legacy_mode' => false,
161
+ 'display_all' => false,
162
+ 'levels' => 1
163
+ );
164
+
165
+ $instance = wp_parse_args( $instance, $defaults);
166
+
167
+
168
+
169
  if( is_single() && !isset( $instance['single'] ) ) return;
170
  $asm = new advancedSidebarMenu;
171
  $asm->instance = $instance;
widgets/page.widget.php CHANGED
@@ -148,6 +148,7 @@ class advanced_sidebar_menu_page extends WP_Widget {
148
  function widget($args, $instance) {
149
  global $wpdb, $post, $table_prefix;
150
 
 
151
  $asm = new advancedSidebarMenu;
152
 
153
  $asm->instance = $instance;
148
  function widget($args, $instance) {
149
  global $wpdb, $post, $table_prefix;
150
 
151
+
152
  $asm = new advancedSidebarMenu;
153
 
154
  $asm->instance = $instance;