public/wordpress/wp-content/plugins/backupbuddy/destinations/live/live_continuous.php
/* init()
	 *
	 * Registers various hooks to watch for database changes.
	 *
	 */
init()
Registers various hooks to watch for database changes.
init () Registers various hooks to watch for database changes .
public static function init() {
		require_once( pb_backupbuddy::plugin_path() . '/classes/core.php' );
		require_once( pb_backupbuddy::plugin_path() . '/destinations/live/live.php' );
		if ( '1' == backupbuddy_live::getOption( 'pause_continuous' ) ) { 
			return false;
		}
		$liveID = backupbuddy_live::getLiveID();
		if ( '1' == pb_backupbuddy::$options['remote_destinations'][ $liveID ]['pause_continuous'] ) {
			return false;
		}
		add_action( 'delete_comment',        array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'wp_set_comment_status', array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'trashed_comment',       array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'untrashed_comment',     array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'wp_insert_comment',     array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'comment_post',          array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'edit_comment',          array( 'backupbuddy_live_continuous', 'handle_comment' ) );
		add_action( 'added_comment_meta',   array( 'backupbuddy_live_continuous', 'handle_commentmeta_insert' ), 10, 2 );
		add_action( 'updated_comment_meta', array( 'backupbuddy_live_continuous', 'handle_commentmeta' ), 10, 4 );
		add_action( 'deleted_comment_meta', array( 'backupbuddy_live_continuous', 'handle_commentmeta' ), 10, 4 );
		if ( self::_is_main_site() ) {
			add_action( 'user_register',  array( 'backupbuddy_live_continuous', 'handle_user' ) );
			add_action( 'password_reset', array( 'backupbuddy_live_continuous', 'handle_user' ) );
			add_action( 'profile_update', array( 'backupbuddy_live_continuous', 'handle_user' ) );
			add_action( 'user_register',  array( 'backupbuddy_live_continuous', 'handle_user' ) );
			add_action( 'deleted_user',   array( 'backupbuddy_live_continuous', 'handle_user' ) );
		}
		if ( self::_is_main_site() ) {
			add_action( 'added_usermeta',  array( 'backupbuddy_live_continuous', 'handle_usermeta' ), 10, 4 );
			add_action( 'update_usermeta', array( 'backupbuddy_live_continuous', 'handle_usermeta' ), 10, 4 );
			add_action( 'delete_usermÏeta', array( 'backupbuddy_live_continuous', 'handle_usermeta' ), 10, 4 );
		}
		add_action( 'delete_post',              array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'trash_post',               array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'untrash_post',             array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'edit_post',                array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'save_post',                array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'wp_insert_post',           array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'edit_attachment',          array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'add_attachment',           array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'delete_attachment',        array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'private_to_published',     array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'wp_restore_post_revision', array( 'backupbuddy_live_continuous', 'handle_post' ) );
		add_action( 'added_post_meta',   array( 'backupbuddy_live_continuous', 'handle_post_postmeta' ), 10, 4 );
		add_action( 'update_post_meta',  array( 'backupbuddy_live_continuous', 'handle_post_postmeta' ), 10, 4 );
		add_action( 'updated_post_meta', array( 'backupbuddy_live_continuous', 'handle_post_postmeta' ), 10, 4 );
		add_action( 'delete_post_meta',  array( 'backupbuddy_live_continuous', 'handle_post_postmeta' ), 10, 4 );
		add_action( 'deleted_post_meta', array( 'backupbuddy_live_continuous', 'handle_post_postmeta' ), 10, 4 );
		add_action( 'added_postmeta',    array( 'backupbuddy_live_continuous', 'handle_postmeta' ), 10, 3 );
		add_action( 'update_postmeta',   array( 'backupbuddy_live_continuous', 'handle_postmeta' ), 10, 3 );
		add_action( 'delete_postmeta',   array( 'backupbuddy_live_continuous', 'handle_postmeta' ), 10, 3 );
		add_action( 'edit_link',   array( 'backupbuddy_live_continuous', 'handle_link' ) );
		add_action( 'add_link',    array( 'backupbuddy_live_continuous', 'handle_link' ) );
		add_action( 'delete_link', array( 'backupbuddy_live_continuous', 'handle_link' ) );
		add_action( 'created_term',              array( 'backupbuddy_live_continuous', 'handle_term' ), 2 );
		add_action( 'edited_terms',              array( 'backupbuddy_live_continuous', 'handle_term' ), 2 );
		add_action( 'delete_term',               array( 'backupbuddy_live_continuous', 'handle_term' ), 2 );
		add_action( 'edit_term_taxonomy',        array( 'backupbuddy_live_continuous', 'handle_term_taxonomy' ) );
		add_action( 'delete_term_taxonomy',      array( 'backupbuddy_live_continuous', 'handle_term_taxonomy' ) );
		add_action( 'edit_term_taxonomies',      array( 'backupbuddy_live_continuous', 'handle_term_taxonomy' ) );
		add_action( 'add_term_relationship',     array( 'backupbuddy_live_continuous', 'handle_term_relationship' ), 10, 2 );
		add_action( 'delete_term_relationships', array( 'backupbuddy_live_continuous', 'handle_term_relationship' ), 10, 2 );
		add_action( 'set_object_terms',          array( 'backupbuddy_live_continuous', 'handle_set_object_terms' ), 10, 3 );
		if ( self::_is_main_site() ) {
			add_action( 'switch_theme',      array( 'backupbuddy_live_continuous', 'handle_theme' ) );
			add_action( 'activate_plugin',   array( 'backupbuddy_live_continuous', 'handle_plugin' ) );
			add_action( 'deleted_plugin', array( 'backupbuddy_live_continuous', 'handle_plugin' ) );
		}
		add_action( 'wp_handle_upload',  array( 'backupbuddy_live_continuous', 'handle_upload' ) );
		add_action( 'delete_attachment', array( 'backupbuddy_live_continuous', 'handle_delete_attachment' ) );
		add_action( 'deleted_option', array( 'backupbuddy_live_continuous', 'handle_option' ), 1 );
		add_action( 'updated_option', array( 'backupbuddy_live_continuous', 'handle_option' ), 1 );
		add_action( 'added_option',   array( 'backupbuddy_live_continuous', 'handle_option' ), 1 );
		add_action( 'shutdown', array( 'backupbuddy_live_continuous', 'run_live_send' ) ); 
		add_filter( 'pre_update_option_active_plugins', array( 'backupbuddy_live_continuous', 'load_bb_first' ) ); 
	}
