PluginProbe
Yoast SEO – Advanced SEO with real-time guidance and built-in AI / 19.0
Yoast SEO – Advanced SEO with real-time guidance and built-in AI v19.0
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 / deprecated / frontend / class-primary-category.php

class-primary-category.php in Yoast SEO – Advanced SEO with real-time guidance and built-in AI 19.0, at src/deprecated/frontend/class-primary-category.php

40 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * WPSEO plugin file.
4 *
5 * @package WPSEO\Frontend
6 */
7
8 /**
9 * Adds customizations to the front end for the primary category.
10 *
11 * @deprecated 14.0
12 */
13 class WPSEO_Frontend_Primary_Category implements WPSEO_WordPress_Integration {
14
15 /**
16 * Registers the hooks necessary for correct primary category behaviour.
17 */
18 public function register_hooks() {
19 add_filter( 'post_link_category', [ $this, 'post_link_category' ], 10, 3 );
20 }
21
22 /**
23 * Filters post_link_category to change the category to the chosen category by the user.
24 *
25 * @deprecated 14.0
26 * @codeCoverageIgnore
27 *
28 * @param stdClass $category The category that is now used for the post link.
29 * @param array|null $categories This parameter is not used.
30 * @param WP_Post|null $post The post in question.
31 *
32 * @return array|object|WP_Error|null The category we want to use for the post link.
33 */
34 public function post_link_category( $category, $categories = null, $post = null ) {
35 _deprecated_function( __METHOD__, 'WPSEO 14.0' );
36
37 return $category;
38 }
39 }
40