Last active
October 28, 2024 09:39
-
-
Save wp-seopress/b1ea52ad3e2c2f946fd4a78d55eda595 to your computer and use it in GitHub Desktop.
Filter the query of the Site Audit feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter('seopress_site_audit_query', 'sp_site_audit_query', 10, 5); | |
function sp_site_audit_query($args, $batch_size, $offset, $cpt, $cpt_status) { | |
//Pass your WP Query arguments to the $args array | |
//default values | |
$args = [ | |
'posts_per_page' => $batch_size, | |
'offset' => (int)$offset, | |
'post_type' => $cpt, | |
'post_status' => $cpt_status, | |
'fields' => 'ids' | |
]; | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment