Skip to content

Commit 7ed1ff8

Browse files
committed
4.8.8 Release
1 parent d22e3d3 commit 7ed1ff8

File tree

110 files changed

+7222
-1890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+7222
-1890
lines changed

all_in_one_seo_pack.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* 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.
66
* Author: All in One SEO Team
77
* Author URI: https://aioseo.com/
8-
* Version: 4.8.7.2
8+
* Version: 4.8.8
99
* Text Domain: all-in-one-seo-pack
1010
* Domain Path: /languages
1111
* License: GPL-3.0+
@@ -57,8 +57,7 @@
5757
return;
5858
}
5959

60-
// We require WordPress 5.4+ for the whole plugin to work.
61-
// Support for 5.4, 5.5 and 5.6 will be dropped at the end of 2025.
60+
// We require WordPress 5.7 or higher for the whole plugin to work.
6261
global $wp_version; // phpcs:ignore Squiz.NamingConventions.ValidVariableName
6362
if ( version_compare( $wp_version, '5.7', '<' ) ) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName
6463
add_action( 'admin_notices', 'aioseo_wordpress_notice' );
@@ -86,6 +85,7 @@
8685
}
8786

8887
// We will be deprecating these versions of PHP in the future, so we'll let the user know.
88+
// We flag deprecated WP versions in the DeprecatedWordPress class.
8989
if ( version_compare( PHP_VERSION, '7.4', '<' ) ) {
9090
add_action( 'admin_notices', 'aioseo_php_notice_deprecated' );
9191
}

