apply_filters_deprecated( 'pub_priv_sql_capability', string $cap )
- Since
- 2.2.0
Filters the capability to read private posts for a custom post type when generating SQL for getting posts by author.
Compatibility
Deprecated in WordPress 3.2.0. The hook transitioned from "somewhat useless" to "totally useless".
- WordPress
- since 2.2.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$capstring- Capability.
Where this hook fires · 1
wp-includes/post.php:7702get_posts_by_author_sql()
Source code
* * @since 2.2.0 * @deprecated 3.2.0 The hook transitioned from "somewhat useless" to "totally useless". * * @param string $cap Capability. */ $cap = apply_filters_deprecated( 'pub_priv_sql_capability', array( '' ), '3.2.0' ); if ( ! $cap ) { $cap = current_user_can( $post_type_obj->cap->read_private_posts ); } // Only need to check the cap if $public_only is false.Changelog
Introduced in 2.2.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
3.2.0
Deprecated. The hook transitioned from "somewhat useless" to "totally useless".from the docblock
2.2.0
Introduced.from the docblock
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.