| @@ -82,11 +82,15 @@ | ||
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * Save an individual SEO title from the Bulk Editor. |
| 85 | 85 | * |
| 86 | + * @deprecated 28.1 | |
| 87 | + * @codeCoverageIgnore | |
| 88 | + * | |
| 86 | 89 | * @return void |
| 87 | 90 | */ |
| 88 | 91 | function wpseo_save_title() { |
| 92 | + _deprecated_function( __FUNCTION__, 'Yoast SEO 28.1' ); | |
| 89 | 93 | wpseo_save_what( 'title' ); |
| 90 | 94 | } |
| 91 | 95 | |
| 92 | 96 | add_action( 'wp_ajax_wpseo_save_title', 'wpseo_save_title' ); |
| @@ -93,11 +97,15 @@ | ||
| 93 | 97 | |
| 94 | 98 | /** |
| 95 | 99 | * Save an individual meta description from the Bulk Editor. |
| 96 | 100 | * |
| 101 | + * @deprecated 28.1 | |
| 102 | + * @codeCoverageIgnore | |
| 103 | + * | |
| 97 | 104 | * @return void |
| 98 | 105 | */ |
| 99 | 106 | function wpseo_save_description() { |
| 107 | + _deprecated_function( __FUNCTION__, 'Yoast SEO 28.1' ); | |
| 100 | 108 | wpseo_save_what( 'metadesc' ); |
| 101 | 109 | } |
| 102 | 110 | |
| 103 | 111 | add_action( 'wp_ajax_wpseo_save_metadesc', 'wpseo_save_description' ); |
| @@ -104,8 +112,11 @@ | ||
| 104 | 112 | |
| 105 | 113 | /** |
| 106 | 114 | * Save titles & descriptions. |
| 107 | 115 | * |
| 116 | + * @deprecated 28.1 | |
| 117 | + * @codeCoverageIgnore | |
| 118 | + * | |
| 108 | 119 | * @param string $what Type of item to save (title, description). |
| 109 | 120 | * |
| 110 | 121 | * @return void |
| 111 | 122 | */ |
| @@ -133,8 +144,11 @@ | ||
| 133 | 144 | /** |
| 134 | 145 | * Helper function to update a post's meta data, returning relevant information |
| 135 | 146 | * about the information updated and the results or the meta update. |
| 136 | 147 | * |
| 148 | + * @deprecated 28.1 | |
| 149 | + * @codeCoverageIgnore | |
| 150 | + * | |
| 137 | 151 | * @param int $post_id Post ID. |
| 138 | 152 | * @param string $new_meta_value New meta value to record. |
| 139 | 153 | * @param string $orig_meta_value Original meta value. |
| 140 | 154 | * @param string $meta_key Meta key string. |
| @@ -218,11 +232,15 @@ | ||
| 218 | 232 | |
| 219 | 233 | /** |
| 220 | 234 | * Save all titles sent from the Bulk Editor. |
| 221 | 235 | * |
| 236 | + * @deprecated 28.1 | |
| 237 | + * @codeCoverageIgnore | |
| 238 | + * | |
| 222 | 239 | * @return void |
| 223 | 240 | */ |
| 224 | 241 | function wpseo_save_all_titles() { |
| 242 | + _deprecated_function( __FUNCTION__, 'Yoast SEO 28.1' ); | |
| 225 | 243 | wpseo_save_all( 'title' ); |
| 226 | 244 | } |
| 227 | 245 | |
| 228 | 246 | add_action( 'wp_ajax_wpseo_save_all_titles', 'wpseo_save_all_titles' ); |
| @@ -229,11 +247,15 @@ | ||
| 229 | 247 | |
| 230 | 248 | /** |
| 231 | 249 | * Save all description sent from the Bulk Editor. |
| 232 | 250 | * |
| 251 | + * @deprecated 28.1 | |
| 252 | + * @codeCoverageIgnore | |
| 253 | + * | |
| 233 | 254 | * @return void |
| 234 | 255 | */ |
| 235 | 256 | function wpseo_save_all_descriptions() { |
| 257 | + _deprecated_function( __FUNCTION__, 'Yoast SEO 28.1' ); | |
| 236 | 258 | wpseo_save_all( 'metadesc' ); |
| 237 | 259 | } |
| 238 | 260 | |
| 239 | 261 | add_action( 'wp_ajax_wpseo_save_all_descriptions', 'wpseo_save_all_descriptions' ); |
| @@ -240,8 +262,11 @@ | ||
| 240 | 262 | |
| 241 | 263 | /** |
| 242 | 264 | * Utility function to save values. |
| 243 | 265 | * |
| 266 | + * @deprecated 28.1 | |
| 267 | + * @codeCoverageIgnore | |
| 268 | + * | |
| 244 | 269 | * @param string $what Type of item so save. |
| 245 | 270 | * |
| 246 | 271 | * @return void |
| 247 | 272 | */ |
| @@ -266,8 +291,11 @@ | ||
| 266 | 291 | |
| 267 | 292 | /** |
| 268 | 293 | * Insert a new value. |
| 269 | 294 | * |
| 295 | + * @deprecated 28.1 | |
| 296 | + * @codeCoverageIgnore | |
| 297 | + * | |
| 270 | 298 | * @param string $what Item type (such as title). |
| 271 | 299 | * @param int $post_id Post ID. |
| 272 | 300 | * @param string $new_value New value to record. |
| 273 | 301 | * @param string $original Original value. |
| @@ -378,34 +406,4 @@ | ||
| 378 | 406 | |
| 379 | 407 | new WPSEO_Shortcode_Filter(); |
| 380 | 408 | |
| 381 | 409 | new WPSEO_Taxonomy_Columns(); |
| 382 | - | |
| 383 | -/* ********************* DEPRECATED FUNCTIONS ********************* */ | |
| 384 | - | |
| 385 | -/** | |
| 386 | - * Retrieves the keyword for the keyword doubles. | |
| 387 | - * | |
| 388 | - * @return void | |
| 389 | - */ | |
| 390 | -function ajax_get_keyword_usage() { | |
| 391 | - _deprecated_function( __METHOD__, 'WPSEO 20.4' ); | |
| 392 | - check_ajax_referer( 'wpseo-keyword-usage', 'nonce' ); | |
| 393 | - | |
| 394 | - if ( ! isset( $_POST['post_id'], $_POST['keyword'] ) || ! is_string( $_POST['keyword'] ) ) { | |
| 395 | - exit( '-1' ); | |
| 396 | - } | |
| 397 | - | |
| 398 | - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- We are casting to an integer. | |
| 399 | - $post_id = (int) wp_unslash( $_POST['post_id'] ); | |
| 400 | - | |
| 401 | - if ( $post_id === 0 || ! current_user_can( 'edit_post', $post_id ) ) { | |
| 402 | - exit( '-1' ); | |
| 403 | - } | |
| 404 | - | |
| 405 | - $keyword = sanitize_text_field( wp_unslash( $_POST['keyword'] ) ); | |
| 406 | - | |
| 407 | - wp_die( | |
| 408 | - // phpcs:ignore WordPress.Security.EscapeOutput -- Reason: WPSEO_Utils::format_json_encode is safe. | |
| 409 | - WPSEO_Utils::format_json_encode( WPSEO_Meta::keyword_usage( $keyword, $post_id ) ), | |
| 410 | - ); | |
| 411 | -} | |