PHP Class WPSEO_Product_Upsell_Notice, wordpress-seo

Show file Open project: yoast/wordpress-seo Class Usage Examples

Protected Properties

Property Type Description
$options array

Public Methods

Method Description
__construct ( ) Sets the options, because they always have to be there on instance.
dismiss_notice_listener ( ) Listener for the upsell notice.
initialize ( ) Checks if the notice should be added or removed.
set_upgrade_notice ( ) Sets the upgrade notice.

Protected Methods

Method Description
add_notification ( ) Adds a notification to the notification center.
dismiss_notice ( ) Dismisses the notice.
get_notification ( ) : Yoast_Notification Gets the notification value.
get_options ( ) : mixed | void Returns the set options
get_premium_upsell_section ( ) : string Returns a premium upsell section if using the free plugin.
has_first_activated_on ( ) Checks if the options has a first activated on date value.
is_notice_dismissed ( ) : string Dismisses the notice.
remove_notification ( ) Adds a notification to the notification center.
save_options ( ) Saves the options to the database.
set_first_activated_on ( ) Sets the first activated on.
should_add_notification ( ) : boolean When the notice should be shown.

Method Details

__construct() public method

Sets the options, because they always have to be there on instance.
public __construct ( )

add_notification() protected method

Adds a notification to the notification center.
protected add_notification ( )

dismiss_notice() protected method

Dismisses the notice.
protected dismiss_notice ( )

dismiss_notice_listener() public method

Listener for the upsell notice.

get_notification() protected method

Gets the notification value.
protected get_notification ( ) : Yoast_Notification
return Yoast_Notification

get_options() protected method

Returns the set options
protected get_options ( ) : mixed | void
return mixed | void

get_premium_upsell_section() protected method

Returns a premium upsell section if using the free plugin.
protected get_premium_upsell_section ( ) : string
return string

has_first_activated_on() protected method

Checks if the options has a first activated on date value.
protected has_first_activated_on ( )

initialize() public method

Checks if the notice should be added or removed.
public initialize ( )

is_notice_dismissed() protected method

Dismisses the notice.
protected is_notice_dismissed ( ) : string
return string

remove_notification() protected method

Adds a notification to the notification center.
protected remove_notification ( )

save_options() protected method

Saves the options to the database.
protected save_options ( )

set_first_activated_on() protected method

Sets the first activated on.
protected set_first_activated_on ( )

set_upgrade_notice() public method

Sets the upgrade notice.
public set_upgrade_notice ( )

should_add_notification() protected method

When the notice should be shown.
protected should_add_notification ( ) : boolean
return boolean

Property Details

$options protected property

protected array $options
return array