pub_priv_sql_capability filter-hookWP 2.2.0

Deprecated from version 3.2.0. It is no longer supported and can be removed in future releases. Use less" to "totally useless instead.

Filters the capability to read private posts for a custom post type when generating SQL for getting posts by author.

Usage

add_filter( 'pub_priv_sql_capability', 'wp_kama_pub_priv_sql_capability_filter', 10, 2 );

/**
 * Function for `pub_priv_sql_capability` filter-hook.
 * 
 * @param string $cap    Capability.
 * @param        $string 
 *
 * @return string
 */
function wp_kama_pub_priv_sql_capability_filter( $cap, $string ){

	// filter...
	return $cap;
}
$cap(string)
Capability.
$string
-

Changelog

Since 2.2.0 Introduced.
Deprecated since 3.2.0 The hook transitioned from "somewhat useless" to "totally useless".

Where the hook is called

get_posts_by_author_sql()
pub_priv_sql_capability
wp-includes/post.php 7099
$cap = apply_filters_deprecated( 'pub_priv_sql_capability', array( '' ), '3.2.0' );

Where the hook is used in WordPress

Usage not found.