Skip to content

Commit

Permalink
Move Yoast dependency notice to new dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
leonidasmi committed Sep 25, 2024
1 parent d3f4d0d commit dcbb3ef
Showing 1 changed file with 46 additions and 14 deletions.
60 changes: 46 additions & 14 deletions inc/dependencies/dependency-yoast-seo.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,30 @@ public function register_notifications() {
* @return void
*/
public function message_plugin_not_activated() {
$message = sprintf(
/* translators: %1$s resolves to ACF Content Analysis for Yoast SEO, %2$s resolves to Yoast SEO. */
__( '%1$s requires %2$s to be installed and activated.', 'acf-content-analysis-for-yoast-seo' ),
'ACF Content Analysis for Yoast SEO',
'Yoast SEO'
echo (
'<div class="error yoast-migrated-notice">'
. '<h4 class="yoast-notice-migrated-header">'
. sprintf(
/* translators: %1$s: Yoast SEO */
esc_html__( 'Install %1$s', 'acf-content-analysis-for-yoast-seo' ),
'Yoast SEO'
)
. '</h4>'
. '<div class="notice-yoast-content">'
. '<p>'
. sprintf(
/* translators: %1$s resolves to ACF Content Analysis for Yoast SEO, %2$s resolves to Yoast SEO. */
esc_html__(
'%1$s requires %2$s to be installed and activated.',
'acf-content-analysis-for-yoast-seo'
),
'ACF Content Analysis for Yoast SEO',
'Yoast SEO'
)
. '</p>'
. '</div>'
. '</div>'
);

printf( '<div class="error"><p>%s</p></div>', esc_html( $message ) );
}

/**
Expand All @@ -67,14 +83,30 @@ public function message_plugin_not_activated() {
* @return void
*/
public function message_minimum_version() {
$message = sprintf(
/* translators: %1$s resolves to Yoast SEO, %2$s resolves to ACF Content Analysis for Yoast SEO. */
__( 'Please upgrade the %1$s plugin to the latest version to allow the %2$s module to work.', 'acf-content-analysis-for-yoast-seo' ),
'Yoast SEO',
'ACF Content Analysis for Yoast SEO'
echo (
'<div class="error yoast-migrated-notice">'
. '<h4 class="yoast-notice-migrated-header">'
. sprintf(
/* translators: %1$s: Yoast SEO */
esc_html__( 'Install latest %1$s', 'acf-content-analysis-for-yoast-seo' ),
'Yoast SEO'
)
. '</h4>'
. '<div class="notice-yoast-content">'
. '<p>'
. sprintf(
/* translators: %1$s resolves to Yoast SEO, %2$s resolves to ACF Content Analysis for Yoast SEO */
esc_html__(
'Please upgrade the %1$s plugin to the latest version to allow the %2$s module to work.',
'acf-content-analysis-for-yoast-seo'
),
'Yoast SEO',
'ACF Content Analysis for Yoast SEO'
)
. '</p>'
. '</div>'
. '</div>'
);

printf( '<div class="error"><p>%s</p></div>', esc_html( $message ) );
}

/**
Expand Down

0 comments on commit dcbb3ef

Please sign in to comment.