Changeset 1254101
- Timestamp:
- 09/26/2015 07:54:36 PM (11 years ago)
- Location:
- sf-bootstrap-menu/trunk
- Files:
-
- 3 edited
-
readme.txt (modified) (1 diff)
-
sf-menu-widget.php (modified) (6 diffs)
-
sf-menu.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sf-bootstrap-menu/trunk/readme.txt
r1242671 r1254101 23 23 * Multiple menu instances with different parent pages 24 24 * Supports up to 3 levels 25 * Mute top-level pages 25 26 26 27 == Installation == -
sf-bootstrap-menu/trunk/sf-menu-widget.php
r1242643 r1254101 1 1 <?php 2 3 4 2 5 3 class SfMenuWidget extends WP_Widget … … 11 9 $this->defaults = array( 12 10 'title' => '', 11 'show_root' => true, 13 12 'child_of' => '', 14 13 'exclude' => '', 15 14 'sort_column' => '', 16 'sort_order' => ' ',15 'sort_order' => 'ASC', 17 16 'post_status' => '', 18 17 'title_color' => '#505050', … … 91 90 $pageids = array(); 92 91 foreach($my_includes as $parent) { 93 array_push($pageids, $parent); 92 93 if (isset($args['show_root']) && $args['show_root'] == 'yes') { 94 array_push($pageids, $parent); 95 } 94 96 95 97 $args_child=array( … … 134 136 $known_params = $this->known_params(0); 135 137 foreach ($known_params as $param) { 136 if ( strlen($instance[$param])) {138 if (isset($instance[$param]) && strlen($instance[$param])) { 137 139 $page_options[$param] = $instance[$param]; 138 140 } … … 163 165 'child_of' => array('title' => __("Root pages:", $tdom), 164 166 'desc' => __("List of root page IDs to show", $tdom)), 167 'show_root' => array('title' => __("Show top-level pages:", $tdom), 168 'type' => 'checkbox'), 165 169 'exclude' => array('title' => __("Exclude pages:", $tdom), 166 170 'desc' => __("List of page IDs to exclude", $tdom)), … … 225 229 $checkval=''; 226 230 $desc = ''; 227 if (isset($option['desc']) && $option['desc']) 231 if (isset($option['desc']) && $option['desc']) { 228 232 $desc = '<br /><small>' . __($option['desc'], $tdom) . '</small>'; 233 } 229 234 230 235 if (!isset($option['type'])) { 231 $option['type'] = 'text'; 236 $option['type'] = ''; 237 } 238 239 switch ($option['type']) { 240 case 'checkbox': 241 if ($instance[$option_name]) // special HTML and override value 242 $checkval = 'checked="yes" '; 243 $param_display[$option_name] = 'yes'; 244 break; 245 case '': 246 $option['type'] = 'text'; 247 break; 232 248 } 233 249 -
sf-bootstrap-menu/trunk/sf-menu.php
r1252004 r1254101 4 4 * Plugin URI: http://studiofreya.com/sf-bootstrap-menu 5 5 * Description: Responsive menu for pages and posts with Bootstrap 3.0 6 * Version: 1. 16 * Version: 1.2 7 7 * Author: Studiofreya AS 8 8 * Author URI: http://studiofreya.com
Note: See TracChangeset
for help on using the changeset viewer.