advanced-import
Last commit date
admin
5 years ago
assets
5 years ago
includes
5 years ago
languages
5 years ago
LICENSE.txt
5 years ago
advanced-import.php
5 years ago
example.php
5 years ago
index.php
5 years ago
readme.txt
5 years ago
uninstall.php
5 years ago
advanced-import.php
82 lines
| 1 | <?php |
| 2 | // If this file is called directly, abort. |
| 3 | if ( ! defined( 'WPINC' ) ) { |
| 4 | echo 'Hi there! I\'m just a plugin, not much I can do when called directly.'; |
| 5 | exit; |
| 6 | } |
| 7 | /** |
| 8 | * |
| 9 | * @link https://addonspress.com/ |
| 10 | * @since 1.0.0 |
| 11 | * @package Advanced_Import |
| 12 | * |
| 13 | * @wordpress-plugin |
| 14 | * Plugin Name: Advanced Import |
| 15 | * Plugin URI: https://addonspress.com/item/advanced-import |
| 16 | * Description: Easily import demo data starter site packages or Migrate your site data |
| 17 | * Version: 1.3.2 |
| 18 | * Author: AddonsPress |
| 19 | * Author URI: https://addonspress.com/ |
| 20 | * License: GPL-2.0+ |
| 21 | * License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 22 | * Text Domain: advanced-import |
| 23 | * Domain Path: /languages |
| 24 | */ |
| 25 | |
| 26 | /*Define Constants for this plugin*/ |
| 27 | define( 'ADVANCED_IMPORT_VERSION', '1.3.2' ); |
| 28 | define( 'ADVANCED_IMPORT_PLUGIN_NAME', 'advanced-import' ); |
| 29 | define( 'ADVANCED_IMPORT_PATH', plugin_dir_path( __FILE__ ) ); |
| 30 | define( 'ADVANCED_IMPORT_URL', plugin_dir_url( __FILE__ ) ); |
| 31 | define( 'ADVANCED_IMPORT_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '.min' : '.min' ); |
| 32 | |
| 33 | $upload_dir = wp_upload_dir(); |
| 34 | $advanced_import_temp = $upload_dir['basedir'] . '/advanced-import-temp/'; |
| 35 | $advanced_import_temp_zip = $upload_dir['basedir'] . '/advanced-import-temp-zip/'; |
| 36 | $advanced_import_temp_uploads = $advanced_import_temp . '/uploads/'; |
| 37 | |
| 38 | define( 'ADVANCED_IMPORT_TEMP', $advanced_import_temp ); |
| 39 | define( 'ADVANCED_IMPORT_TEMP_ZIP', $advanced_import_temp_zip ); |
| 40 | define( 'ADVANCED_IMPORT_TEMP_UPLOADS', $advanced_import_temp_uploads ); |
| 41 | |
| 42 | /** |
| 43 | * The code that runs during plugin activation. |
| 44 | * This action is documented in includes/class-advanced-import-activator.php |
| 45 | */ |
| 46 | function activate_advanced_import() { |
| 47 | require_once ADVANCED_IMPORT_PATH . 'includes/class-advanced-import-activator.php'; |
| 48 | Advanced_Import_Activator::activate(); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * The code that runs during plugin deactivation. |
| 53 | * This action is documented in includes/class-advanced-import-deactivator.php |
| 54 | */ |
| 55 | function deactivate_advanced_import() { |
| 56 | require_once ADVANCED_IMPORT_PATH . 'includes/class-advanced-import-deactivator.php'; |
| 57 | Advanced_Import_Deactivator::deactivate(); |
| 58 | } |
| 59 | |
| 60 | register_activation_hook( __FILE__, 'activate_advanced_import' ); |
| 61 | register_deactivation_hook( __FILE__, 'deactivate_advanced_import' ); |
| 62 | |
| 63 | /** |
| 64 | * The core plugin class that is used to define internationalization, |
| 65 | * admin-specific hooks, and public-facing site hooks. |
| 66 | */ |
| 67 | require ADVANCED_IMPORT_PATH . 'includes/class-advanced-import.php'; |
| 68 | |
| 69 | /** |
| 70 | * Begins execution of the plugin. |
| 71 | * |
| 72 | * Since everything within the plugin is registered via hooks, |
| 73 | * then kicking off the plugin from this point in the file does |
| 74 | * not affect the page life cycle. |
| 75 | * |
| 76 | * @since 1.0.0 |
| 77 | */ |
| 78 | function advanced_import() { |
| 79 | return Advanced_Import::instance(); |
| 80 | } |
| 81 | advanced_import(); |
| 82 |