\MatthiasWeb\RealMediaLibraryCore

Singleton core class which handles the main system for plugin. It includes registering of the autoload, all hooks (actions & filters) (see BaseCore class).

Summary

Methods
Properties
Constants
overrideConstruct()
overrideInit()
after_plugin_row()
isLicenseNoticeDismissed()
handleNewsletter()
getUpdater()
getPluginConstantPrefix()
i18n()
updateDbCheck()
getInternalPackages()
getPluginData()
getActivator()
getAssets()
getService()
init()
update_count()
tableName()
getInstance()
No public properties found
No constants found
__construct()
construct()
No protected properties found
N/A
compatibilities()
$updater
$plugin_data
$activator
$assets
$service
$me
N/A

Properties

$updater

$updater :

Updater instance.

Type

$plugin_data

$plugin_data :

The stored plugin data.

Type

$activator

$activator :

The plugins activator class.

Type

$assets

$assets :

The plugins asset class.

Type

$service

$service :

The utils service class.

Type

$me

$me :

Singleton instance.

Type

Methods

overrideConstruct()

overrideConstruct()

overrideInit()

overrideInit()

after_plugin_row()

after_plugin_row(string  $file,array  $plugin)

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

Parameters

string $file
array $plugin

isLicenseNoticeDismissed()

isLicenseNoticeDismissed(  $set = null)

Parameters

$set

handleNewsletter()

handleNewsletter(string  $email)

Send an email newsletter if checked in the updater.

Parameters

string $email

getUpdater()

getUpdater()

getPluginConstantPrefix()

getPluginConstantPrefix(): string

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

Returns

string

i18n()

i18n()

The plugin is loaded. Start to register the localization (i18n) files.

Also respect packages in vendor dir.

updateDbCheck()

updateDbCheck()

Updates the database version in the options table.

It also installs the needed database tables.

getInternalPackages()

getInternalPackages(): object

Get a list of internal packages (our own, symlinked from the monorepo).

Returns

object

getPluginData()

getPluginData(string  $key = null): array<mixed,string>|string|null

Gets the plugin data.

Parameters

string $key

The key of the data to return

Returns

array<mixed,string>|string|null

init()

init()

The init function is fired even the init hook of WordPress. If possible it should register all hooks to have them in one place.

update_count()

update_count(mixed  $result): mixed

Use the wp die filter to make the last update count;

Parameters

mixed $result

Returns

mixed

tableName()

tableName(string  $name = ''): string

Static method to get a RML table name.

Parameters

string $name

Returns

string

__construct()

__construct()

Application core constructor.

The constructor is protected because a factory method should only create a Core object.

construct()

construct()

The constructor handles the core startup mechanism.

The constructor is protected because a factory method should only create a Core object.

compatibilities()

compatibilities(boolean  $init)

Allow a better compatibility for other plugins.

Have a look at the class' constructors for all needed filters and actions.

Parameters

boolean $init