This page redirects to an external site: https://developer.wordpress.org/reference/hooks/posts_request/
function my_posts_request_filter( $input ) {
print_r( $input );
return $input;
}
add_filter( 'posts_request', 'my_posts_request_filter' );
The input of this filter is the post request SQL, something like the following:
SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts LEFT JOIN wp_posts AS p2 ON ( wp_posts.post_parent = p2.ID ) WHERE 1=1 AND wp_posts.ID IN ( 3, 632 ) AND wp_posts.post_type != 'revision' AND ( ( wp_posts.post_status = 'publish' ) OR ( wp_posts.post_status = 'inherit' AND ( p2.post_status = 'publish' ) ) ) ORDER BY wp_posts.post_date DESC LIMIT 0, 20
Return to Plugin API/Filter Reference