Constants

OPTION_NAME_ADMIN_NOTICE_LICENSE_DISMISSED_DAY_PREFIX

OPTION_NAME_ADMIN_NOTICE_LICENSE_DISMISSED_DAY_PREFIX =RPM_WP_CLIENT_OPT_PREFIX . '-noticeLicenseDismissDay_'

CLICK_HANDLER_ATTRIBUTE

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

CLICK_NOTICE_LICENSE_DISMISS_HANDLER_ATTRIBUTE

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

HASH_HANDLER_PREFIX

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

Properties

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

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

Returns

string

setupConstants()

setupConstants()

Make sure the RPM_WP_CLIENT constants are available.

admin_notices_not_licensed()

admin_notices_not_licensed()

Show a notice when the plugin is not fully licensed.

admin_notices_license_hint()

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).

after_plugin_row()

after_plugin_row()

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

generateLicenseLink()

generateLicenseLink(string  $text)

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

Parameters

string $text

plugin_action_links()

plugin_action_links(array  $actions): array

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

Parameters

array $actions

The plugin actions

Returns

array —

The updated actions.

dismissLicenseAdminNotice()

dismissLicenseAdminNotice()

Dismiss the license admin notice for the current day.

getActivateLink()

getActivateLink(boolean  $onlyHref = false)

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

Parameters

boolean $onlyHref

getPluginUpdate()

getPluginUpdate()

Get plugin update instance.

getAdminNoticeLicenseText()

getAdminNoticeLicenseText(boolean  $allowFirstDays = false)

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.

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

Parameters

boolean $allowFirstDays

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

dismissOnClickHandler()

dismissOnClickHandler(string  $slug)

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

Parameters

string $slug