PHP Class HM\BackUpWordPress\Plugin

Afficher le fichier Open project: humanmade/backupwordpress

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
generate_key ( ) : string Generate a unique key.
includes ( ) Load all BackUpWordPress functions.

Private Methods

Méthode Description
__construct ( ) Instantiates a new Plugin object.

Method Details

constants() public méthode

Define all the constants.
public constants ( )

display_feature_message() public méthode

generate_key() protected méthode

Generate a unique key.
protected generate_key ( ) : string
Résultat string

get_instance() public static méthode

Insures we always return the same object.
public static get_instance ( ) : Plugin
Résultat Plugin

hooks() public méthode

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

includes() protected méthode

Load all BackUpWordPress functions.
protected includes ( )

init() public méthode

Runs on every admin page load
public init ( )

load_first() public méthode

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

load_intercom_script() public méthode

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

maybe_self_deactivate() public méthode

Check plugin requirements.
public maybe_self_deactivate ( ) : boolean
Résultat boolean True is fails requirements. False otherwise.

plugins_loaded() public méthode

Initialize the plugin.
public plugins_loaded ( )

schedule_hook_run() public méthode

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

scripts() public méthode

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

styles() public méthode

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

text_domain() public méthode

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() public méthode

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