PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 18.7
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v18.7
28.5 28.4 28.3 28.2 28.1 28.0 27.9 27.8 27.7 27.6 27.5 trunk 18.0 18.1 18.2 18.3 18.4 18.4.1 18.5 18.5.1 18.6 18.7 18.8 18.9 19.0 All 129 releases
wordpress-seo / src / integrations / admin / configurationworkout-notice-integration.php

configurationworkout-notice-integration.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 18.7, at src/integrations/admin/configurationworkout-notice-integration.php

50 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Yoast\WP\SEO\Integrations\Admin;
4
5 use Yoast\WP\SEO\Conditionals\No_Conditionals;
6 use Yoast\WP\SEO\Helpers\Options_Helper;
7 use Yoast\WP\SEO\Integrations\Integration_Interface;
8
9 /**
10 * ConfigurationWorkout_Notice_Integration class
11 */
12 class ConfigurationWorkout_Notice_Integration implements Integration_Interface {
13
14 use No_Conditionals;
15
16 /**
17 * The options' helper.
18 *
19 * @var Options_Helper
20 */
21 private $options_helper;
22
23 /**
24 * Configuration_Workout_Integration constructor.
25 *
26 * @param Options_Helper $options_helper The options helper.
27 */
28 public function __construct(
29 Options_Helper $options_helper
30 ) {
31 $this->options_helper = $options_helper;
32 }
33
34 /**
35 * {@inheritDoc}
36 */
37 public function register_hooks() {
38 \add_action( 'wp_ajax_dismiss_configuration_workout_notice', [ $this, 'dismiss_configuration_workout_notice' ] );
39 }
40
41 /**
42 * Dismisses the First-time configuration workout notice.
43 *
44 * @return bool
45 */
46 public function dismiss_configuration_workout_notice() {
47 return $this->options_helper->set( 'dismiss_configuration_workout_notice', true );
48 }
49 }
50