Ticket #8035: without_widgets.diff
File without_widgets.diff, 3.9 KB (added by , 15 years ago) |
---|
-
wp-content/themes/default/archive.php
28 28 <h2 class="pagetitle">Blog Archives</h2> 29 29 <?php } ?> 30 30 31 32 31 <div class="navigation"> 33 32 <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> 34 33 <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> -
wp-admin/includes/dashboard.php
127 127 wp_dashboard_trigger_widget_control( $meta_box['id'] ); 128 128 echo "<p class='submit'><input type='hidden' name='widget_id' value='$meta_box[id]' /><input type='submit' value='" . __( 'Submit' ) . "' /></p>"; 129 129 130 echo '</form>'; 130 echo '</form>'; 131 131 } 132 132 133 133 /** … … 159 159 /* Dashboard Widgets */ 160 160 161 161 function wp_dashboard_right_now() { 162 global $wp_registered_sidebars; 163 162 164 $num_posts = wp_count_posts( 'post' ); 163 165 $num_pages = wp_count_posts( 'page' ); 164 166 … … 253 255 echo "</tr>"; 254 256 do_action('right_now_table_end'); 255 257 echo "\n\t</table>\n\t</div>"; 256 258 257 259 echo "\n\t".'<div class="versions">'; 258 260 $ct = current_theme_info(); 259 261 $sidebars_widgets = wp_get_sidebars_widgets(); … … 261 263 $num = number_format_i18n( $num_widgets ); 262 264 263 265 echo "\n\t<p>"; 264 if ( current_user_can( 'switch_themes' ) ) { 265 echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; 266 printf(__ngettext('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num); 266 if ( $wp_registered_sidebars ) { 267 if ( current_user_can( 'switch_themes' ) ) { 268 echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; 269 printf(__ngettext('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num); 270 } else { 271 printf(__ngettext('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num); 272 } 267 273 } else { 268 printf(__ngettext('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num); 274 if ( current_user_can( 'switch_themes' ) ) { 275 echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; 276 printf('Theme <span class="b"><a href="themes.php">%1$s</a></span> without widgets', $ct->title); 277 } else { 278 printf('Theme <span class="b">%1$s</span> without widgets', $ct->title); 279 } 269 280 } 270 271 281 echo '</p>'; 272 282 273 283 update_right_now_message(); … … 295 305 'orderby' => 'modified', 296 306 'order' => 'DESC' 297 307 ) ); 298 308 299 309 if ( $drafts_query->posts ) 300 310 $drafts =& $drafts_query->posts; 301 311 } … … 745 755 */ 746 756 function wp_dashboard_trigger_widget_control( $widget_control_id = false ) { 747 757 global $wp_dashboard_control_callbacks; 748 758 749 759 if ( is_scalar($widget_control_id) && $widget_control_id && isset($wp_dashboard_control_callbacks[$widget_control_id]) && is_callable($wp_dashboard_control_callbacks[$widget_control_id]) ) { 750 760 call_user_func( $wp_dashboard_control_callbacks[$widget_control_id], '', array( 'id' => $widget_control_id, 'callback' => $wp_dashboard_control_callbacks[$widget_control_id] ) ); 751 761 }