Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: blog_privacy_selector

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
144 <tr valign="top" class="option-site-visibility">
145 <th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </th>
146 <td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site Visibility' ) : _e( 'Search Engine Visibility' ); ?> </span></legend>
147 <?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
148      <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked('1', get_option('blog_public')); ?> />
149      <label for="blog-public"><?php _e( 'Allow search engines to index this site' );?></label><br/>
150      <input id="blog-norobots" type="radio" name="blog_public" value="0" <?php checked('0', get_option('blog_public')); ?> />
151      <label for="blog-norobots"><?php _e( 'Discourage search engines from indexing this site' ); ?></label>
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>
153      <?php do_action('blog_privacy_selector'); ?>
154 <?php else : ?>
155      <label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />
156      <?php _e( 'Discourage search engines from indexing this site' ); ?></label>
157      <p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p>
158 <?php endif; ?>
159 </fieldset></td>
160 </tr>
161
162 <?php do_settings_fields( 'reading', 'default' ); ?>