Constants

OPTION_NAME_ANY_PLUGIN_TOGGLE_STATE

OPTION_NAME_ANY_PLUGIN_TOGGLE_STATE =RCB_OPT_PREFIX . '-any-plugin-toggle-state'

DEFAULT_ANY_PLUGIN_TOGGLE_STATE

DEFAULT_ANY_PLUGIN_TOGGLE_STATE =false

NOTICE_TYPES

NOTICE_TYPES =array('toggle-plugin-state' => self::OPTION_NAME_ANY_PLUGIN_TOGGLE_STATE)

Properties

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

Returns

string

getConfigUrl()

getConfigUrl(string  $route)

Get a config URL pointing to a given route (react-router).

Parameters

string $route

enableOptionsAutoload()

enableOptionsAutoload()

Initially `add_option` to avoid autoloading issues.

togglePluginStateNotice()

togglePluginStateNotice(string  $plugin,boolean  $network_wide)

Add option to show scanner notice if plugin is activated/deactivated

Parameters

string $plugin

Plugin slug

boolean $network_wide

Is it activated network wide

dismiss()

dismiss(string  $notice_type)

Delete option row that indicates notice as an active

Parameters

string $notice_type

isNoticeAnyPluginChangeStateVisible()

isNoticeAnyPluginChangeStateVisible()

Check if notice should be shown for plugin state (activated / deactivated), see also `self::admin_notices_any_plugin_change_state`.

admin_notices_any_plugin_change_state()

admin_notices_any_plugin_change_state()

Creates an admin notice when plugins are activated/deactivated.

dismissOnClickHandler()

dismissOnClickHandler(string  $notice_type,string  $redirect = false)

Add js handler to the button

Parameters

string $notice_type
string $redirect

__construct()

__construct()

C'tor.