wppaste
WordPress

do_action( 'blog_privacy_selector' )

Since
2.1.0
Enables the legacy 'Site visibility' privacy options.

Description

By default the privacy options form displays a single checkbox to 'discourage' search engines from indexing the site. Hooking to this action serves a dual purpose:

  1. Disable the single checkbox in favor of a multiple-choice list of radio buttons.
  2. Open the door to adding additional radio button choices to the list.

Hooking to this action also converts the 'Search engine visibility' heading to the more open-ended 'Site visibility' heading.

Compatibility

WordPress
since 2.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Where this hook fires · 2

  • wp-admin/install.php:198display_setup_form()
  • wp-admin/options-reading.php:227file scope

Source code

	 *	 * Hooking to this action also converts the 'Search engine visibility' heading to the more	 * open-ended 'Site visibility' heading.	 *	 * @since 2.1.0	 */	do_action( 'blog_privacy_selector' );	?><?php else : ?>	<label for="blog_public"><input name="blog_public" type="checkbox" id="blog_public" value="0" <?php checked( '0', get_option( 'blog_public' ) ); ?> />	<?php _e( 'Discourage search engines from indexing this site' ); ?></label>	<p class="description"><?php _e( 'It is up to search engines to honor this request.' ); ?></p><?php endif; ?>

Changelog

Introduced in 2.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.