Skip to content

Commit 20dd973

Browse files
committed
4.8.6 Release
1 parent b755f44 commit 20dd973

Some content is hidden

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

66 files changed

+4114
-799
lines changed

all_in_one_seo_pack.php

Lines changed: 1 addition & 1 deletion
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.5
8+
* Version: 4.8.6
99
* Text Domain: all-in-one-seo-pack
1010
* Domain Path: /languages
1111
* License: GPL-3.0+

app/AIOSEO.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ public function load() {
333333
$this->crawlCleanup = new Common\QueryArgs\CrawlCleanup();
334334
$this->searchCleanup = new Common\SearchCleanup\SearchCleanup();
335335
$this->emailReports = new Common\EmailReports\EmailReports();
336+
$this->seoAnalysis = $this->pro ? new Pro\SeoAnalysis\SeoAnalysis() : new Common\SeoAnalysis\SeoAnalysis();
336337
$this->thirdParty = new Common\ThirdParty\ThirdParty();
337338
$this->writingAssistant = new Common\WritingAssistant\WritingAssistant();
338339
$this->llms = new Common\Llms\Llms();

app/AIOSEOAbstract.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,15 @@ abstract class AIOSEOAbstract {
581581
*/
582582
public $emailReports = null;
583583

584+
/**
585+
* SEO Analysis class instance.
586+
*
587+
* @since 4.8.6
588+
*
589+
* @var \AIOSEO\Plugin\Pro\SeoAnalysis\SeoAnalysis
590+
*/
591+
public $seoAnalysis = null;
592+
584593
/**
585594
* ThirdParty class instance.
586595
*

app/Common/Ai/Ai.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct() {
4343
add_action( $this->creditFetchAction, [ $this, 'updateCredits' ] );
4444

4545
// If param is set, fetch credits but just once per 5 minutes to prevent abuse.
46-
if ( isset( $_REQUEST['aioseo-ai-credits'] ) && ! aioseo()->core->cache->get( 'ai_get_credits' ) ) { // phpcs:ignore HM.Security.NonceVerification.Recommended
46+
if ( isset( $_REQUEST['aioseo-ai-credits'] ) && ! aioseo()->core->cache->get( 'ai_get_credits' ) ) { // phpcs:ignore HM.Security.NonceVerification.Recommended, WordPress.Security.NonceVerification.Recommended
4747
add_action( 'init', [ $this, 'updateCredits' ] );
4848

4949
aioseo()->core->cache->update( 'ai_get_credits', true, 5 * MINUTE_IN_SECONDS );

app/Common/Api/Analyze.php

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public static function analyzeSite( $request ) {
2929
$analyzeOrHomeUrl = ! empty( $analyzeUrl ) ? $analyzeUrl : home_url();
3030
$responseCode = null === aioseo()->core->cache->get( 'analyze_site_code' ) ? [] : aioseo()->core->cache->get( 'analyze_site_code' );
3131
$responseBody = null === aioseo()->core->cache->get( 'analyze_site_body' ) ? [] : aioseo()->core->cache->get( 'analyze_site_body' );
32+
3233
if (
3334
empty( $responseCode ) ||
3435
empty( $responseCode[ $analyzeOrHomeUrl ] ) ||
@@ -74,18 +75,23 @@ public static function analyzeSite( $request ) {
7475
'score' => $responseBody[ $analyzeOrHomeUrl ]['score']
7576
], $analyzeUrl );
7677

78+
// Get all competitors results parsed and sanitized.
7779
$result = SeoAnalyzerResult::getCompetitorsResults();
7880

7981
return new \WP_REST_Response( $result, 200 );
8082
}
8183

8284
$results = $responseBody[ $analyzeOrHomeUrl ]['results'];
85+
8386
SeoAnalyzerResult::addResults( [
8487
'results' => $results,
8588
'score' => $responseBody[ $analyzeOrHomeUrl ]['score']
8689
] );
8790

88-
return new \WP_REST_Response( $responseBody[ $analyzeOrHomeUrl ], 200 );
91+
// Get all results parsed and sanitized.
92+
$allResults = SeoAnalyzerResult::getResults();
93+
94+
return new \WP_REST_Response( $allResults, 200 );
8995
}
9096

9197
/**
@@ -184,22 +190,6 @@ public static function deleteHeadline( $request ) {
184190
return new \WP_REST_Response( $headlines, 200 );
185191
}
186192

187-
/**
188-
* Get Homepage results.
189-
*
190-
* @since 4.8.3
191-
*
192-
* @return \WP_REST_Response The response.
193-
*/
194-
public static function getHomeResults() {
195-
$results = SeoAnalyzerResult::getResults();
196-
197-
return new \WP_REST_Response( [
198-
'success' => true,
199-
'result' => $results,
200-
], 200 );
201-
}
202-
203193
/**
204194
* Get competitors results.
205195
*

app/Common/Api/Api.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class Api {
4343
'writing-assistant/user-info' => [ 'callback' => [ 'WritingAssistant', 'getUserInfo' ], 'access' => 'aioseo_page_writing_assistant_settings' ],
4444
'writing-assistant/user-options' => [ 'callback' => [ 'WritingAssistant', 'getUserOptions' ], 'access' => 'aioseo_page_writing_assistant_settings' ],
4545
'writing-assistant/report-history' => [ 'callback' => [ 'WritingAssistant', 'getReportHistory' ], 'access' => 'aioseo_page_writing_assistant_settings' ],
46-
'seo-analysis/homeresults' => [ 'callback' => [ 'Analyze', 'getHomeResults' ], 'access' => 'aioseo_seo_analysis_settings' ],
4746
'seo-analysis/competitors' => [ 'callback' => [ 'Analyze', 'getCompetitorsResults' ], 'access' => 'aioseo_seo_analysis_settings' ]
4847
],
4948
'POST' => [

app/Common/Core/Core.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class Core {
4141
'aioseo_search_statistics_keyword_groups',
4242
'aioseo_search_statistics_keyword_relationships',
4343
'aioseo_revisions',
44+
'aioseo_seo_analyzer_objects',
45+
'aioseo_seo_analyzer_results',
4446
'aioseo_seo_analyzer_results',
4547
'aioseo_writing_assistant_keywords',
4648
'aioseo_writing_assistant_posts'

app/Common/Models/SeoAnalyzerResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public static function addResults( $results, $competitorUrl = null ) {
196196
];
197197

198198
if ( ! is_array( $result ) ) {
199-
$fields['metadata'] = [ 'value' => $result ];
199+
$fields['metadata'] = [ 'value' => sanitize_text_field( $result ) ];
200200
} else {
201201
$metadata = [];
202202
foreach ( $result as $key => $value ) {

app/Common/Options/DynamicOptions.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ class DynamicOptions {
4242
'postTypes' => [],
4343
'taxonomies' => [],
4444
'archives' => []
45+
],
46+
'seoAnalysis' => [
47+
'postTypes' => [
48+
'all' => [ 'type' => 'boolean', 'default' => true ],
49+
'included' => [ 'type' => 'array', 'default' => [ 'post', 'page' ] ],
50+
],
51+
'postStatuses' => [
52+
'all' => [ 'type' => 'boolean', 'default' => false ],
53+
'included' => [ 'type' => 'array', 'default' => [ 'publish', 'draft', 'private' ] ],
54+
],
55+
'taxonomies' => [
56+
'all' => [ 'type' => 'boolean', 'default' => true ],
57+
'included' => [ 'type' => 'array', 'default' => [] ],
58+
],
59+
'excludePosts' => [ 'type' => 'array', 'default' => [] ],
60+
'excludeTerms' => [ 'type' => 'array', 'default' => [] ]
4561
]
4662
// phpcs:enable WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
4763
];

app/Common/Schema/Graphs/BreadcrumbList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class BreadcrumbList extends Graph {
2020
* @return array The graph data.
2121
*/
2222
public function get() {
23-
$breadcrumbs = aioseo()->breadcrumbs->frontend->getBreadcrumbs() ?? '';
23+
$breadcrumbs = aioseo()->breadcrumbs->frontend->getBreadcrumbs() ?? [];
2424
if ( ! $breadcrumbs ) {
2525
return [];
2626
}

0 commit comments

Comments
 (0)