app/AIOSEO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ public function load() {
335335
$this->seoAnalysis = $this->pro ? new Pro\SeoAnalysis\SeoAnalysis() : new Common\SeoAnalysis\SeoAnalysis();
336336
$this->thirdParty = new Common\ThirdParty\ThirdParty();
337337
$this->writingAssistant = new Common\WritingAssistant\WritingAssistant();
338-
$this->llms = new Common\Llms\Llms();
338+
$this->llms = $this->pro ? new Pro\Llms\Llms() : new Common\Llms\Llms();
339339

340340
if ( ! wp_doing_ajax() && ! wp_doing_cron() ) {
341341
$this->rss = new Common\Rss();

app/AIOSEOAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ abstract class AIOSEOAbstract {
613613
*
614614
* @since 4.8.4
615615
*
616-
* @var \AIOSEO\Plugin\Common\Llms\Llms
616+
* @var \AIOSEO\Plugin\Common\Llms\Llms|\AIOSEO\Plugin\Pro\Llms\Llms
617617
*/
618618
public $llms = null;
619619
}

app/Common/Admin/Notices/DeprecatedWordPress.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
* @since 4.1.2
1313
*/
1414
class DeprecatedWordPress {
15+
/**
16+
* The new minimum version of WordPress.
17+
*
18+
* @since 4.8.8
19+
*
20+
* @var string
21+
*/
22+
private $newMinVersion = '6.0';
23+
1524
/**
1625
* Class Constructor.
1726
*
@@ -29,9 +38,7 @@ public function __construct() {
2938
* @return void
3039
*/
3140
public function maybeShowNotice() {
32-
global $wp_version; // phpcs:ignore Squiz.NamingConventions.ValidVariableName
33-
34-
$dismissed = get_option( '_aioseo_deprecated_wordpress_dismissed', true );
41+
$dismissed = get_option( '_aioseo_deprecated_wordpress_dismissed_' . $this->newMinVersion, true );
3542
if ( '1' === $dismissed ) {
3643
return;
3744
}
@@ -42,7 +49,8 @@ public function maybeShowNotice() {
4249
}
4350

4451
// Show if WordPress version is deprecated.
45-
if ( version_compare( $wp_version, '5.4', '>=' ) ) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName
52+
global $wp_version; // phpcs:ignore Squiz.NamingConventions.ValidVariableName
53+
if ( ! version_compare( $wp_version, $this->newMinVersion, '<' ) ) { // phpcs:ignore Squiz.NamingConventions.ValidVariableName
4654
return;
4755
}
4856

@@ -82,11 +90,12 @@ public function showNotice() {
8290
echo wp_kses(
8391
sprintf(
8492
// phpcs:ignore Generic.Files.LineLength.MaxExceeded
85-
// Translators: 1 - Opening HTML bold tag, 2 - Closing HTML bold tag, 3 - The short plugin name ("AIOSEO"), 4 - The current year, 5 - Opening HTML link tag, 6 - Closing HTML link tag.
86-
__( '%1$sNote:%2$s %3$s will be discontinuing support for WordPress versions older than version 5.7 by the end of %4$s. %5$sRead more for additional information.%6$s', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
93+
// Translators: 1 - Opening HTML bold tag, 2 - Closing HTML bold tag, 3 - The short plugin name ("AIOSEO"), 4 - The WordPress version, 5 - The current year, 6 - Opening HTML link tag, 7 - Closing HTML link tag.
94+
__( '%1$sNote:%2$s %3$s will be discontinuing support for WordPress versions older than version %4$s by the end of %5$s. %6$sRead more for additional information.%7$s', 'all-in-one-seo-pack' ), // phpcs:ignore Generic.Files.LineLength.MaxExceeded
8795
'<strong>',
8896
'</strong>',
8997
'AIOSEO',
98+
$this->newMinVersion,
9099
gmdate( 'Y' ),
91100
'<a href="https://aioseo.com/docs/update-wordpress/?utm_source=WordPress&utm_medium=' . $medium . '&utm_campaign=outdated-wordpress-notice" target="_blank" rel="noopener noreferrer">', // phpcs:ignore Generic.Files.LineLength.MaxExceeded
92101
'</a>'
@@ -160,7 +169,7 @@ public function dismissNotice() {
160169

161170
check_ajax_referer( 'aioseo-dismiss-deprecated-wordpress', 'nonce' );
162171

163-
update_option( '_aioseo_deprecated_wordpress_dismissed', true );
172+
update_option( '_aioseo_deprecated_wordpress_dismissed_' . $this->newMinVersion, true );
164173

165174
return wp_send_json_success();
166175
}

app/Common/Ai/Ai.php

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
* @since 4.8.4
1414
*/
1515
class Ai {
16+
/**
17+
* The image class.
18+
*
19+
* @since 4.8.8
20+
*
21+
* @var Image|null
22+
*/
23+
public $image = null;
24+
1625
/**
1726
* The base URL for the licensing server.
1827
*
@@ -22,6 +31,16 @@ class Ai {
2231
*/
2332
private $licensingUrl = 'https://licensing.aioseo.com/v1/';
2433

34+
/**
35+
* The AI Generator API URL.
36+
*
37+
* @since 4.8.4
38+
* @version 4.8.8 Moved from {@see \AIOSEO\Plugin\Common\Api\Ai}.
39+
*
40+
* @var string
41+
*/
42+
private $aiGeneratorApiUrl = 'https://ai-generator.aioseo.com/v1/';
43+
2544
/**
2645
* The action name for fetching credits.
2746
*
@@ -51,6 +70,8 @@ public function __construct() {
5170

5271
aioseo()->core->cache->update( 'ai_get_credits', true, 5 * MINUTE_IN_SECONDS );
5372
}
73+
74+
$this->image = new Image();
5475
}
5576

5677
/**
@@ -101,6 +122,9 @@ public function getAccessToken( $refresh = false ) {
101122
aioseo()->internalOptions->internal->ai->accessToken = sanitize_text_field( $data->accessToken );
102123
aioseo()->internalOptions->internal->ai->isTrialAccessToken = $data->isFree ?? false;
103124

125+
// Reset the manually connected flag when getting a new token automatically.
126+
aioseo()->internalOptions->internal->ai->isManuallyConnected = false;
127+
104128
// Fetch the credit totals.
105129
$this->updateCredits( true );
106130
}
@@ -227,4 +251,16 @@ protected function getApiUrl() {
227251

228252
return $this->licensingUrl;
229253
}
254+
255+
/**
256+
* Returns the AI Generator API URL.
257+
*
258+
* @since 4.8.4
259+
* @version 4.8.8 Moved from {@see \AIOSEO\Plugin\Common\Api\Ai}.
260+
*
261+
* @return string The AI Generator API URL.
262+
*/
263+
public function getAiGeneratorApiUrl() {
264+
return defined( 'AIOSEO_AI_GENERATOR_URL' ) ? AIOSEO_AI_GENERATOR_URL : $this->aiGeneratorApiUrl;
265+
}
230266
}

0 commit comments

Comments
 (0)