Ticket #12562: page_comments.diff
File page_comments.diff, 3.0 KB (added by , 15 years ago) |
---|
-
wp-includes/default-widgets.php
103 103 $show_rating = isset($instance['rating']) ? $instance['rating'] : false; 104 104 $show_images = isset($instance['images']) ? $instance['images'] : true; 105 105 $category = isset($instance['category']) ? $instance['category'] : false; 106 106 $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'All Links' ) : $instance['title']); 107 107 108 if ( is_admin() && !$category ) { 108 109 // Display All Links widget as such in the widgets screen 109 echo $before_widget . $before_title. __('All Links'). $after_title . $after_widget;110 echo $before_widget . $before_title. $title . $after_title . $after_widget; 110 111 return; 111 112 } 112 113 113 $before_widget = preg_replace('/id="[^"]*"/','id="%id"', $before_widget); 114 115 echo $before_widget . $before_title. $title . $after_title; 116 114 117 wp_list_bookmarks(apply_filters('widget_links_args', array( 115 118 'title_before' => $before_title, 'title_after' => $after_title, 116 'category_before' => $before_widget, 'category_after' => $after_widget,119 'category_before' => '', 'category_after' => '', 117 120 'show_images' => $show_images, 'show_description' => $show_description, 118 121 'show_name' => $show_name, 'show_rating' => $show_rating, 119 122 'category' => $category, 'class' => 'linkcat widget' 120 123 ))); 124 125 echo $after_widget; 121 126 } 122 127 123 128 function update( $new_instance, $old_instance ) { … … 127 132 if ( isset($new_instance[$field]) ) 128 133 $instance[$field] = 1; 129 134 } 135 $instance['title'] = strip_tags($new_instance['title']); 130 136 $instance['category'] = intval($new_instance['category']); 131 137 132 138 return $instance; 133 139 } 134 140 135 141 function form( $instance ) { 136 142 $title = esc_attr( $instance['title'] ); 137 143 //Defaults 138 144 $instance = wp_parse_args( (array) $instance, array( 'images' => true, 'name' => true, 'description' => false, 'rating' => false, 'category' => false ) ); 139 145 $link_cats = get_terms( 'link_category'); 140 146 ?> 147 <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> 148 141 149 <p> 142 150 <label for="<?php echo $this->get_field_id('category'); ?>" class="screen-reader-text"><?php _e('Select Link Category'); ?></label> 143 151 <select class="widefat" id="<?php echo $this->get_field_id('category'); ?>" name="<?php echo $this->get_field_name('category'); ?>"> -
wp-admin/includes/schema.php
299 299 'close_comments_days_old' => 14, 300 300 'thread_comments' => 1, 301 301 'thread_comments_depth' => 5, 302 'page_comments' => 1,302 'page_comments' => 0, 303 303 'comments_per_page' => 50, 304 304 'default_comments_page' => 'newest', 305 305 'comment_order' => 'asc',