Skip to content

Commit

Permalink
4.5.5 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
cristian-rossi committed Jan 25, 2024
1 parent 4660154 commit a78078a
Show file tree
Hide file tree
Showing 74 changed files with 5,511 additions and 4,834 deletions.
2 changes: 1 addition & 1 deletion all_in_one_seo_pack.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 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.5.4
* Version: 4.5.5
* Text Domain: all-in-one-seo-pack
* Domain Path: /languages
*
Expand Down
20 changes: 16 additions & 4 deletions app/Common/Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ public function __construct() {
add_filter( 'language_attributes', [ $this, 'alwaysAddHtmlDirAttribute' ], 3000 );

add_action( 'sanitize_comment_cookies', [ $this, 'init' ], 20 );

add_action( 'admin_menu', [ $this, 'deactivationSurvey' ], 100 );
}

/**
* Runs the deactivation survey.
*
* @since 4.5.5
*
* @return void
*/
public function deactivationSurvey() {
new DeactivationSurvey( AIOSEO_PLUGIN_NAME, dirname( plugin_basename( AIOSEO_FILE ) ) );
}

/**
Expand Down Expand Up @@ -758,7 +771,7 @@ public function page() {
* @return void
*/
public function hooks() {
$currentScreen = function_exists( 'get_current_screen' ) ? get_current_screen() : false;
$currentScreen = aioseo()->helpers->getCurrentScreen();
global $admin_page_hooks;

if ( ! is_object( $currentScreen ) || empty( $currentScreen->id ) || empty( $admin_page_hooks ) ) {
Expand Down Expand Up @@ -874,7 +887,8 @@ function_exists( 'exactmetrics_get_ua' )
* @return bool Whether the current page is an AIOSEO menu page.
*/
public function isAioseoScreen() {
if ( ! function_exists( 'get_current_screen' ) ) {
$currentScreen = aioseo()->helpers->getCurrentScreen();
if ( empty( $currentScreen->id ) ) {
return false;
}

Expand All @@ -887,8 +901,6 @@ public function isAioseoScreen() {
return 'all-in-one-seo_page_' . $slug;
}, $adminPages );

$currentScreen = get_current_screen();

return in_array( $currentScreen->id, $adminPages, true );
}

Expand Down
15 changes: 3 additions & 12 deletions app/Common/Admin/ConflictingPlugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,22 @@ class ConflictingPlugins {
*
* @var array
*/
private $conflictingPluginSlugs = [
protected $conflictingPluginSlugs = [
// Note: We should NOT add Jetpack here since they automatically disable their SEO module when ours is active.
'wordpress-seo',
'seo-by-rank-math',
'wp-seopress',
'autodescription',
'slim-seo',
'squirrly-seo',
'redirection',
'eps-301-redirects',
'simple-301-redirects',
'301-redirects',
'404-to-homepage',
'quick-301-redirects',
'all-404-redirect-to-homepage',
'redirect-redirection',
'safe-redirect-manager',
'google-sitemap-generator',
'xml-sitemap-feed',
'www-xml-sitemap-generator-org',
'google-sitemap-plugin',
];

/**
* Class Constructor.
* Class constructor.
*
* @since 4.0.0
*/
Expand All @@ -55,7 +46,7 @@ public function __construct() {
return;
}

add_action( 'init', [ $this, 'init' ] );
add_action( 'init', [ $this, 'init' ], 20 );
}

/**
Expand Down
6 changes: 5 additions & 1 deletion app/Common/Admin/Dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ private function enqueue() {
*/
public function displayRssDashboardWidget() {
// Check if the user has chosen not to display this widget through screen options.
$currentScreen = get_current_screen();
$currentScreen = aioseo()->helpers->getCurrentScreen();
if ( empty( $currentScreen->id ) ) {
return;
}

$hiddenWidgets = get_user_meta( get_current_user_id(), 'metaboxhidden_' . $currentScreen->id );
if ( $hiddenWidgets && count( $hiddenWidgets ) > 0 && is_array( $hiddenWidgets[0] ) && in_array( 'aioseo-rss-feed', $hiddenWidgets[0], true ) ) {
return;
Expand Down
Loading

0 comments on commit a78078a

Please sign in to comment.