Пример #1
0
 function __construct($plugin_file_path)
 {
     parent::__construct($plugin_file_path);
     $this->plugin_slug = 'wp-sync-db-cli';
     $this->plugin_version = $GLOBALS['wpsdb_meta']['wp-sync-db-cli']['version'];
     if (!$this->meets_version_requirements('1.4b1')) {
         return;
     }
 }
 function __construct($plugin_file_path)
 {
     parent::__construct($plugin_file_path);
     $this->plugin_slug = 'wp-sync-db-media-files';
     $this->plugin_version = $GLOBALS['wpsdb_meta']['wp-sync-db-media-files']['version'];
     if (!$this->meets_version_requirements('1.4b1')) {
         return;
     }
     add_action('wpsdb_after_advanced_options', array($this, 'migration_form_controls'));
     add_action('wpsdb_load_assets', array($this, 'load_assets'));
     add_action('wpsdb_js_variables', array($this, 'js_variables'));
     add_filter('wpsdb_accepted_profile_fields', array($this, 'accepted_profile_fields'));
     add_filter('wpsdb_establish_remote_connection_data', array($this, 'establish_remote_connection_data'));
     add_filter('wpsdb_nonces', array($this, 'add_nonces'));
     // compatibility with CLI migraitons
     add_filter('wpsdb_cli_finalize_migration', array($this, 'cli_migration'), 10, 4);
     // internal AJAX handlers
     add_action('wp_ajax_wpsdbmf_determine_media_to_migrate', array($this, 'ajax_determine_media_to_migrate'));
     add_action('wp_ajax_wpsdbmf_migrate_media', array($this, 'ajax_migrate_media'));
     // external AJAX handlers
     add_action('wp_ajax_nopriv_wpsdbmf_get_remote_media_listing', array($this, 'respond_to_get_remote_media_listing'));
     add_action('wp_ajax_nopriv_wpsdbmf_push_request', array($this, 'respond_to_push_request'));
     add_action('wp_ajax_nopriv_wpsdbmf_remove_local_attachments', array($this, 'respond_to_remove_local_attachments'));
 }