wp/wp-admin/options-reading.php
author ymh <ymh.work@gmail.com>
Wed, 06 Nov 2013 03:21:17 +0000
changeset 0 d970ebf37754
child 5 5e2f62d02dcd
permissions -rw-r--r--
first import
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
 * Reading settings administration panel.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
 * @package WordPress
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
 * @subpackage Administration
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
/** WordPress Administration Bootstrap */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
require_once( dirname( __FILE__ ) . '/admin.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
if ( ! current_user_can( 'manage_options' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    13
	wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
$title = __( 'Reading Settings' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
$parent_file = 'options-general.php';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
 * Display JavaScript on the page.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
 * @since 3.5.0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
function options_reading_add_js() {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
<script type="text/javascript">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
//<![CDATA[
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
	jQuery(document).ready(function($){
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
		var section = $('#front-static-pages'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
			staticPage = section.find('input:radio[value="page"]'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
			selects = section.find('select'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
			check_disabled = function(){
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
				selects.prop( 'disabled', ! staticPage.prop('checked') );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
			};
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
		check_disabled();
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
 		section.find('input:radio').change(check_disabled);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
	});
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
//]]>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
</script>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
add_action('admin_head', 'options_reading_add_js');
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
 * Render the blog charset setting.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
 * @since 3.5.0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
function options_reading_blog_charset() {
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
	echo '<input name="blog_charset" type="text" id="blog_charset" value="' . esc_attr( get_option( 'blog_charset' ) ) . '" class="regular-text" />';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
	echo '<p class="description">' . __( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (UTF-8 is recommended)' ) . '</p>';
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
}
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
	'id'      => 'overview',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
	'title'   => __('Overview'),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
	'content' => '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
		'<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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
		'<p>' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display and whether to show full text or a summary.') . '</p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
		'<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
get_current_screen()->add_help_tab( array(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
	'id'      => 'site-visibility',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
	'title'   => has_action( 'blog_privacy_selector' ) ? __( 'Site Visibility' ) : __( 'Search Engine Visibility' ),
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
	'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 checkbox next to &#8220;Discourage search engines from indexing this site&#8221; 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>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
		'<p>' . __( 'When this setting is in effect, a reminder is shown in the Right Now box of the Dashboard that says, &#8220;Search Engines Discouraged,&#8221; to remind you that your site is not being crawled.' ) . '</p>',
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
get_current_screen()->set_help_sidebar(
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
	'<p><strong>' . __('For more information:') . '</strong></p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
	'<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_Screen" target="_blank">Documentation on Reading Settings</a>') . '</p>' .
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
	'<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
);
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
include( ABSPATH . 'wp-admin/admin-header.php' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
<div class="wrap">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
<?php screen_icon(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
<h2><?php echo esc_html( $title ); ?></h2>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
<form method="post" action="options.php">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
settings_fields( 'reading' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
if ( ! in_array( get_option( 'blog_charset' ), array( 'utf8', 'utf-8', 'UTF8', 'UTF-8' ) ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
	add_settings_field( 'blog_charset', __( 'Encoding for pages and feeds' ), 'options_reading_blog_charset', 'reading', 'default', array( 'label_for' => 'blog_charset' ) );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
<?php if ( ! get_pages() ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
<input name="show_on_front" type="hidden" value="posts" />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
	if ( 'posts' != get_option( 'show_on_front' ) ) :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
		update_option( 'show_on_front', 'posts' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
	endif;
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
else :
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
	if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
		update_option( 'show_on_front', 'posts' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
<table class="form-table">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
<th scope="row"><?php _e( 'Front page displays' ); ?></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
<td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
	<p><label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
		<input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
		<?php _e( 'Your latest posts' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
	</label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
	</p>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
	<p><label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
		<input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
		<?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
	</label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
	</p>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
<ul>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
	<li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
	<li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
</ul>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
<div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
</fieldset></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
<td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
<input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
</td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
<th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
<td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
<tr valign="top">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
<th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
<p><label><input name="rss_use_excerpt" type="radio" value="0" <?php checked( 0, get_option( 'rss_use_excerpt' ) ); ?>	/> <?php _e( 'Full text' ); ?></label><br />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
</fieldset></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
<tr valign="top" class="option-site-visibility">
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
<td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
<?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
	<input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
	<label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
	<input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
	<label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
	<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.' ); ?></p>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
	<?php
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
	/**
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
	 * Enable the legacy 'Site Visibility' privacy options.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
	 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
	 * By default the privacy options form displays a single checkbox to 'discourage' search
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
	 * engines from indexing the site. Hooking to this action serves a dual purpose:
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
	 * 1. Disable the single checkbox in favor of a multiple-choice list of radio buttons.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   160
	 * 2. Open the door to adding additional radio button choices to the list.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
	 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
	 * Hooking to this action also converts the 'Search Engine Visibility' heading to the more
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   163
	 * open-ended 'Site Visibility' heading.
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   164
	 *
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   165
	 * @since 2.1.0
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   166
	 */
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
	do_action( 'blog_privacy_selector' );
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
	?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
<?php else : ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   170
	<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   171
	<?php _e( 'Discourage search engines from indexing this site' ); ?></label>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   172
	<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   173
<?php endif; ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   174
</fieldset></td>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   175
</tr>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   176
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   177
<?php do_settings_fields( 'reading', 'default' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   178
</table>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   179
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   180
<?php do_settings_sections( 'reading' ); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   181
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   182
<?php submit_button(); ?>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   183
</form>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   184
</div>
d970ebf37754 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
   185
<?php include( ABSPATH . 'wp-admin/admin-footer.php' ); ?>