From d7f7bdcfe6bf3b856c8daa664c4b9626bf6bc45f Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Wed, 12 Feb 2025 11:27:52 +0000 Subject: [PATCH 1/2] Fix phpdoc for nestedpages_sorting_capability filter --- app/Entities/User/UserCapabilities.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Entities/User/UserCapabilities.php b/app/Entities/User/UserCapabilities.php index cf427400..3702c305 100644 --- a/app/Entities/User/UserCapabilities.php +++ b/app/Entities/User/UserCapabilities.php @@ -40,9 +40,9 @@ public function addSortingCapabilities() * * @since 3.1.9 * - * @param bool $grant_role Whether role may sort post type. - * @param string $type The post type name. - * @param string $role_name The Role Name. + * @param bool $grant_role Whether role may sort post type. + * @param string $type The post type name. + * @param \WP_Role $role The role object. */ $grant_capability = apply_filters("nestedpages_sorting_capability", $grant_capability, $type, $role); if ( $grant_capability ) $role->add_cap("nestedpages_sorting_$type", true); From 58a8b9eb50813e898ad594eab0923bce710a520e Mon Sep 17 00:00:00 2001 From: Mike Manger Date: Wed, 12 Feb 2025 12:09:09 +0000 Subject: [PATCH 2/2] Correct var name for filter --- app/Entities/User/UserCapabilities.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Entities/User/UserCapabilities.php b/app/Entities/User/UserCapabilities.php index 3702c305..974f30e7 100644 --- a/app/Entities/User/UserCapabilities.php +++ b/app/Entities/User/UserCapabilities.php @@ -40,9 +40,9 @@ public function addSortingCapabilities() * * @since 3.1.9 * - * @param bool $grant_role Whether role may sort post type. - * @param string $type The post type name. - * @param \WP_Role $role The role object. + * @param bool $grant_capability Whether role may sort post type. + * @param string $type The post type name. + * @param \WP_Role $role The role object. */ $grant_capability = apply_filters("nestedpages_sorting_capability", $grant_capability, $type, $role); if ( $grant_capability ) $role->add_cap("nestedpages_sorting_$type", true);