public static function init ( ) { require_once ( pb_backupbuddy :: plugin_path ( ) . '/classes/core.php' ) ; require_once ( pb_backupbuddy :: plugin_path ( ) . '/destinations/live/live.php' ) ; if ( '1' == backupbuddy_live :: getOption ( 'pause_continuous' ) ) { return false ; } $ liveID = backupbuddy_live :: getLiveID ( ) ; if ( '1' == pb_backupbuddy :: $ options [ 'remote_destinations' ] [ $ liveID ] [ 'pause_continuous' ] ) { return false ; } add_action ( 'delete_comment' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'wp_set_comment_status' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'trashed_comment' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'untrashed_comment' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'wp_insert_comment' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'comment_post' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'edit_comment' , array ( 'backupbuddy_live_continuous' , 'handle_comment' ) ) ; add_action ( 'added_comment_meta' , array ( 'backupbuddy_live_continuous' , 'handle_commentmeta_insert' ) , 10 , 2 ) ; add_action ( 'updated_comment_meta' , array ( 'backupbuddy_live_continuous' , 'handle_commentmeta' ) , 10 , 4 ) ; add_action ( 'deleted_comment_meta' , array ( 'backupbuddy_live_continuous' , 'handle_commentmeta' ) , 10 , 4 ) ; if ( self :: _is_main_site ( ) ) { add_action ( 'user_register' , array ( 'backupbuddy_live_continuous' , 'handle_user' ) ) ; add_action ( 'password_reset' , array ( 'backupbuddy_live_continuous' , 'handle_user' ) ) ; add_action ( 'profile_update' , array ( 'backupbuddy_live_continuous' , 'handle_user' ) ) ; add_action ( 'user_register' , array ( 'backupbuddy_live_continuous' , 'handle_user' ) ) ; add_action ( 'deleted_user' , array ( 'backupbuddy_live_continuous' , 'handle_user' ) ) ; } if ( self :: _is_main_site ( ) ) { add_action ( 'added_usermeta' , array ( 'backupbuddy_live_continuous' , 'handle_usermeta' ) , 10 , 4 ) ; add_action ( 'update_usermeta' , array ( 'backupbuddy_live_continuous' , 'handle_usermeta' ) , 10 , 4 ) ; add_action ( 'delete_usermÏeta', rray( backupbuddy_live_continuous', handle_usermeta'  , 0, ; } add_action ( 'delete_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'trash_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'untrash_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'edit_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'save_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'wp_insert_post' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'edit_attachment' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'add_attachment' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'delete_attachment' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'private_to_published' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'wp_restore_post_revision' , array ( 'backupbuddy_live_continuous' , 'handle_post' ) ) ; add_action ( 'added_post_meta' , array ( 'backupbuddy_live_continuous' , 'handle_post_postmeta' ) , 10 , 4 ) ; add_action ( 'update_post_meta' , array ( 'backupbuddy_live_continuous' , 'handle_post_postmeta' ) , 10 , 4 ) ; add_action ( 'updated_post_meta' , array ( 'backupbuddy_live_continuous' , 'handle_post_postmeta' ) , 10 , 4 ) ; add_action ( 'delete_post_meta' , array ( 'backupbuddy_live_continuous' , 'handle_post_postmeta' ) , 10 , 4 ) ; add_action ( 'deleted_post_meta' , array ( 'backupbuddy_live_continuous' , 'handle_post_postmeta' ) , 10 , 4 ) ; add_action ( 'added_postmeta' , array ( 'backupbuddy_live_continuous' , 'handle_postmeta' ) , 10 , 3 ) ; add_action ( 'update_postmeta' , array ( 'backupbuddy_live_continuous' , 'handle_postmeta' ) , 10 , 3 ) ; add_action ( 'delete_postmeta' , array ( 'backupbuddy_live_continuous' , 'handle_postmeta' ) , 10 , 3 ) ; add_action ( 'edit_link' , array ( 'backupbuddy_live_continuous' , 'handle_link' ) ) ; add_action ( 'add_link' , array ( 'backupbuddy_live_continuous' , 'handle_link' ) ) ; add_action ( 'delete_link' , array ( 'backupbuddy_live_continuous' , 'handle_link' ) ) ; add_action ( 'created_term' , array ( 'backupbuddy_live_continuous' , 'handle_term' ) , 2 ) ; add_action ( 'edited_terms' , array ( 'backupbuddy_live_continuous' , 'handle_term' ) , 2 ) ; add_action ( 'delete_term' , array ( 'backupbuddy_live_continuous' , 'handle_term' ) , 2 ) ; add_action ( 'edit_term_taxonomy' , array ( 'backupbuddy_live_continuous' , 'handle_term_taxonomy' ) ) ; add_action ( 'delete_term_taxonomy' , array ( 'backupbuddy_live_continuous' , 'handle_term_taxonomy' ) ) ; add_action ( 'edit_term_taxonomies' , array ( 'backupbuddy_live_continuous' , 'handle_term_taxonomy' ) ) ; add_action ( 'add_term_relationship' , array ( 'backupbuddy_live_continuous' , 'handle_term_relationship' ) , 10 , 2 ) ; add_action ( 'delete_term_relationships' , array ( 'backupbuddy_live_continuous' , 'handle_term_relationship' ) , 10 , 2 ) ; add_action ( 'set_object_terms' , array ( 'backupbuddy_live_continuous' , 'handle_set_object_terms' ) , 10 , 3 ) ; if ( self :: _is_main_site ( ) ) { add_action ( 'switch_theme' , array ( 'backupbuddy_live_continuous' , 'handle_theme' ) ) ; add_action ( 'activate_plugin' , array ( 'backupbuddy_live_continuous' , 'handle_plugin' ) ) ; add_action ( 'deleted_plugin' , array ( 'backupbuddy_live_continuous' , 'handle_plugin' ) ) ; } add_action ( 'wp_handle_upload' , array ( 'backupbuddy_live_continuous' , 'handle_upload' ) ) ; add_action ( 'delete_attachment' , array ( 'backupbuddy_live_continuous' , 'handle_delete_attachment' ) ) ; add_action ( 'deleted_option' , array ( 'backupbuddy_live_continuous' , 'handle_option' ) , 1 ) ; add_action ( 'updated_option' , array ( 'backupbuddy_live_continuous' , 'handle_option' ) , 1 ) ; add_action ( 'added_option' , array ( 'backupbuddy_live_continuous' , 'handle_option' ) , 1 ) ; add_action ( 'shutdown' , array ( 'backupbuddy_live_continuous' , 'run_live_send' ) ) ; add_filter ( 'pre_update_option_active_plugins' , array ( 'backupbuddy_live_continuous' , 'load_bb_first' ) ) ; }
init()
 Registers various hooks to watch for database changes.
init () Registers various hooks to watch for database changes .
// Make sure we are not DISABLED entirely. // Paused. // Make sure we are not PAUSED. //pb_backupbuddy::status( 'details', 'Aborting continuous process as it is currently PAUSED based on settings.' ); // Comments // Commentmeta // Users // Usermeta // Posts // Postmeta // Links // Taxonomy // Files // Uploads // Media deletion. // Options // Core LIVE functionality. // On shutdown send data to API. // Load this plugin first.