Advanced Sidebar Menu - Version 4.2.0

Version Description

  • Added Order By Selection in Page Widget
Download this release

Release Info

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

Code changes from version 4.1.4 to 4.2.0

advanced-sidebar-menu.php CHANGED
@@ -4,9 +4,9 @@ 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.1.4
8
  Author URI: http://lipeimagination.info
9
- Since: 5.23.13
10
  */
11
 
12
 
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.2.0
8
  Author URI: http://lipeimagination.info
9
+ Since: 5.28.13
10
  */
11
 
12
 
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 5.19.13
8
  *
9
  * @package Advanced Sidebar Menu
10
  */
@@ -276,11 +276,13 @@ class advancedSidebarMenu{
276
 
277
  /**
278
  * Echos the title of the widget to the page
279
- * @since 5.19.13
280
  */
281
  function title(){
282
  if( $this->instance['title'] != '' ){
283
  $title = apply_filters('widget_title', $this->instance['title'], $this->args, $this->instance );
 
 
284
  echo $this->args['before_title'] . $title . $this->args['after_title'];
285
  }
286
 
4
  /**
5
  * These Functions are Specific to the Advanced Sidebar Menu
6
  * @author Mat Lipe
7
+ * @since 5.28.13
8
  *
9
  * @package Advanced Sidebar Menu
10
  */
276
 
277
  /**
278
  * Echos the title of the widget to the page
279
+ * @since 5.28.13
280
  */
281
  function title(){
282
  if( $this->instance['title'] != '' ){
283
  $title = apply_filters('widget_title', $this->instance['title'], $this->args, $this->instance );
284
+ $title = apply_filters('advanced_sidebar_menu_widget_title', $title, $this->args, $this->instance, $this );
285
+
286
  echo $this->args['before_title'] . $title . $this->args['after_title'];
287
  }
288
 
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.1.4
8
 
9
  Creates a widget for both page and categories that will display the current page/category and all child pages or categories.
10
 
@@ -105,6 +105,10 @@ I do offer preminum services for buiding custom add-ons for additional functiona
105
 
106
 
107
  == Changelog ==
 
 
 
 
108
  = 4.0.0 =
109
  * Added support for an unlimited number of page levels
110
  * Change structure slightly for future enhancements
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.2.0
8
 
9
  Creates a widget for both page and categories that will display the current page/category and all child pages or categories.
10
 
105
 
106
 
107
  == Changelog ==
108
+
109
+ = 4.2.0 =
110
+ * Added Order By Selection in Page Widget
111
+
112
  = 4.0.0 =
113
  * Added support for an unlimited number of page levels
114
  * Change structure slightly for future enhancements
widgets/page.widget.php CHANGED
@@ -34,7 +34,7 @@ class advanced_sidebar_menu_page extends WP_Widget {
34
  *
35
  * @filters do_action('advanced_sidebar_menu_page_widget_form', $instance, $this->get_field_name('parent_only'), $this->get_field_id('parent_only'));
36
  *
37
- * @since 4.23.13
38
  */
39
  function form( $instance ) {
40
  ?>
@@ -49,8 +49,27 @@ class advanced_sidebar_menu_page extends WP_Widget {
49
 
50
  <p> Include Parent Even With No Children: <input id="<?php echo $this->get_field_id('include_childless_parent'); ?>"
51
  name="<?php echo $this->get_field_name('include_childless_parent'); ?>" type="checkbox" value="checked"
52
- <?php echo $instance['include_childless_parent']; ?>/></p>
53
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  <p> Use this Plugin's Styling: <input id="<?php echo $this->get_field_id('css'); ?>"
55
  name="<?php echo $this->get_field_name('css'); ?>" type="checkbox" value="checked"
56
  <?php echo $instance['css']; ?>/></p>
@@ -124,7 +143,7 @@ class advanced_sidebar_menu_page extends WP_Widget {
124
  * apply_filters('advanced_sidebar_menu_post_type', 'page', $args, $instance );
125
  *
126
  *
127
- * @since 5.19.13
128
  */
129
  function widget($args, $instance) {
130
  global $wpdb, $post, $table_prefix;
@@ -173,10 +192,10 @@ class advanced_sidebar_menu_page extends WP_Widget {
173
 
174
 
175
  //Filter for specifiying the order by
176
- $order_by = apply_filters('advanced_sidebar_menu_order_by', 'menu_order', $post, $args, $instance );
177
  $asm->order_by = $order_by;
178
 
179
-
180
  /**
181
  * Must be done this way to prevent doubling up of pages
182
  */
34
  *
35
  * @filters do_action('advanced_sidebar_menu_page_widget_form', $instance, $this->get_field_name('parent_only'), $this->get_field_id('parent_only'));
36
  *
37
+ * @since 5.28.13
38
  */
39
  function form( $instance ) {
40
  ?>
49
 
50
  <p> Include Parent Even With No Children: <input id="<?php echo $this->get_field_id('include_childless_parent'); ?>"
51
  name="<?php echo $this->get_field_name('include_childless_parent'); ?>" type="checkbox" value="checked"
52
+ <?php echo $instance['include_childless_parent']; ?>/>
53
+ </p>
54
+
55
+ <p> Order By: <select id="<?php echo $this->get_field_id('order_by'); ?>"
56
+ name="<?php echo $this->get_field_name('order_by'); ?>">
57
+ <?php
58
+
59
+ $order_by = array(
60
+ 'menu_order' => 'Page Order',
61
+ 'post_title' => 'Title',
62
+ 'post_date' => 'Published Date'
63
+ );
64
+
65
+ foreach( $order_by as $key => $order ){
66
+
67
+ printf('<option value="%s" %s>%s</option>', $key, selected($instance['order_by'], $key, false), $order );
68
+ }
69
+ ?>
70
+ </select>
71
+ </p>
72
+
73
  <p> Use this Plugin's Styling: <input id="<?php echo $this->get_field_id('css'); ?>"
74
  name="<?php echo $this->get_field_name('css'); ?>" type="checkbox" value="checked"
75
  <?php echo $instance['css']; ?>/></p>
143
  * apply_filters('advanced_sidebar_menu_post_type', 'page', $args, $instance );
144
  *
145
  *
146
+ * @since 5.28.13
147
  */
148
  function widget($args, $instance) {
149
  global $wpdb, $post, $table_prefix;
192
 
193
 
194
  //Filter for specifiying the order by
195
+ $order_by = apply_filters('advanced_sidebar_menu_order_by', $instance['order_by'], $post, $args, $instance );
196
  $asm->order_by = $order_by;
197
 
198
+
199
  /**
200
  * Must be done this way to prevent doubling up of pages
201
  */