| 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 |
|