PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 28.5
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v28.5
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 / tracking / application / action-tracker.php

action-tracker.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 28.5, at src/tracking/application/action-tracker.php

42 lines 857 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong
4 namespace Yoast\WP\SEO\Tracking\Application;
5
6 use Yoast\WP\SEO\Helpers\Options_Helper;
7
8 /**
9 * The tracker of actions.
10 */
11 class Action_Tracker {
12
13 /**
14 * Holds the options helper instance.
15 *
16 * @var Options_Helper
17 */
18 private $options_helper;
19
20 /**
21 * The constructor.
22 *
23 * @param Options_Helper $options_helper The options helper.
24 */
25 public function __construct(
26 Options_Helper $options_helper
27 ) {
28 $this->options_helper = $options_helper;
29 }
30
31 /**
32 * Stores the version the user was on when an action was first performed.
33 *
34 * @param string $action_to_track The action to track.
35 *
36 * @return void
37 */
38 public function track_version_for_performed_action( string $action_to_track ): void {
39 $this->options_helper->set( $action_to_track, \WPSEO_VERSION );
40 }
41 }
42