# jetpack/16.3/jetpack_vendor/automattic/jetpack-masterbar/src/nudges/bootstrap.php

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 16.3. 56 lines.

- Page: https://pluginprobe.com/plugins/jetpack/16.3/code/jetpack_vendor/automattic/jetpack-masterbar/src/nudges/bootstrap.php
- Raw: https://pluginprobe.com/plugins/jetpack/16.3/raw/jetpack_vendor/automattic/jetpack-masterbar/src/nudges/bootstrap.php
- Modified: 2024-06-10T17:15:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/16.3/code/jetpack_vendor/automattic/jetpack-masterbar/src/nudges/bootstrap.php#L10-L20`.

```php
<?php
/**
 * Bootstrap file for the nudges.
 *
 * @package automattic/jetpack-masterbar
 */

namespace Automattic\Jetpack\Masterbar;

use Automattic\Jetpack\Status;
use Automattic\Jetpack\Status\Host;

/**
 * The WP_Customize_Control core class is loaded only on customize_register.
 *
 * @param \WP_Customize_Manager $customize_manager Core customize manager.
 */
function register_css_nudge_control( \WP_Customize_Manager $customize_manager ) {
	$domain = ( new Status() )->get_site_suffix();

	if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
		$manager = new WPCOM_Additional_CSS_Manager( $domain );
	} elseif ( ( new Host() )->is_woa_site() ) {
		$manager = new Atomic_Additional_CSS_Manager( $domain );
	}

	if ( ! isset( $manager ) ) {
		return;
	}

	$manager->register_nudge( $customize_manager );
}

/**
 * Load the bootstrap on init action.
 *
 * We need to load on init because otherwise the filter will not be set to true in WPCOM (since the add_filter is set on init).
 */
function load_bootstrap_on_init() {

	/**
	 * Disable Additional CSS section from Customizer in WPCOM and Atomic and replace it with a nudge.
	 *
	 * @module masterbar
	 *
	 * @since jetpack-9.9.0
	 *
	 * @param bool
	 */
	if ( \apply_filters( 'jetpack_customize_enable_additional_css_nudge', false ) ) {
		\add_action( 'customize_register', __NAMESPACE__ . '\register_css_nudge_control' );
	}
}

add_action( 'init', __NAMESPACE__ . '\load_bootstrap_on_init' );

```
