PluginProbe ʕ •ᴥ•ʔ
Advanced Import / trunk
Advanced Import vtrunk
trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 2.0.0
advanced-import / advanced-import.php
advanced-import Last commit date
admin 1 month ago assets 1 month ago build 1 month ago includes 1 month ago languages 6 years ago LICENSE.txt 6 years ago advanced-import.php 1 month ago index.php 5 years ago readme.txt 1 month ago uninstall.php 1 month ago
advanced-import.php
84 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 for WordPress sites, including posts, pages, media, widgets, customizer settings, and Gutenberg Blocks with ease.
17 * Version: 2.0.0
18 * Requires at least: 6.2
19 * Requires PHP: 7.4
20 * Author: AddonsPress
21 * Author URI: https://addonspress.com/
22 * License: GPL-2.0+
23 * License URI: http://www.gnu.org/licenses/gpl-2.0.txt
24 * Text Domain: advanced-import
25 * Domain Path: /languages
26 */
27
28 /*Define Constants for this plugin*/
29 define( 'ADVANCED_IMPORT_VERSION', '2.0.0' );
30 define( 'ADVANCED_IMPORT_PLUGIN_NAME', 'advanced-import' );
31 define( 'ADVANCED_IMPORT_PATH', plugin_dir_path( __FILE__ ) );
32 define( 'ADVANCED_IMPORT_URL', plugin_dir_url( __FILE__ ) );
33 define( 'ADVANCED_IMPORT_SCRIPT_PREFIX', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min' );
34
35 $advanced_import_upload_dir = wp_upload_dir();
36 $advanced_import_temp = $advanced_import_upload_dir['basedir'] . '/advanced-import-temp/';
37 $advanced_import_temp_zip = $advanced_import_upload_dir['basedir'] . '/advanced-import-temp-zip/';
38 $advanced_import_temp_uploads = $advanced_import_temp . '/uploads/';
39
40 define( 'ADVANCED_IMPORT_TEMP', $advanced_import_temp );
41 define( 'ADVANCED_IMPORT_TEMP_ZIP', $advanced_import_temp_zip );
42 define( 'ADVANCED_IMPORT_TEMP_UPLOADS', $advanced_import_temp_uploads );
43
44 /**
45 * The code that runs during plugin activation.
46 * This action is documented in includes/class-advanced-import-activator.php
47 */
48 function advanced_import_activate() {
49 require_once ADVANCED_IMPORT_PATH . 'includes/class-advanced-import-activator.php';
50 Advanced_Import_Activator::activate();
51 }
52
53 /**
54 * The code that runs during plugin deactivation.
55 * This action is documented in includes/class-advanced-import-deactivator.php
56 */
57 function advanced_import_deactivate() {
58 require_once ADVANCED_IMPORT_PATH . 'includes/class-advanced-import-deactivator.php';
59 Advanced_Import_Deactivator::deactivate();
60 }
61
62 register_activation_hook( __FILE__, 'advanced_import_activate' );
63 register_deactivation_hook( __FILE__, 'advanced_import_deactivate' );
64
65 /**
66 * The core plugin class that is used to define internationalization,
67 * admin-specific hooks, and public-facing site hooks.
68 */
69 require ADVANCED_IMPORT_PATH . 'includes/class-advanced-import.php';
70
71 /**
72 * Begins execution of the plugin.
73 *
74 * Since everything within the plugin is registered via hooks,
75 * then kicking off the plugin from this point in the file does
76 * not affect the page life cycle.
77 *
78 * @since 1.0.0
79 */
80 function advanced_import() {
81 return Advanced_Import::instance();
82 }
83 advanced_import();
84