Changeset 474151
- Timestamp:
- 12/12/2011 07:15:41 PM (14 years ago)
- Location:
- top-posts-pages-widget/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
top_posts_n_pages.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
top-posts-pages-widget/trunk/readme.txt
r474079 r474151 39 39 == Changelog == 40 40 41 = 0.4 = 42 43 * Add 'Show Home Page?' support to plugin 44 41 45 = 0.3 = 42 46 -
top-posts-pages-widget/trunk/top_posts_n_pages.php
r473732 r474151 31 31 $tpp_show_pages = $instance['show_pages']; 32 32 $tpp_show_attachments = $instance['show_attachments']; 33 $tpp_show_home = $instance['show_home']; 33 34 34 35 if ($tpp_widget_title == "") { … … 42 43 if ($tpp_show_attachments == "") { 43 44 $tpp_show_attachments = "off"; 45 } 46 47 if ($tpp_show_home == "") { 48 $tpp_show_home = "off"; 44 49 } 45 50 … … 67 72 if ( $tpp_show_attachments == "off" ) { 68 73 if( $top_post_id->post_type == "attachment" ) continue; 74 } 75 76 if ( $tpp_show_home == "off" ) { 77 if( $top_post['post_title'] == "Home page" ) continue; 69 78 } ?> 70 79 … … 87 96 $instance['show_pages'] = strip_tags(empty($new_instance['show_pages']) ? 'on' : apply_filters('show_pages', $new_instance['show_pages'])); 88 97 $instance['show_attachments'] = strip_tags(empty($new_instance['show_attachments']) ? 'off' : apply_filters('show_attachments', $new_instance['show_attachments'])); 98 $instance['show_home'] = strip_tags(empty($new_instance['show_home']) ? 'off' : apply_filters('show_home', $new_instance['show_home'])); 89 99 return $instance; 90 100 } … … 95 105 $tpp_show_pages = $instance['show_pages']; 96 106 $tpp_show_attachments = $instance['show_attachments']; 107 $tpp_show_home = $instance['show_home']; 97 108 98 109 if ($tpp_widget_title == "") { … … 106 117 if ($tpp_show_attachments == "") { 107 118 $tpp_show_attachments = "off"; 119 } 120 121 if ($tpp_show_home == "") { 122 $tpp_show_home = "off"; 108 123 } 109 124 … … 126 141 <label for="<?php echo $this->get_field_id('show_attachments'); ?>"><?php _e('Show attachments?', 'top-posts-n-pages-widget')?></label></p> 127 142 143 <p><input class="checkbox" type="checkbox" <?php if ("$tpp_show_home" == "on" ){echo 'checked="checked"';} ?> id="<?php echo $this->get_field_id('show_home'); ?>" name="<?php echo $this->get_field_name('show_home'); ?>" /> 144 <label for="<?php echo $this->get_field_id('show_home'); ?>"><?php _e('Show Home Page?', 'top-posts-n-pages-widget')?></label></p> 145 128 146 <p><?php _e( 'Top Posts & Pages are calculated from WordPress.com stats plugin for that last 7 days. So, they take a while to change.', 'top-posts-n-pages-widget'); ?></p><?php 129 147
Note: See TracChangeset
for help on using the changeset viewer.