-
Notifications
You must be signed in to change notification settings - Fork 155
/
all_in_one_seo_pack.php
98 lines (83 loc) · 3.33 KB
/
all_in_one_seo_pack.php
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<?php
/**
* Plugin Name: All in One SEO
* Plugin URI: https://aioseo.com/
* Description: SEO for WordPress. Features like XML Sitemaps, SEO for custom post types, SEO for blogs, business sites, ecommerce sites, and much more. More than 100 million downloads since 2007.
* Author: All in One SEO Team
* Author URI: https://aioseo.com/
* Version: 4.7.6
* Text Domain: all-in-one-seo-pack
* Domain Path: /languages
* License: GPL-3.0+
*
* All in One SEO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* any later version.
*
* All in One SEO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with AIOSEO. If not, see <https://www.gnu.org/licenses/>.
*
* @since 4.0.0
* @author All in One SEO Team
* @package AIOSEO\Plugin
* @license GPL-3.0+
* @copyright Copyright © 2024, All in One SEO
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
require_once dirname( __FILE__ ) . '/app/init/init.php';
// Check if this plugin should be disabled.
if ( aioseoMaybePluginIsDisabled( __FILE__ ) ) {
return;
}
if ( ! defined( 'AIOSEO_PHP_VERSION_DIR' ) ) {
define( 'AIOSEO_PHP_VERSION_DIR', basename( dirname( __FILE__ ) ) );
}
require_once dirname( __FILE__ ) . '/app/init/notices.php';
require_once dirname( __FILE__ ) . '/app/init/activation.php';
// We require PHP 7.0 or higher for the whole plugin to work.
if ( version_compare( PHP_VERSION, '7.0', '<' ) ) {
add_action( 'admin_notices', 'aioseo_php_notice' );
// Do not process the plugin code further.
return;
}
// We require WordPress 5.3+ for the whole plugin to work.
// Support for 5.3 is scheduled to be dropped in April 2025. 5.4, 5.5 and 5.6 will be dropped at the end of 2025.
global $wp_version;
if ( version_compare( $wp_version, '5.3', '<' ) ) {
add_action( 'admin_notices', 'aioseo_wordpress_notice' );
// Do not process the plugin code further.
return;
}
if ( ! defined( 'AIOSEO_DIR' ) ) {
define( 'AIOSEO_DIR', __DIR__ );
}
if ( ! defined( 'AIOSEO_FILE' ) ) {
define( 'AIOSEO_FILE', __FILE__ );
}
// Don't allow multiple versions to be active.
if ( function_exists( 'aioseo' ) ) {
add_action( 'activate_all-in-one-seo-pack/all_in_one_seo_pack.php', 'aioseo_lite_just_activated' );
add_action( 'deactivate_all-in-one-seo-pack/all_in_one_seo_pack.php', 'aioseo_lite_just_deactivated' );
add_action( 'activate_all-in-one-seo-pack-pro/all_in_one_seo_pack.php', 'aioseo_pro_just_activated' );
add_action( 'admin_notices', 'aioseo_lite_notice' );
// Do not process the plugin code further.
return;
}
// We will be deprecating these versions of PHP in the future, so let's let the user know.
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
add_action( 'admin_notices', 'aioseo_php_notice_deprecated' );
}
// Define the class and the function.
// The AIOSEOAbstract class is required here because it can't be autoloaded.
require_once dirname( __FILE__ ) . '/app/AIOSEOAbstract.php';
require_once dirname( __FILE__ ) . '/app/AIOSEO.php';
aioseo();