PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / trunk
Yoast SEO – Advanced SEO with real-time guidance and built-in AI vtrunk
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
← All changes | src/integrations/watchers/indexable-post-meta-watcher.php +5 -3 18.2 → trunk View file →
@@ -20,9 +20,9 @@
20 20
21 21 /**
22 22 * An array of post IDs that need to be updated.
23 23 *
24 - * @var array
24 + * @var array<int>
25 25 */
26 26 protected $post_ids_to_update = [];
27 27
28 28 /**
@@ -27,9 +27,9 @@
27 27
28 28 /**
29 29 * Returns the conditionals based on which this loadable should be active.
30 30 *
31 - * @return array
31 + * @return string[]
32 32 */
33 33 public static function get_conditionals() {
34 34 return [ Migrations_Conditional::class ];
35 35 }
@@ -46,8 +46,10 @@
46 46 /**
47 47 * Initializes the integration.
48 48 *
49 49 * This is the place to register hooks and filters.
50 + *
51 + * @return void
50 52 */
51 53 public function register_hooks() {
52 54 // Register all posts whose meta have changed.
53 55 \add_action( 'added_post_meta', [ $this, 'add_post_id' ], 10, 3 );
@@ -75,9 +77,9 @@
75 77 * @return void
76 78 */
77 79 public function add_post_id( $meta_id, $post_id, $meta_key ) {
78 80 // Only register changes to our own meta.
79 - if ( \strpos( $meta_key, WPSEO_Meta::$meta_prefix ) !== 0 ) {
81 + if ( \is_string( $meta_key ) && \strpos( $meta_key, WPSEO_Meta::$meta_prefix ) !== 0 ) {
80 82 return;
81 83 }
82 84
83 85 if ( ! \in_array( $post_id, $this->post_ids_to_update, true ) ) {