Skip to content

Commit

Permalink
v 0.87.0
Browse files Browse the repository at this point in the history
Diagnostic : test RSS feed.
  • Loading branch information
Darklg committed Feb 12, 2024
1 parent b4fbd70 commit 97919f6
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions tools/diagnostic/inc/40-wordpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,33 @@ function wputools_diagnostic_check_is_preproduction($domainName) {
$wputools_errors[] = sprintf('Homepage took %s seconds to load.', $info['total_time']);
}

/* ----------------------------------------------------------
Check RSS
---------------------------------------------------------- */

function wputools_test_rss_feed($rss_url) {
global $wputools_errors;

if (empty($rss_url)) {
$wputools_errors[] = __('The RSS URL is empty.');
return;
}

$rss_content = @simplexml_load_file($rss_url);
if ($rss_content === false) {
$wputools_errors[] = __('Failed to load RSS feed. Please check the URL.');
return;
}

$items = $rss_content->channel->item;
if (empty($items)) {
$wputools_errors[] = __('No articles found in the RSS feed.');
return;
}
}

wputools_test_rss_feed(site_url() . '/feed');

/* ----------------------------------------------------------
Compare WP Version
---------------------------------------------------------- */
Expand Down
2 changes: 1 addition & 1 deletion wputools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

WPUTools(){

local _WPUTOOLS_VERSION='0.86.0';
local _WPUTOOLS_VERSION='0.87.0';
local _PHP_VERSIONS=(7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5 9.0)
local _PHP_VERSIONS_OBSOLETES=(7.0 7.1 7.2 7.3 7.4)
local _PHP_VERSIONS_ADVANCED=(8.2 8.3 8.4 8.5 9.0)
Expand Down

0 comments on commit 97919f6

Please sign in to comment.