Changeset 1735786
- Timestamp:
- 09/25/2017 07:51:53 PM (9 years ago)
- Location:
- sf-bootstrap-menu/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (1 diff)
-
sf-menu-widget.php (modified) (5 diffs)
-
sf-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sf-bootstrap-menu/trunk/readme.txt
r1664221 r1735786 3 3 Tags: child, pages, hierarchical, menu, sidebar, horizontal, top, bootstrap, responsive, list 4 4 Requires at least: 3.8 5 Tested up to: 4. 7.55 Tested up to: 4.8.2 6 6 Stable tag: trunk 7 7 -
sf-bootstrap-menu/trunk/sf-menu-widget.php
r1665301 r1735786 11 11 'alignment' => '1', 12 12 'show_root' => true, 13 'show_root_only' => false, 13 14 'expanded' => false, 14 15 'child_of' => '', … … 56 57 if (!empty($my_includes)) { 57 58 foreach($my_includes as $parent) { 58 if (isset($args['show_root']) && $args['show_root'] == 'yes') { 59 if ((isset($args['show_root']) && $args['show_root'] == 'yes') 60 || (isset($args['show_root_only']) && $args['show_root_only'] == 'yes')){ 59 61 array_push($pageids, $parent); 60 62 } 61 63 62 $args_child=array( 63 'post_type' => 'page', 64 'post_parent' => $parent, 65 'orderby' => 'menu_order', 66 'order' => 'ASC', 67 ); 68 $child_pages = new WP_Query( $args_child ); 69 70 while ( $child_pages->have_posts() ) { 71 $child_pages->the_post(); 72 $r = get_the_ID(); 73 //echo "pp: $r, "; 74 array_push($pageids, $r); 64 if(!isset($args['show_root_only']) || $args['show_root_only'] == 'no') { 65 $args_child=array( 66 'post_type' => 'page', 67 'post_parent' => $parent, 68 'orderby' => 'menu_order', 69 'order' => 'ASC', 70 ); 71 $child_pages = new WP_Query( $args_child ); 72 73 while ( $child_pages->have_posts() ) { 74 $child_pages->the_post(); 75 $r = get_the_ID(); 76 //echo "pp: $r, "; 77 array_push($pageids, $r); 78 } 75 79 } 76 80 … … 189 193 foreach($my_includes as $parent) { 190 194 191 if (isset($args['show_root']) && $args['show_root'] == 'yes') { 195 if ((isset($args['show_root']) && $args['show_root'] == 'yes') 196 || (isset($args['show_root_only']) && $args['show_root_only'] == 'yes')){ 192 197 array_push($pageids, $parent); 193 198 } 194 199 195 $args_child=array( 196 'child_of' => $parent 197 ); 198 $pages = get_pages($args_child); 199 200 foreach ($pages as $page) { 201 array_push($pageids, $page->ID); 200 if(!isset($args['show_root_only']) || $args['show_root_only'] == 'no') { 201 $args_child=array( 202 'child_of' => $parent 203 ); 204 $pages = get_pages($args_child); 205 206 foreach ($pages as $page) { 207 array_push($pageids, $page->ID); 208 } 202 209 } 203 210 } … … 309 316 'desc' => __("List of root page IDs to show", $tdom)), 310 317 'show_root' => array('title' => __("Show top-level pages:", $tdom), 318 'type' => 'checkbox'), 319 'show_root_only' => array('title' => __("Show top-level pages only:", $tdom), 311 320 'type' => 'checkbox'), 312 321 'expanded' => array('title' => __("Always expanded:", $tdom), … … 388 397 389 398 if(!is_writable($path)) { 390 $instance['error'] = "Could not save dynamic css file. Required plugin path ($path) is not writable. We need it to store dynamic CSS file.";399 $instance['error'] = "Could not save dynamic css file. Required plugin path ($path) is not writable. We need it to store the dynamic CSS file."; 391 400 } 392 401 -
sf-bootstrap-menu/trunk/sf-menu.php
r1664221 r1735786 4 4 * Plugin URI: https://studiofreya.com/sf-bootstrap-menu 5 5 * Description: Responsive menu for child pages with Bootstrap 3.0 6 * Version: 2. 36 * Version: 2.4 7 7 * Author: Studiofreya AS 8 8 * Author URI: https://studiofreya.com
Note: See TracChangeset
for help on using the changeset viewer.