PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 2.8.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v2.8.0
2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 All 49 releases
← All changes | includes/admin/class-focus-keyword-ajax.php +5 -4 1.26.02.8.0 View file →
@@ -105,8 +105,9 @@
105 105
106 106 // The SEO Overview column edits only the PRIMARY focus keyword. Take the
107 107 // new primary from the input (first value if a list is pasted) and keep
108 108 // the existing secondary keywords so inline editing never drops them.
109 + // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- normalize() sanitize_text_field()s every value it keeps.
109 110 $raw_input = isset($_POST['focus_keyword']) ? wp_unslash($_POST['focus_keyword']) : '';
110 111 $new_primary = \ThinkRank\SEO\Focus_Keywords::normalize($raw_input, 1);
111 112
112 113 $existing = \ThinkRank\SEO\Focus_Keywords::get($post_id);
@@ -133,9 +134,9 @@
133 134 'has_keyword' => !empty($keywords)
134 135 ];
135 136
136 137 // update post modified time
137 - $this->update_post_modified( $post_id );
138 + self::update_post_modified( $post_id );
138 139
139 140 /**
140 141 * Filter the AJAX response data for focus keyword update
141 142 *
@@ -150,12 +151,14 @@
150 151
151 152 /**
152 153 * Force update post_modified and post_modified_gmt timestamps.
153 154 *
155 + * Static so sibling handlers (e.g. Seo_Quick_Edit_Ajax) can reuse it.
156 + *
154 157 * @param int $post_id
155 158 * @return bool
156 159 */
157 - function update_post_modified( $post_id ) {
160 + public static function update_post_modified( $post_id ) {
158 161
159 162 if ( ! $post_id || ! get_post( $post_id ) ) {
160 163 return false;
161 164 }
@@ -182,7 +185,5 @@
182 185 clean_post_cache( $post_id );
183 186
184 187 return ( $updated !== false );
185 188 }
186 -
187 189 }
188 -