- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
50 lines
1.7 KiB
PHP
Executable File
50 lines
1.7 KiB
PHP
Executable File
<?php //phpcs:ignore WordPress.Files.FileName.NotHyphenatedLowercase -- This filename format is intentionally used to match the plugin version.
|
|
/**
|
|
* The Updates routine for version 1.0.239.
|
|
*
|
|
* @since 1.0.239
|
|
* @package RankMath
|
|
* @subpackage RankMath\Updates
|
|
* @author Rank Math <support@rankmath.com>
|
|
*/
|
|
|
|
use RankMath\KB;
|
|
use RankMath\Helper;
|
|
use RankMath\Helpers\Str;
|
|
use RankMath\Google\Analytics;
|
|
|
|
defined( 'ABSPATH' ) || exit;
|
|
|
|
/**
|
|
* Displays an admin notice to users with a Universal Analytics (UA) property, informing them to update to Google Analytics 4 (GA4).
|
|
*/
|
|
function rank_math_1_0_239_force_to_connect_ga4() {
|
|
if ( ! Analytics::is_analytics_connected() ) {
|
|
return;
|
|
}
|
|
|
|
$analytics = get_option( 'rank_math_google_analytic_options' );
|
|
|
|
if ( ! isset( $analytics['property_id'] ) || ! Str::starts_with( 'UA-', $analytics['property_id'] ) ) {
|
|
return;
|
|
}
|
|
|
|
Helper::add_notification(
|
|
sprintf(
|
|
// Translators: placeholders are opening and closing tags for connect analytics setting and using ga4 property doc.
|
|
__( 'Universal Analytics (UA) is no longer supported. Please connect your Google Analytics GA4 account by navigating to %1$sGeneral Settings → Analytics%2$s. For more details, refer to this guide: %3$sHow to Use Google Analytics 4 (GA4) Property with Rank Math%4$s.', 'rank-math' ),
|
|
'<a href="' . esc_url( Helper::get_admin_url( 'options-general#setting-panel-analytics' ) ) . '">',
|
|
'</a>',
|
|
'<a href="' . KB::get( 'using-ga4', 'Analytics GA4 KB' ) . '" target="_blank">',
|
|
'</a>'
|
|
),
|
|
[
|
|
'id' => 'upgrade-ua-to-ga4',
|
|
'type' => 'error',
|
|
'classes' => 'is-dismissible',
|
|
]
|
|
);
|
|
}
|
|
|
|
rank_math_1_0_239_force_to_connect_ga4();
|