-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatic-export-wp.php
More file actions
45 lines (39 loc) · 1.49 KB
/
static-export-wp.php
File metadata and controls
45 lines (39 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* Plugin Name: Static Export WP
* Plugin URI: https://github.com/open-wp-club/static-export-wp
* Description: Export your WordPress site as static HTML files. Crawls every page and saves a complete static copy with all assets.
* Version: 1.0.0
* Requires at least: 6.4
* Requires PHP: 8.3
* Author: Static Export WP Contributors
* Author URI: https://github.com/open-wp-club/static-export-wp
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: static-export-wp
* Domain Path: /languages
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
define( 'SEWP_VERSION', '1.1.0' );
define( 'SEWP_FILE', __FILE__ );
define( 'SEWP_PATH', plugin_dir_path( __FILE__ ) );
define( 'SEWP_URL', plugin_dir_url( __FILE__ ) );
if ( version_compare( PHP_VERSION, '8.3', '<' ) ) {
add_action( 'admin_notices', function () {
printf(
'<div class="notice notice-error"><p>%s</p></div>',
esc_html__( 'Static Export WP requires PHP 8.3 or higher.', 'static-export-wp' )
);
} );
return;
}
if ( file_exists( SEWP_PATH . 'vendor/autoload.php' ) ) {
require_once SEWP_PATH . 'vendor/autoload.php';
}
register_activation_hook( SEWP_FILE, [ \StaticExportWP\Core\Activator::class, 'activate' ] );
register_deactivation_hook( SEWP_FILE, [ \StaticExportWP\Core\Deactivator::class, 'deactivate' ] );
add_action( 'plugins_loaded', function () {
\StaticExportWP\Core\Plugin::instance()->boot();
} );