PHP Класс HM\BackUpWordPress\Plugin

Показать файл Открыть проект

Открытые методы

Метод Описание
constants ( ) Define all the constants.
display_feature_message ( )
get_instance ( ) : Plugin Insures we always return the same object.
hooks ( ) Hook into WordPress page lifecycle and execute BackUpWordPress functions.
init ( ) Runs on every admin page load
load_first ( ) Ensure BackUpWordPress is loaded before add-ons, changes the order of the serialized values in the DB field.
load_intercom_script ( ) Load Intercom and send across user information and server info. Only loaded if the user has opted in.
maybe_self_deactivate ( ) : boolean Check plugin requirements.
plugins_loaded ( ) Initialize the plugin.
schedule_hook_run ( $schedule_id ) Function to run when the schedule cron fires.
scripts ( $hook ) Load the Javascript in the admin.
styles ( $hook ) Enqueue the plugin styles.
text_domain ( ) Loads the plugin text domain for translation.
upgrade ( ) Determine if we need to run an upgrade routine.

Защищенные методы

Метод Описание
generate_key ( ) : string Generate a unique key.
includes ( ) Load all BackUpWordPress functions.

Приватные методы

Метод Описание
__construct ( ) Instantiates a new Plugin object.

Описание методов

constants() публичный метод

Define all the constants.
public constants ( )

display_feature_message() публичный метод

generate_key() защищенный метод

Generate a unique key.
protected generate_key ( ) : string
Результат string

get_instance() публичный статический метод

Insures we always return the same object.
public static get_instance ( ) : Plugin
Результат Plugin

hooks() публичный метод

Hook into WordPress page lifecycle and execute BackUpWordPress functions.
public hooks ( )

includes() защищенный метод

Load all BackUpWordPress functions.
protected includes ( )

init() публичный метод

Runs on every admin page load
public init ( )

load_first() публичный метод

Ensure BackUpWordPress is loaded before add-ons, changes the order of the serialized values in the DB field.
public load_first ( )

load_intercom_script() публичный метод

Load Intercom and send across user information and server info. Only loaded if the user has opted in.

maybe_self_deactivate() публичный метод

Check plugin requirements.
public maybe_self_deactivate ( ) : boolean
Результат boolean True is fails requirements. False otherwise.

plugins_loaded() публичный метод

Initialize the plugin.
public plugins_loaded ( )

schedule_hook_run() публичный метод

Function to run when the schedule cron fires.
public schedule_hook_run ( $schedule_id )
$schedule_id

scripts() публичный метод

Load the Javascript in the admin.
public scripts ( $hook )
$hook The name of the admin page hook.

styles() публичный метод

Enqueue the plugin styles.
public styles ( $hook )
$hook

text_domain() публичный метод

This setup allows a user to just drop his custom translation files into the WordPress language directory Files will need to be in a subdirectory with the name of the textdomain 'backupwordpress'
public text_domain ( )

upgrade() публичный метод

Determine if we need to run an upgrade routine.
public upgrade ( )