Ticket #16416: 16416.reading.diff
File 16416.reading.diff, 14.6 KB (added by , 11 years ago) |
---|
-
wp-admin/options-privacy.php
1 <?php2 /**3 * Privacy Options Settings Administration Screen.4 *5 * @package WordPress6 * @subpackage Administration7 */8 9 /** Load WordPress Administration Bootstrap */10 require_once('./admin.php');11 12 if ( ! current_user_can( 'manage_options' ) )13 wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );14 15 $title = __('Privacy Settings');16 $parent_file = 'options-general.php';17 18 get_current_screen()->add_help_tab( array(19 'id' => 'overview',20 'title' => __('Overview'),21 'content' => '<p>' . __('You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the radio button next to “Ask search engines not to index this site” and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.') . '</p>' .22 '<p>' . __('When this setting is in effect a reminder is shown in the Right Now box of the Dashboard that says, “Search Engines Blocked,” to remind you that your site is not being crawled.') . '</p>',23 ) );24 25 get_current_screen()->set_help_sidebar(26 '<p><strong>' . __('For more information:') . '</strong></p>' .27 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Privacy_Screen" target="_blank">Documentation on Privacy Settings</a>') . '</p>' .28 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'29 );30 31 include('./admin-header.php');32 ?>33 34 <div class="wrap">35 <?php screen_icon(); ?>36 <h2><?php echo esc_html( $title ); ?></h2>37 38 <form method="post" action="options.php">39 <?php settings_fields('privacy'); ?>40 41 <table class="form-table">42 <tr valign="top">43 <th scope="row"><?php _e( 'Site Visibility' ); ?> </th>44 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Site Visibility' ); ?> </span></legend>45 <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />46 <label for="blog-public"><?php _e( 'Allow search engines to index this site.' );?></label><br/>47 <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />48 <label for="blog-norobots"><?php _e( 'Ask search engines not to index this site.' ); ?></label>49 <p class="description"><?php _e( 'Note: Neither of these options blocks access to your site — it is up to search engines to honor your request.' ); ?></p>50 <?php do_action('blog_privacy_selector'); ?>51 </fieldset></td>52 </tr>53 <?php do_settings_fields('privacy', 'default'); ?>54 </table>55 56 <?php do_settings_sections('privacy'); ?>57 58 <?php submit_button(); ?>59 </form>60 61 </div>62 63 <?php include('./admin-footer.php') ?> -
wp-admin/includes/plugin.php
1624 1624 global $new_whitelist_options; 1625 1625 1626 1626 if ( 'misc' == $option_group ) { 1627 _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );1627 _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); 1628 1628 $option_group = 'general'; 1629 1629 } 1630 1630 1631 if ( 'privacy' == $option_group ) { 1632 _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); 1633 $option_group = 'reading'; 1634 } 1635 1631 1636 $new_whitelist_options[ $option_group ][] = $option_name; 1632 1637 if ( $sanitize_callback != '' ) 1633 1638 add_filter( "sanitize_option_{$option_name}", $sanitize_callback ); … … 1647 1652 global $new_whitelist_options; 1648 1653 1649 1654 if ( 'misc' == $option_group ) { 1650 _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );1655 _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); 1651 1656 $option_group = 'general'; 1652 1657 } 1653 1658 1659 if ( 'privacy' == $option_group ) { 1660 _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); 1661 $option_group = 'reading'; 1662 } 1663 1654 1664 $pos = array_search( $option_name, (array) $new_whitelist_options ); 1655 1665 if ( $pos !== false ) 1656 1666 unset( $new_whitelist_options[ $option_group ][ $pos ] ); -
wp-admin/includes/dashboard.php
392 392 } 393 393 echo '</p>'; 394 394 395 // Check if search engines are blocked.395 // Check if search engines are asked not to index this site. 396 396 if ( !is_network_admin() && !is_user_admin() && current_user_can('manage_options') && '1' != get_option('blog_public') ) { 397 397 $title = apply_filters('privacy_on_link_title', __('Your site is asking search engines not to index its content') ); 398 $content = apply_filters('privacy_on_link_text', __('Search Engines Blocked') );398 $content = apply_filters('privacy_on_link_text', __('Search Engines Discouraged') ); 399 399 400 echo "<p><a href='options- privacy.php' title='$title'>$content</a></p>";400 echo "<p><a href='options-reading.php' title='$title'>$content</a></p>"; 401 401 } 402 402 403 403 update_right_now_message(); … … 1260 1260 <h4><span class="icon16 icon-settings"></span> <?php _e( 'Basic Settings' ); ?></h4> 1261 1261 <p><?php _e( 'Here are a few easy things you can do to get your feet wet. Make sure to click Save on each Settings screen.' ); ?></p> 1262 1262 <ul> 1263 <li><?php echo sprintf( __( '<a href="%s">Choose your privacy setting</a>' ), esc_url( admin_url('options-privacy.php') ) ); ?></li>1264 1263 <li><?php echo sprintf( __( '<a href="%s">Select your tagline and time zone</a>' ), esc_url( admin_url('options-general.php') ) ); ?></li> 1265 1264 <li><?php echo sprintf( __( '<a href="%s">Turn comments on or off</a>' ), esc_url( admin_url('options-discussion.php') ) ); ?></li> 1266 1265 <li><?php echo sprintf( __( '<a href="%s">Fill in your profile</a>' ), esc_url( get_edit_profile_url( get_current_user_id() ) ) ); ?></li> -
wp-admin/includes/template.php
1040 1040 global $wp_settings_sections; 1041 1041 1042 1042 if ( 'misc' == $page ) { 1043 _deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );1043 _deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) ); 1044 1044 $page = 'general'; 1045 1045 } 1046 1046 1047 if ( 'privacy' == $page ) { 1048 _deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) ); 1049 $page = 'reading'; 1050 } 1051 1047 1052 if ( !isset($wp_settings_sections) ) 1048 1053 $wp_settings_sections = array(); 1049 1054 if ( !isset($wp_settings_sections[$page]) ) … … 1084 1089 $page = 'general'; 1085 1090 } 1086 1091 1092 if ( 'privacy' == $page ) { 1093 _deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) ); 1094 $page = 'reading'; 1095 } 1096 1087 1097 if ( !isset($wp_settings_fields) ) 1088 1098 $wp_settings_fields = array(); 1089 1099 if ( !isset($wp_settings_fields[$page]) ) -
wp-admin/menu.php
206 206 $submenu['options-general.php'][20] = array(__('Reading'), 'manage_options', 'options-reading.php'); 207 207 $submenu['options-general.php'][25] = array(__('Discussion'), 'manage_options', 'options-discussion.php'); 208 208 $submenu['options-general.php'][30] = array(__('Media'), 'manage_options', 'options-media.php'); 209 $submenu['options-general.php'][35] = array(__('Privacy'), 'manage_options', 'options-privacy.php');210 209 $submenu['options-general.php'][40] = array(__('Permalinks'), 'manage_options', 'options-permalink.php'); 211 210 212 211 $_wp_last_utility_menu = 80; // The index of the last top-level menu in the utility menu group -
wp-admin/options.php
62 62 'general' => array( 'blogname', 'blogdescription', 'gmt_offset', 'date_format', 'time_format', 'start_of_week', 'timezone_string' ), 63 63 'discussion' => array( 'default_pingback_flag', 'default_ping_status', 'default_comment_status', 'comments_notify', 'moderation_notify', 'comment_moderation', 'require_name_email', 'comment_whitelist', 'comment_max_links', 'moderation_keys', 'blacklist_keys', 'show_avatars', 'avatar_rating', 'avatar_default', 'close_comments_for_old_posts', 'close_comments_days_old', 'thread_comments', 'thread_comments_depth', 'page_comments', 'comments_per_page', 'default_comments_page', 'comment_order', 'comment_registration' ), 64 64 'media' => array( 'thumbnail_size_w', 'thumbnail_size_h', 'thumbnail_crop', 'medium_size_w', 'medium_size_h', 'large_size_w', 'large_size_h', 'image_default_size', 'image_default_align', 'image_default_link_type', 'embed_autourls', 'embed_size_w', 'embed_size_h' ), 65 'privacy' => array( 'blog_public' ), 66 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts' ), 65 'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ), 67 66 'writing' => array( 'default_post_edit_rows', 'use_smilies', 'default_category', 'default_email_category', 'use_balanceTags', 'default_link_category', 'default_post_format', 'enable_app', 'enable_xmlrpc' ), 68 'options' => array( '' ) ); 67 ); 68 $whitelist_options['misc'] = $whitelist_options['options'] = $whitelist_options['privacy'] = array(); 69 69 70 70 $mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass'); 71 71 $uploads_options = array('uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path'); … … 90 90 91 91 if ( apply_filters( 'enable_post_by_email_configuration', true ) ) 92 92 $whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options); 93 94 $whitelist_options[ 'misc' ] = array();95 93 } 96 94 97 95 $whitelist_options = apply_filters( 'whitelist_options', $whitelist_options ); -
wp-admin/options-reading.php
50 50 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>', 51 51 ) ); 52 52 53 get_current_screen()->add_help_tab( array( 54 'id' => 'site-visibility', 55 'title' => has_filter( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ), 56 'content' => '<p>' . __( 'You can choose whether or not your site will be crawled by robots, ping services, and spiders. If you want those services to ignore your site, click the radio button next to “Ask search engines not to index this site” and click the Save Changes button at the bottom of the screen. Note that your privacy is not complete; your site is still visible on the web.' ) . '</p>' . 57 '<p>' . __( 'When this setting is in effect a reminder is shown in the Right Now box of the Dashboard that says, “Search Engines Discouraged,” to remind you that your site is not being crawled.' ) . '</p>', 58 ) ); 59 53 60 get_current_screen()->set_help_sidebar( 54 61 '<p><strong>' . __('For more information:') . '</strong></p>' . 55 62 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_Screen" target="_blank">Documentation on Reading Settings</a>') . '</p>' . … … 63 70 <?php screen_icon(); ?> 64 71 <h2><?php echo esc_html( $title ); ?></h2> 65 72 66 <form name="form1"method="post" action="options.php">73 <form method="post" action="options.php"> 67 74 <?php 68 75 settings_fields( 'reading' ); 69 76 … … 132 139 </fieldset></td> 133 140 </tr> 134 141 142 <tr valign="top"> 143 <th scope="row"><?php has_filter( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th> 144 <td><fieldset><legend class="screen-reader-text"><span><?php has_filter( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend> 145 <?php if ( has_filter( 'blog_privacy_selector' ) ) : ?> 146 <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> 147 <label for="blog-public"><?php _e( 'Allow search engines to index this site.' );?></label><br/> 148 <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> /> 149 <label for="blog-norobots"><?php _e( 'Ask search engines not to index this site.' ); ?></label> 150 <p class="description"><?php _e( 'Note: Neither of these options blocks access to your site — it is up to search engines to honor your request.' ); ?></p> 151 <?php do_action('blog_privacy_selector'); ?> 152 <?php else : ?> 153 <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="1" <?php checked( '1', get_option( 'blog_public' ) ); ?> /> 154 <?php _e( 'Allow search engines to index this site' ); ?> 155 <p class="description"><?php _e( 'It is up to search engines to honor a request to not index this site.' ); ?></p> 156 <?php endif; ?> 157 </fieldset></td> 158 </tr> 159 135 160 <?php do_settings_fields( 'reading', 'default' ); ?> 136 161 </table> 137 162 -
wp-admin/options-writing.php
201 201 202 202 <?php else : ?> 203 203 204 <p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your site’s <a href="%s"> privacy settings</a>.'), 'options-privacy.php'); ?></p>204 <p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your site’s <a href="%s">visibility settings</a>.'), 'options-reading.php'); ?></p> 205 205 206 206 <?php endif; ?> 207 207 <?php } // multisite ?>