Skip to content

Commit

Permalink
Move ACF 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 c9e2f5d commit 69585b6
Showing 1 changed file with 24 additions and 8 deletions.
32 changes: 24 additions & 8 deletions inc/dependencies/dependency-acf.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,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 Advanced Custom Fields, %3$s resolves to the minimum required ACF version. */
__( '%1$s requires %2$s (free or pro) %3$s or higher to be installed and activated.', 'acf-content-analysis-for-yoast-seo' ),
'ACF Content Analysis for Yoast SEO',
'Advanced Custom Fields',
self::MINIMAL_REQUIRED_ACF_VERSION
echo (
'<div class="error yoast-migrated-notice">'
. '<h4 class="yoast-notice-migrated-header">'
. sprintf(
/* translators: %1$s: Advanced Custom Fields */
esc_html__( 'Install latest %1$s', 'wordpress-seo-news' ),

Check failure on line 52 in inc/dependencies/dependency-acf.php

View workflow job for this annotation

GitHub Actions / Check code style

Mismatched text domain. Expected 'acf-content-analysis-for-yoast-seo' but got 'wordpress-seo-news'.

Check failure on line 52 in inc/dependencies/dependency-acf.php

View workflow job for this annotation

GitHub Actions / Check code style

Mismatched text domain. Expected 'acf-content-analysis-for-yoast-seo' but got 'wordpress-seo-news'.
'Advanced Custom Fields'
)
. '</h4>'
. '<div class="notice-yoast-content">'
. '<p>'
. sprintf(
/* translators: %1$s resolves to ACF Content Analysis for Yoast SEO, %2$s resolves to Advanced Custom Fields, %3$s resolves to the minimum required ACF version. */
esc_html__(
'%1$s requires %2$s (free or pro) %3$s or higher to be installed and activated.',
'acf-content-analysis-for-yoast-seo'
),
'ACF Content Analysis for Yoast SEO',
'Advanced Custom Fields',
self::MINIMAL_REQUIRED_ACF_VERSION

Check failure on line 66 in inc/dependencies/dependency-acf.php

View workflow job for this annotation

GitHub Actions / Check code style

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.

Check failure on line 66 in inc/dependencies/dependency-acf.php

View workflow job for this annotation

GitHub Actions / Check code style

All output should be run through an escaping function (see the Security sections in the WordPress Developer Handbooks), found 'self'.
)
. '</p>'
. '</div>'
. '</div>'
);

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

0 comments on commit 69585b6

Please sign in to comment.