Changeset 684879
- Timestamp:
- 03/20/2013 06:04:54 PM (13 years ago)
- Location:
- child-page-navigation
- Files:
-
- 3 added
- 2 edited
-
tags/1.3.2 (added)
-
tags/1.3.2/child-page-navigation.php (added)
-
tags/1.3.2/readme.txt (added)
-
trunk/child-page-navigation.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
child-page-navigation/trunk/child-page-navigation.php
r684872 r684879 6 6 Author: ITS Alaska 7 7 Author URI: http://ITSCanFixThat.com/ 8 Version: 1.3. 18 Version: 1.3.2 9 9 10 10 This program is free software: you can redistribute it and/or modify … … 31 31 } 32 32 33 function form(){ 34 $opts = get_option('widget_theme_navigation'); 35 36 $key = array_keys(array_flip($opts)); 37 unset($key['_multiwidget']); 38 var_dump($key); 39 ?> 40 <p>Title: <input name="cpn_title" id="cpn_title" type="text" <?php if(isset($opts[$key]['title']) && $opts[$key]['title'] != "") echo 'value="'.$opts[$key]['title'].'"'; ?> /></p> 41 <p>Sort by Sort Order? <input name="cpn_sort" id="cpn_sort" type="checkbox" <?php if(isset($opts[$key]['sort']) && $opts[$key]['sort']) echo 'checked="checked"'; ?> value="1" /></p> 33 function form($instance){ 34 $instance['tiutle'] = apply_filters( 'widget_title', $instance['title'] ); ?> 35 <p>Title: <input name="cpn_title" id="cpn_title" type="text" <?php if(isset($instance['title']) && $instance['title'] != "") echo 'value="'.$instance['title'].'"'; ?> /></p> 36 <p>Sort by Sort Order? <input name="cpn_sort" id="cpn_sort" type="checkbox" <?php if(isset($instance['sort']) && $instance['sort']) echo 'checked="checked"'; ?> value="1" /></p> 42 37 <?php } 43 38 … … 57 52 } 58 53 59 function widget($args ){54 function widget($args,$instance){ 60 55 global $post; 61 $opts = get_option('widget_theme_navigation'); 62 63 $key = array_keys($opts); 64 unset($key['_multiwidget']); 65 $key = array_pop($key); 56 $instance['title'] = apply_filters( 'widget_title', $instance['title'] ); 66 57 67 58 $page_arr = array('child_of' => $post->ID, 'parent' => $post->ID); … … 81 72 echo $args['before_widget']; 82 73 83 if(isset($ opts[$key]['title']) && $opts[$key]['title'] != "")84 echo $args['before_title'].$ opts[$key]['title'].$args['after_title'];74 if(isset($instance['title']) && $instance['title'] != "") 75 echo $args['before_title'].$instance['title'].$args['after_title']; 85 76 86 77 echo "<ul>"; -
child-page-navigation/trunk/readme.txt
r684872 r684879 21 21 == Changelog == 22 22 23 = 1.3.2 = 24 * Fixed bug to allow for having different settings on different instances of the widget 25 23 26 = 1.3.1 = 24 27 * Fixed weird bug where some users couldn't update their widget … … 26 29 = 1.3 = 27 30 * Added option in widget to sort by page sort order 28 * Recoded ~ File size went from 4,152 byts to 2,893 bytes31 * Recoded ~ File size reduced by 30% 29 32 30 33 = 1.2.1 =
Note: See TracChangeset
for help on using the changeset viewer.