Documentation

PluginUpdateView
in package
Uses UtilsProvider

Plugin update view handling. E. g. add links to the plugins row in plugins list.

Table of Contents

Constants

CLICK_HANDLER_ATTRIBUTE  = 'data-rpm-wp-client-plugin-update'
CLICK_NOTICE_LICENSE_DISMISS_HANDLER_ATTRIBUTE  = 'data-rpm-wp-client-plugin-update-license-notice-dismiss'
HASH_HANDLER_PREFIX  = 'rpm-wp-client-plugin-update-'
OPTION_NAME_ADMIN_NOTICE_LICENSE_DISMISSED_DAY_PREFIX  = RPM_WP_CLIENT_OPT_PREFIX . '-noticeLicenseDismissDay_'

Properties

$pluginUpdate  : PluginUpdate
Plugin update instance.

Methods

admin_notices_license_hint()  : mixed
Show the notice of the license hint, if a license got disabled e.g. through remote or a new hostname (migration).
admin_notices_not_licensed()  : mixed
Show a notice when the plugin is not fully licensed.
after_plugin_row()  : mixed
Show a notice in the plugins list that the plugin is not activated, yet.
dismissLicenseAdminNotice()  : mixed
Dismiss the license admin notice for the current day.
generateLicenseLink()  : mixed
Generate a `<a` link to open the license form for a given plugin.
getActivateLink()  : mixed
Get the "Activate now" link for the current plugin.
getPluginConstantPrefix()  : string
Get the prefix of this package so we can utils package natively.
getPluginUpdate()  : mixed
Get plugin update instance.
instance()  : mixed
New instance.
plugin_action_links()  : array<string|int, mixed>
Add a "Enter License" link to the plugins actions.
setupConstants()  : mixed
Make sure the RPM_WP_CLIENT constants are available.
dismissOnClickHandler()  : mixed
Dismiss-functionality is handled through a inline-onclick handler because we do not need to enqueue an extra script on each page.
getAdminNoticeLicenseText()  : mixed
Get the admin notice text for not-fully licensed plugins. Returns `false` if the admin notice should not be shown. Returns `[true, 'text']` if a notice should be shown and is dismissible.
__construct()  : mixed
C'tor.

Constants

CLICK_HANDLER_ATTRIBUTE

public mixed CLICK_HANDLER_ATTRIBUTE = 'data-rpm-wp-client-plugin-update'

CLICK_NOTICE_LICENSE_DISMISS_HANDLER_ATTRIBUTE

public mixed CLICK_NOTICE_LICENSE_DISMISS_HANDLER_ATTRIBUTE = 'data-rpm-wp-client-plugin-update-license-notice-dismiss'

HASH_HANDLER_PREFIX

public mixed HASH_HANDLER_PREFIX = 'rpm-wp-client-plugin-update-'

OPTION_NAME_ADMIN_NOTICE_LICENSE_DISMISSED_DAY_PREFIX

public mixed OPTION_NAME_ADMIN_NOTICE_LICENSE_DISMISSED_DAY_PREFIX = RPM_WP_CLIENT_OPT_PREFIX . '-noticeLicenseDismissDay_'

Properties

Methods

admin_notices_license_hint()

Show the notice of the license hint, if a license got disabled e.g. through remote or a new hostname (migration).

public admin_notices_license_hint() : mixed

admin_notices_not_licensed()

Show a notice when the plugin is not fully licensed.

public admin_notices_not_licensed() : mixed

after_plugin_row()

Show a notice in the plugins list that the plugin is not activated, yet.

public after_plugin_row() : mixed

dismissLicenseAdminNotice()

Dismiss the license admin notice for the current day.

public dismissLicenseAdminNotice() : mixed

Generate a `<a` link to open the license form for a given plugin.

public generateLicenseLink(string $text) : mixed
Parameters
$text : string

Get the "Activate now" link for the current plugin.

public getActivateLink([bool $onlyHref = false ]) : mixed
Parameters
$onlyHref : bool = false

getPluginConstantPrefix()

Get the prefix of this package so we can utils package natively.

public getPluginConstantPrefix() : string
Return values
string

getPluginUpdate()

Get plugin update instance.

public getPluginUpdate() : mixed
Tags
codeCoverageIgnore

Add a "Enter License" link to the plugins actions.

public plugin_action_links(array<string|int, mixed> $actions) : array<string|int, mixed>
Parameters
$actions : array<string|int, mixed>

The plugin actions

Return values
array<string|int, mixed>

The updated actions.

setupConstants()

Make sure the RPM_WP_CLIENT constants are available.

public static setupConstants() : mixed

dismissOnClickHandler()

Dismiss-functionality is handled through a inline-onclick handler because we do not need to enqueue an extra script on each page.

protected dismissOnClickHandler(string $slug) : mixed
Parameters
$slug : string

getAdminNoticeLicenseText()

Get the admin notice text for not-fully licensed plugins. Returns `false` if the admin notice should not be shown. Returns `[true, 'text']` if a notice should be shown and is dismissible.

protected getAdminNoticeLicenseText([bool $allowFirstDays = false ]) : mixed

Returns [false, 'text'] for a permanent notice.

Parameters
$allowFirstDays : bool = false

If true, the first and second day also shows a notice. Useful for update-core page


        
On this page

Search results