function __construct($plugin_file_path) { $this->is_pro = true; $this->unhook_templates = array('exclude_post_revisions', 'wordpress_org_support', 'progress_upgrade', 'sidebar'); parent::__construct($plugin_file_path); // templating actions add_action('wpmdb_notices', array($this, 'template_outdated_addons_warning')); add_action('wpmdb_notices', array($this, 'template_secret_key_warning')); add_action('wpmdb_notices', array($this, 'template_block_external_warning')); // Internal AJAX handlers add_action('wp_ajax_wpmdb_verify_connection_to_remote_site', array($this, 'ajax_verify_connection_to_remote_site')); add_action('wp_ajax_wpmdb_finalize_migration', array($this, 'ajax_finalize_migration')); add_action('wp_ajax_wpmdb_fire_migration_complete', array($this, 'fire_migration_complete')); add_action('wp_ajax_wpmdb_flush', array($this, 'ajax_flush')); // Required for Pull if user tables being updated. add_action('wp_ajax_nopriv_wpmdb_flush', array($this, 'ajax_nopriv_flush')); add_action('wp_ajax_wpmdb_reset_api_key', array($this, 'ajax_reset_api_key')); add_action('wp_ajax_wpmdb_save_setting', array($this, 'ajax_save_setting')); add_action('wp_ajax_wpmdb_activate_licence', array($this, 'ajax_activate_licence')); add_action('wp_ajax_wpmdb_check_licence', array($this, 'ajax_check_licence')); add_action('wp_ajax_wpmdb_copy_licence_to_remote_site', array($this, 'ajax_copy_licence_to_remote_site')); add_action('wp_ajax_wpmdb_reactivate_licence', array($this, 'ajax_reactivate_licence')); add_action('wp_ajax_wpmdb_process_notice_link', array($this, 'ajax_process_notice_link')); // external AJAX handlers add_action('wp_ajax_nopriv_wpmdb_verify_connection_to_remote_site', array($this, 'respond_to_verify_connection_to_remote_site')); add_action('wp_ajax_nopriv_wpmdb_remote_initiate_migration', array($this, 'respond_to_remote_initiate_migration')); add_action('wp_ajax_nopriv_wpmdb_process_chunk', array($this, 'respond_to_process_chunk')); add_action('wp_ajax_nopriv_wpmdb_process_pull_request', array($this, 'respond_to_process_pull_request')); add_action('wp_ajax_nopriv_wpmdb_fire_migration_complete', array($this, 'fire_migration_complete')); add_action('wp_ajax_nopriv_wpmdb_backup_remote_table', array($this, 'respond_to_backup_remote_table')); add_action('wp_ajax_nopriv_wpmdb_remote_finalize_migration', array($this, 'respond_to_remote_finalize_migration')); add_action('wp_ajax_nopriv_wpmdb_remote_flush', array($this, 'respond_to_remote_flush')); add_action('wp_ajax_nopriv_wpmdb_process_push_migration_cancellation', array($this, 'respond_to_process_push_migration_cancellation')); add_action('wp_ajax_nopriv_wpmdb_copy_licence_to_remote_site', array($this, 'respond_to_copy_licence_to_remote_site')); // Take over the update check add_filter('site_transient_update_plugins', array($this, 'site_transient_update_plugins')); // Add some custom JS into the WP admin pages add_action('admin_enqueue_scripts', array($this, 'enqueue_plugin_update_script')); // Add some custom CSS into the WP admin pages add_action('admin_head-plugins.php', array($this, 'add_plugin_update_styles')); // Hook into the plugin install process, inject addon download url add_filter('plugins_api', array($this, 'inject_addon_install_resource'), 10, 3); // Short circuit the HTTP request to WordPress.org for plugin information add_filter('plugins_api', array($this, 'short_circuit_wordpress_org_plugin_info_request'), 10, 3); // Clear update transients when the user clicks the "Check Again" button from the update screen add_action('current_screen', array($this, 'check_again_clear_transients')); // Add after_plugin_row... action for pro plugin and all addons add_action('after_plugin_row_wp-migrate-db-pro/wp-migrate-db-pro.php', array($this, 'plugin_row'), 11, 2); add_action('after_plugin_row_wp-migrate-db-pro-cli/wp-migrate-db-pro-cli.php', array($this, 'plugin_row'), 11, 2); add_action('after_plugin_row_wp-migrate-db-pro-media-files/wp-migrate-db-pro-media-files.php', array($this, 'plugin_row'), 11, 2); add_action('after_plugin_row_wp-migrate-db-pro-multisite-tools/wp-migrate-db-pro-multisite-tools.php', array($this, 'plugin_row'), 11, 2); // Seen when the user clicks "view details" on the plugin listing page add_action('install_plugins_pre_plugin-information', array($this, 'plugin_update_popup')); // Removes the exclude post revision functionality (as seen in the free version of the plugin) $this->remove_exclude_post_revision_functionality(); // Check if WP Engine is filtering the buffer and prevent it. Added here for ajax pull requests $this->maybe_disable_wp_engine_filtering(); $this->add_tabs(); }
function __construct($plugin_file_path) { $this->is_pro = true; $this->unhook_templates = array('exclude_post_revisions', 'wordpress_org_support', 'progress_upgrade', 'sidebar'); parent::__construct($plugin_file_path); // templating actions add_action('wpmdb_notices', array($this, 'template_outdated_addons_warning')); // Internal AJAX handlers add_action('wp_ajax_wpmdb_verify_connection_to_remote_site', array($this, 'ajax_verify_connection_to_remote_site')); add_action('wp_ajax_wpmdb_reset_api_key', array($this, 'ajax_reset_api_key')); add_action('wp_ajax_wpmdb_save_setting', array($this, 'ajax_save_setting')); add_action('wp_ajax_wpmdb_activate_licence', array($this, 'ajax_activate_licence')); add_action('wp_ajax_wpmdb_check_licence', array($this, 'ajax_check_licence')); // external AJAX handlers add_action('wp_ajax_nopriv_wpmdb_verify_connection_to_remote_site', array($this, 'respond_to_verify_connection_to_remote_site')); add_action('wp_ajax_nopriv_wpmdb_remote_initiate_migration', array($this, 'respond_to_remote_initiate_migration')); add_action('wp_ajax_nopriv_wpmdb_process_chunk', array($this, 'ajax_process_chunk')); add_action('wp_ajax_nopriv_wpmdb_process_pull_request', array($this, 'respond_to_process_pull_request')); add_action('wp_ajax_nopriv_wpmdb_fire_migration_complete', array($this, 'fire_migration_complete')); add_action('wp_ajax_nopriv_wpmdb_backup_remote_table', array($this, 'respond_to_backup_remote_table')); add_action('wp_ajax_nopriv_wpmdb_remote_finalize_migration', array($this, 'respond_to_remote_finalize_migration')); add_action('wp_ajax_nopriv_wpmdb_process_push_migration_cancellation', array($this, 'respond_to_process_push_migration_cancellation')); // Take over the update check add_filter('site_transient_update_plugins', array($this, 'site_transient_update_plugins')); // Add some custom JS into the WP admin pages add_action('admin_enqueue_scripts', array($this, 'enqueue_plugin_update_script')); // Add some custom CSS into the WP admin pages add_action('admin_head-plugins.php', array($this, 'add_plugin_update_styles')); // Hook into the plugin install process, inject addon download url add_action('plugins_api', array($this, 'inject_addon_install_resource'), 10, 3); // Clear update transients when the user clicks the "Check Again" button from the update screen add_action('current_screen', array($this, 'check_again_clear_transients')); // Removes the exclude post revision functionality (as seen in the free version of the plugin) $this->remove_exclude_post_revision_functionality(); $this->add_tabs(); // Stores a list of MySQL tables for use within the various plugin page templates $this->tables = $this->get_table_sizes(); }