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/third-party/wincher-publish.php +6 -2 18.2 → trunk View file →
@@ -103,11 +103,15 @@
103 103
104 104 /**
105 105 * Determines whether the current request is a REST request.
106 106 *
107 + * @deprecated 23.6
108 + * @codeCoverageIgnore
109 + *
107 110 * @return bool Whether the request is a REST request.
108 111 */
109 112 public function is_rest_request() {
113 + \_deprecated_function( __METHOD__, 'Yoast SEO 23.6', 'wp_is_serving_rest_request' );
110 114 return \defined( 'REST_REQUEST' ) && \REST_REQUEST;
111 115 }
112 116
113 117 /**
@@ -117,9 +121,9 @@
117 121 *
118 122 * @return void
119 123 */
120 124 public function track_request( $post ) {
121 - if ( ! $post instanceof \WP_Post ) {
125 + if ( ! $post instanceof WP_Post ) {
122 126 return;
123 127 }
124 128
125 129 // Filter out empty entries.
@@ -152,9 +156,9 @@
152 156 *
153 157 * @return void
154 158 */
155 159 public function track_after_post_request( $post_id, $post ) {
156 - if ( $this->is_rest_request() ) {
160 + if ( \wp_is_serving_rest_request() ) {
157 161 return;
158 162 }
159 163
160 164 $this->track_request( $post );