Changeset 10797
- Timestamp:
- 03/16/2009 10:45:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/default-widgets.php
r10796 r10797 239 239 <?php 240 240 } 241 }242 243 /**244 * Display meta widget.245 *246 * Displays log in/out, RSS feed links, etc.247 *248 * @since 2.2.0249 *250 * @param array $args Widget arguments.251 */252 function wp_widget_meta($args) {253 extract($args);254 $options = get_option('widget_meta');255 $title = empty($options['title']) ? __('Meta') : apply_filters('widget_title', $options['title']);256 ?>257 <?php echo $before_widget; ?>258 <?php echo $before_title . $title . $after_title; ?>259 <ul>260 <?php wp_register(); ?>261 <li><?php wp_loginout(); ?></li>262 <li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo attribute_escape(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>263 <li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo attribute_escape(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>264 <li><a href="http://wordpress.org/" title="<?php echo attribute_escape(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>265 <?php wp_meta(); ?>266 </ul>267 <?php echo $after_widget; ?>268 <?php269 }270 271 /**272 * Display and process meta widget options form.273 *274 * @since 2.2.0275 */276 function wp_widget_meta_control() {277 $options = $newoptions = get_option('widget_meta');278 if ( isset($_POST["meta-submit"]) ) {279 $newoptions['title'] = strip_tags(stripslashes($_POST["meta-title"]));280 }281 if ( $options != $newoptions ) {282 $options = $newoptions;283 update_option('widget_meta', $options);284 }285 $title = attribute_escape($options['title']);286 ?>287 <p><label for="meta-title"><?php _e('Title:'); ?> <input class="widefat" id="meta-title" name="meta-title" type="text" value="<?php echo $title; ?>" /></label></p>288 <input type="hidden" id="meta-submit" name="meta-submit" value="1" />289 <?php290 241 } 291 242 … … 1386 1337 new WP_Widget_Links(); 1387 1338 1388 //$widget_ops = array('classname' => 'widget_meta', 'description' => __( "Log in/out, admin, feed and WordPress links") );1389 //wp_register_sidebar_widget('meta', __('Meta'), 'wp_widget_meta', $widget_ops);1390 //wp_register_widget_control('meta', __('Meta'), 'wp_widget_meta_control' );1391 1339 new WP_Widget_Meta(); 1392 1340
Note: See TracChangeset
for help on using the changeset viewer.