Documentation

WelcomePage
in package
Uses UtilsProvider

Handle welcome page for a specific plugin.

Table of Contents

Constants

COLOR_BADGE_LITE  = '#28aa00'
COLOR_BADGE_PRO  = '#0073aa'
EXCLUDE_DESCRIPTION_CONTAINS  = 'micro add-on'
PAGE_SUFFIX  = '-welcome'
PLUGIN_SLUG_FIXER  = ['real-category-library-lite' => 'real-category-library', 'real-media-library-lite' => 'real-media-library', 'real-thumbnail-generator-lite' => 'real-thumbnail-generator', 'real-cookie-banner' => 'real-cookie-banner-pro']

Properties

$initiator  : mixed

Methods

activated_plugin()  : mixed
Redirect to the welcome page once the plugin is activated.
admin_head_probably_redirect()  : mixed
Do the redirection if necessary. This does a client-side redirection to avoid output buffer issues with already-sent output (e.g. PHP warnings and HTTP header `Location`).
admin_menu()  : mixed
Register welcome page without menu entry.
getInitiator()  : AbstractInitiator
Get initiator.
getPluginConstantPrefix()  : string
Get the prefix of this package so we can utils package natively.
getWelcomePageLink()  : mixed
Get the welcome page link.
instance()  : mixed
Create instance.
isCurrentPage()  : mixed
Checks if the current open page is the welcome page.
our_plugins_output()  : mixed
Display our plugins by using the native list table.
plugin_row_meta()  : mixed
Add a link to the welcome page.
prepare_items()  : mixed
Filter and sort result from Plugin API call.
setupConstants()  : mixed
Make sure the REAL_UTILS constants are available.
welcome_page_output()  : mixed
Create output for the welcome page. It does not use React because the interface is not reactive.
transformChunkedKeyFeaturesHtml()  : mixed
Transform given key features to key features HTML. This function does not return only the columns, no row!
transformKeyFeaturesHtml()  : mixed
Get key features and transform them to key features HTML including rows' `div`.
__construct()  : mixed
C'tor.

Constants

COLOR_BADGE_LITE

public mixed COLOR_BADGE_LITE = '#28aa00'

COLOR_BADGE_PRO

public mixed COLOR_BADGE_PRO = '#0073aa'

EXCLUDE_DESCRIPTION_CONTAINS

public mixed EXCLUDE_DESCRIPTION_CONTAINS = 'micro add-on'

PLUGIN_SLUG_FIXER

public mixed PLUGIN_SLUG_FIXER = ['real-category-library-lite' => 'real-category-library', 'real-media-library-lite' => 'real-media-library', 'real-thumbnail-generator-lite' => 'real-thumbnail-generator', 'real-cookie-banner' => 'real-cookie-banner-pro']

Properties

Methods

activated_plugin()

Redirect to the welcome page once the plugin is activated.

public activated_plugin(string $plugin) : mixed
Parameters
$plugin : string

admin_head_probably_redirect()

Do the redirection if necessary. This does a client-side redirection to avoid output buffer issues with already-sent output (e.g. PHP warnings and HTTP header `Location`).

public admin_head_probably_redirect() : mixed

admin_menu()

Register welcome page without menu entry.

public admin_menu() : mixed

getPluginConstantPrefix()

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

public getPluginConstantPrefix() : string
Return values
string

Get the welcome page link.

public getWelcomePageLink() : mixed

isCurrentPage()

Checks if the current open page is the welcome page.

public isCurrentPage() : mixed

plugin_row_meta()

Add a link to the welcome page.

public plugin_row_meta(array<string|int, string> $links, string $plugin) : mixed
Parameters
$links : array<string|int, string>
$plugin : string

prepare_items()

Filter and sort result from Plugin API call.

public prepare_items(object $res, string $action, object $args) : mixed
Parameters
$res : object

API response

$action : string

[query_plugins]

$args : object

[per_page, order_by, order]

Tags
see
https://wordpress.stackexchange.com/a/76644/83335

setupConstants()

Make sure the REAL_UTILS constants are available.

public static setupConstants() : mixed

welcome_page_output()

Create output for the welcome page. It does not use React because the interface is not reactive.

public welcome_page_output() : mixed

transformChunkedKeyFeaturesHtml()

Transform given key features to key features HTML. This function does not return only the columns, no row!

protected transformChunkedKeyFeaturesHtml(array<string|int, mixed> $features) : mixed
Parameters
$features : array<string|int, mixed>

transformKeyFeaturesHtml()

Get key features and transform them to key features HTML including rows' `div`.

protected transformKeyFeaturesHtml() : mixed

        
On this page

Search results