PHP Class Jetpack_Connection_Banner, jetpack

Afficher le fichier Open project: automattic/jetpack Class Usage Examples

Méthodes publiques

Méthode Description
check_ab_test_not_expired ( null $now = null ) : boolean Checks whether the connection banner A/B test should be ran.
enqueue_banner_scripts ( ) Enqueues JavaScript for new connection banner.
get_dismiss_and_deactivate_url ( ) : string Returns a URL that will dismiss allow the current user to dismiss the connection banner.
get_random_connection_banner_value ( ) : integer Gets the value for which connection banner to show, and initializes if not set.
init ( )
maybe_initialize_hooks ( $current_screen ) Will initialize hooks to display the new and legacy connection banners if the current user can connect Jetpack, if Jetpack has not been deactivated, and if the current page is the plugins page.
network_connect_notice ( ) Renders the legacy network connection banner.
render_banner ( ) Renders the new connection banner.
render_legacy_banner ( ) Renders the legacy connection banner.

Private Methods

Méthode Description
__construct ( ) Jetpack_Connection_Banner constructor.

Method Details

check_ab_test_not_expired() static public méthode

Checks whether the connection banner A/B test should be ran.
Since: 4.4.0
static public check_ab_test_not_expired ( null $now = null ) : boolean
$now null
Résultat boolean

enqueue_banner_scripts() public méthode

Enqueues JavaScript for new connection banner.
Since: 4.4.0

get_dismiss_and_deactivate_url() public méthode

Returns a URL that will dismiss allow the current user to dismiss the connection banner.
Since: 4.4.0

get_random_connection_banner_value() static public méthode

Gets the value for which connection banner to show, and initializes if not set.
Since: 4.4.0
static public get_random_connection_banner_value ( ) : integer
Résultat integer

init() static public méthode

static public init ( )

maybe_initialize_hooks() public méthode

This method should not be called if the site is connected to WordPress.com or if the site is in development mode.
Since: 4.4.0
public maybe_initialize_hooks ( $current_screen )
$current_screen

network_connect_notice() public méthode

Renders the legacy network connection banner.

render_banner() public méthode

Renders the new connection banner.
Since: 4.4.0
public render_banner ( )

render_legacy_banner() public méthode

Renders the legacy connection banner.