WordPress.org

Make WordPress Core

Ticket #16416: 16416.5.diff

File 16416.5.diff, 7.1 KB (added by mbijon, 3 years ago)

Moves private/public setting to Reading Options

  • wp-admin/options-reading.php

     
    4141} 
    4242add_action('admin_head', 'add_js'); 
    4343 
    44 add_contextual_help($current_screen, 
    45         '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' . 
    46         '<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>' . 
    47         '<p>' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display, whether to show full text or a summary, and the character set encoding.') . '</p>' . 
    48         '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' . 
    49         '<p><strong>' . __('For more information:') . '</strong></p>' . 
     44/* 
     45 * Contextual help for 'Search Visibility' option 
     46 * 
     47 * Updated format in 3.3. From: http://core.trac.wordpress.org/ticket/18690 
     48 * 
     49 */ 
     50$reading_settings_info  = '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>'; 
     51$reading_settings_info .= '<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>'; 
     52$reading_settings_info .= '<p>' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display, whether to show full text or a summary, and the character set encoding.') . '</p>'; 
     53$reading_settings_info .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>'; 
     54 
     55$current_screen->add_help_tab( array( 
     56        'id'      => 'reading-settings-info', 
     57        'title'   => __('Reading Settings Info'), 
     58        'content' => $reading_settings_info 
     59) ); 
     60 
     61$search_indexing  = '<p>' . __('<strong>Search Engine Visibility</strong> - You can choose whether or not your site will be crawled by robots, ping services, and spiders.') ; '<p>'; 
     62$search_indexing .= '<p>' . __('If you want those services to ignore your site, click the second option here. When the second option is selected most major search services will not include your site in their results. Note that this is not a security setting; your site is still visible on the web.') . '</p>'; 
     63$search_indexing .= '<p>' . __('When this setting is in effect a reminder is shown in the Right Now box of the Dashboard that says, &#8220;Search Engines Blocked,&#8221; to remind you that your site is not being crawled.') . '</p>'; 
     64$search_indexing .= '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>'; 
     65 
     66$current_screen->add_help_tab( array( 
     67        'id'      => 'search-indexing-info', 
     68        'title'   => __('Search Indexing Info'), 
     69        'content' => $search_indexing 
     70) ); 
     71 
     72$current_screen->add_help_sidebar( 
     73        '<p><strong>' . __('Reading Settings info:') . '</strong></p>' . 
    5074        '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_Screen" target="_blank">Documentation on Reading Settings</a>') . '</p>' . 
     75        '<p><strong>' . __('Search Indexing info:') . '</strong></p>' . 
     76        '<p>' . __('<a href="http://codex.wordpress.org/Settings_Privacy_Screen" target="_blank">Documentation on Privacy Settings</a>') . '</p>' . 
     77        '<p>' . __('<a href="http://en.wikipedia.org/wiki/Robots.txt" target="_blank">About search indexing &amp; Privacy</a>') . '</p>' . 
     78        '<p><strong>' . __('For more info and questions:') . '</strong></p>' . 
    5179        '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 
    5280); 
    5381 
     
    120148<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option( 'blog_charset' ); ?>" class="regular-text" /> 
    121149<span class="description"><?php _e( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (UTF-8 is recommended, if you are adventurous there are some <a href="http://en.wikipedia.org/wiki/Character_set">other encodings</a>)' ); ?></span></td> 
    122150</tr> 
     151 
     152<tr valign="top"> 
     153<th scope="row"><?php _e( 'Search Engine Visibility' ); ?> </th> 
     154<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Search Engine Visibility' ); ?> </span></legend> 
     155<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> /> 
     156<label for="blog-public"><?php _e( 'Allow search engines to index this site.' );?></label><br/> 
     157<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> /> 
     158<label for="blog-norobots"><?php _e( 'Ask search engines not to index this site.' ); ?></label> 
     159<p class="description"><?php _e( 'Note: Neither of these options blocks access to your site &mdash; it is up to search engines to honor your request. Refer to the &#8216;Help&#8217; tab for more information.' ); ?></p> 
     160<?php do_action('blog_privacy_selector'); ?> 
     161</fieldset></td> 
     162</tr> 
    123163<?php do_settings_fields( 'reading', 'default' ); ?> 
    124164</table> 
    125165 
  • wp-admin/options.php

     
    6363        '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' ), 
    6464        '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' ), 
    6565        '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' ), 
     66        'reading' => array( 'posts_per_page', 'posts_per_rss', 'rss_use_excerpt', 'blog_charset', 'show_on_front', 'page_on_front', 'page_for_posts', 'blog_public' ), 
    6767        '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' ), 
    6868        'options' => array( '' ) ); 
    6969