( $post_id ) === 'auto-draft' ) { return false; } // Don't index revisions of posts. if ( \wp_is_post_revision( $post_id ) ) { return false; } // Don't index autosaves that are not caught by the auto-draft check. if ( \wp_is_post_autosave( $post_id ) ) { return false; } return true; } /** * Retrieves the list of public posts statuses. * * @return array The public post statuses. */ public function get_public_post_statuses() { /** * Filter: 'wpseo_public_post_statuses' - List of public post statuses. * * @api array $post_statuses Post status list, defaults to array( 'publish' ). */ return \apply_filters( 'wpseo_public_post_statuses', [ 'publish' ] ); } }