Skip to content

atmosphere_publication_show_in_discover

github-actions[bot] edited this page Jul 2, 2026 · 2 revisions

Filters whether the publication appears in standard.site discovery.

Defaults to the site's blog_public option, so a public site opts into discovery and a site set to discourage search engines stays out — mirroring the visibility preference the user has already expressed under Settings → Reading. Return true or false to override and emit preferences.showInDiscover, or null to omit the preference entirely and let downstream appviews apply their own default.

Auto-generated Example

/**
 * Filters whether the publication appears in standard.site discovery.
 * 
 * Defaults to the site's `blog_public` option, so a public site
 * opts into discovery and a site set to discourage search engines
 * stays out — mirroring the visibility preference the user has
 * already expressed under Settings → Reading. Return true or false
 * to override and emit `preferences.showInDiscover`, or null to omit
 * the preference entirely and let downstream appviews apply their
 * own default.
 *
 * @param bool $show_in_discover 
 * @return bool The filtered value.
 */
function my_atmosphere_publication_show_in_discover_callback( bool $show_in_discover = null ) {
    // Your code here.
    return null;
}
add_filter( 'atmosphere_publication_show_in_discover', 'my_atmosphere_publication_show_in_discover_callback' );

Parameters

  • bool|null $show_in_discover Whether to show in discovery, or null to omit.

Files

\apply_filters(
			'atmosphere_publication_show_in_discover',
			(bool) \get_option( 'blog_public', 1 )
		)

← All Hooks

Clone this wiki locally