Changeset 1503345
- Timestamp:
- 09/27/2016 06:25:34 AM (10 years ago)
- Location:
- sf-bootstrap-menu
- Files:
-
- 26 added
- 2 edited
-
tags/2.2 (added)
-
tags/2.2/css (added)
-
tags/2.2/css/bootstrap.min.css (added)
-
tags/2.2/css/font-awesome.min.css (added)
-
tags/2.2/css/style.css (added)
-
tags/2.2/css/style.min.css (added)
-
tags/2.2/fonts (added)
-
tags/2.2/fonts/FontAwesome.otf (added)
-
tags/2.2/fonts/fontawesome-webfont.eot (added)
-
tags/2.2/fonts/fontawesome-webfont.svg (added)
-
tags/2.2/fonts/fontawesome-webfont.ttf (added)
-
tags/2.2/fonts/fontawesome-webfont.woff (added)
-
tags/2.2/fonts/fontawesome-webfont.woff2 (added)
-
tags/2.2/fonts/glyphicons-halflings-regular.ttf (added)
-
tags/2.2/fonts/glyphicons-halflings-regular.woff (added)
-
tags/2.2/fonts/glyphicons-halflings-regular.woff2 (added)
-
tags/2.2/js (added)
-
tags/2.2/js/bootstrap.min.js (added)
-
tags/2.2/languages (added)
-
tags/2.2/languages/sf-bootstrap-menu-en_EN.mo (added)
-
tags/2.2/languages/sf-bootstrap-menu-en_EN.po (added)
-
tags/2.2/readme.txt (added)
-
tags/2.2/sf-menu-widget.php (added)
-
tags/2.2/sf-menu.php (added)
-
tags/2.2/sf-navwalker-horizontal.php (added)
-
tags/2.2/sf-navwalker.php (added)
-
trunk/readme.txt (modified) (4 diffs)
-
trunk/sf-menu-widget.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sf-bootstrap-menu/trunk/readme.txt
r1494737 r1503345 12 12 SF Bootstrap Menu is an easy customizable widget to show hierarchical pages. The menu uses the latest Bootstrap 3.0 framework and provides responsive design for desktops, phones and tablets. 13 13 14 [Plugin website](http ://studiofreya.com/wordpress/wordpress-plugins/sf-bootstrap-menu/)14 [Plugin website](https://studiofreya.com/wordpress/sf-bootstrap-menu/) 15 15 16 16 The plugin allows the user to insert the widget into any widget area. … … 25 25 * Supports up to 3 levels 26 26 * Mute top-level pages 27 28 This plugin was created to suit the SF Parent theme. 27 * Expanded vertical menus. These can be used for online books like our <a href="https://studiofreya.com/cpp/concepts/">C++ Concepts book</a>. 29 28 30 29 == Installation == … … 37 36 == Frequently Asked Questions == 38 37 39 [SF Bootstrap Menu FAQ](http ://studiofreya.com/wordpress/wordpress-plugins/sf-bootstrap-menu/faq/)38 [SF Bootstrap Menu FAQ](https://studiofreya.com/wordpress/sf-bootstrap-menu/faq/) 40 39 41 40 … … 45 44 3. Horizontal and vertical menus on one page 46 45 47 [...more screenshots](http ://studiofreya.com/wordpress-plugins/sf-bootstrap-menu/screenshots/)46 [...more screenshots](https://studiofreya.com/wordpress/sf-bootstrap-menu/screenshots/) 48 47 49 48 == ChangeLog == 50 49 51 [SF Bootstrap Menu Changelog](http ://studiofreya.com/wordpress/wordpress-plugins/sf-bootstrap-menu/changelog/)50 [SF Bootstrap Menu Changelog](https://studiofreya.com/wordpress/sf-bootstrap-menu/changelog/) 52 51 53 52 == Upgrade Notice == -
sf-bootstrap-menu/trunk/sf-menu-widget.php
r1494737 r1503345 55 55 if (!empty($my_includes)) { 56 56 foreach($my_includes as $parent) { 57 58 57 if (isset($args['show_root']) && $args['show_root'] == 'yes') { 59 58 array_push($pageids, $parent); … … 61 60 62 61 $args_child=array( 63 'child_of' => $parent 62 'post_type' => 'page', 63 'post_parent' => $parent, 64 'orderby' => 'menu_order', 65 'order' => 'ASC', 64 66 ); 65 $pages = get_pages($args_child); 66 67 foreach ($pages as $page) { 68 array_push($pageids, $page->ID); 67 $child_pages = new WP_Query( $args_child ); 68 69 while ( $child_pages->have_posts() ) { 70 $child_pages->the_post(); 71 $r = get_the_ID(); 72 //echo "pp: $r, "; 73 array_push($pageids, $r); 69 74 } 75 70 76 } 71 77 } … … 82 88 <?php 83 89 90 if($args['expanded'] == true) { 91 $this->show_expanded($pageids); 92 93 return $output; 94 } 84 95 85 96 if (!empty($pageids)) { … … 90 101 'include' => $pageids, 91 102 'exclude' => $args['exclude'], 92 'walker' => new sf_bootstrap_walker_page( $args['expanded'])103 'walker' => new sf_bootstrap_walker_page() 93 104 ) ); 94 105 … … 98 109 'sort_order' => $args['sort_order'], 99 110 'exclude' => $args['exclude'], 100 'walker' => new sf_bootstrap_walker_page( $args['expanded'])111 'walker' => new sf_bootstrap_walker_page() 101 112 ) ); 102 113 } … … 104 115 return $output; 105 116 } 117 118 function show_expanded($pageids) { 119 echo '<ul class="child_page_row">'; 120 foreach($pageids as $p) { 121 echo $this->show_children_of_expanded($p); 122 } 123 echo '</ul>'; 124 } 125 126 function show_children_of_expanded($id) { 127 128 $this->list_page($id); 129 130 global $post; 131 $child_pages_query_args = array( 132 'post_type' => 'page', 133 'child_of' => $id, 134 'orderby' => 'menu_order', 135 'order' => 'ASC', 136 ); 137 138 $child_pages = get_pages( $child_pages_query_args ); 139 140 $c = count($child_pages); 141 if ( $child_pages && $c > 0) : 142 143 echo '<ul class="always-open">'; 144 foreach($child_pages as $page) { 145 $this->list_page($page->ID); 146 //$this->show_children_of_expanded($page); 147 } 148 echo '</ul>'; 149 endif; 150 wp_reset_postdata(); 151 } 152 153 function list_page($p) { 154 global $post; 155 $class_names = ""; 156 157 $r = $post->ID; 158 $rr = $p; 159 //echo "r: $r, rr: $rr"; 160 161 if($post->ID == $p) { 162 $class_names .= ' active'; 163 } 164 165 echo '<li class="'. $class_names .'"><a href="'; 166 echo get_permalink($p); 167 echo '">'; 168 echo get_the_title($p); 169 echo '</a></li>'; 170 } 171 106 172 107 173 function list_horizontal($args = '') {
Note: See TracChangeset
for help on using the changeset viewer.