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/primary-category-quick-edit-watcher.php +6 -3 18.2 → trunk View file →
@@ -13,10 +13,8 @@
13 13 use Yoast\WP\SEO\Models\Indexable;
14 14 use Yoast\WP\SEO\Repositories\Indexable_Repository;
15 15 use Yoast\WP\SEO\Repositories\Primary_Term_Repository;
16 16
17 -// phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded -- Base class can't be written shorter without abbreviating.
18 -
19 17 /**
20 18 * Class Primary_Category_Quick_Edit_Watcher
21 19 */
22 20 class Primary_Category_Quick_Edit_Watcher implements Integration_Interface {
@@ -105,8 +103,10 @@
105 103 * @param int $object_id Object ID.
106 104 * @param array $terms Unused. An array of object terms.
107 105 * @param array $tt_ids An array of term taxonomy IDs.
108 106 * @param string $taxonomy Taxonomy slug.
107 + *
108 + * @return void
109 109 */
110 110 public function validate_primary_category( $object_id, $terms, $tt_ids, $taxonomy ) {
111 111 $post = \get_post( $object_id );
112 112 if ( $post === null ) {
@@ -160,8 +160,10 @@
160 160 * Removes the primary category.
161 161 *
162 162 * @param int $post_id The post id to set primary taxonomy for.
163 163 * @param string $main_taxonomy Name of the taxonomy that is set to be the primary one.
164 + *
165 + * @return void
164 166 */
165 167 private function remove_primary_term( $post_id, $main_taxonomy ) {
166 168 $primary_term = $this->primary_term_repository->find_by_post_id_and_taxonomy( $post_id, $main_taxonomy, false );
167 169 if ( $primary_term ) {
@@ -175,8 +177,10 @@
175 177 /**
176 178 * Builds the hierarchy for a post.
177 179 *
178 180 * @param WP_Post $post The post.
181 + *
182 + * @return void
179 183 */
180 184 public function build_post_hierarchy( $post ) {
181 185 if ( $this->post_type_helper->is_excluded( $post->post_type ) ) {
182 186 return;
@@ -188,5 +192,4 @@
188 192 $this->indexable_hierarchy_builder->build( $indexable );
189 193 }
190 194 }
191 195 }
192 -// phpcs:enable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded