#A $A @ &A @&A `&A &A &A @ P 0A 4A 8A 8A GA @;A x?A @NA `NA `A rA tA tA iA XlA @ PoA ` 0 x w 8 ` X x ਫ਼ turn $updated !== false; } /** * Determines if the post can be indexed. * * @param int $post_id Post ID to check. * * @return bool True if the post can be indexed. */ public function is_post_indexable( $post_id ) { // Don't index posts which are not public (i.e. viewable). $post_type = \get_post_type( $post_id ); $public_types = $this->post_type->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } // Don't index excluded post statuses. if ( \in_array( \get_post_status( $post_id ), $this->get_excluded_post_statuses(), true ) ) { 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 excluded post statuses. * * @return array The excluded post statuses. */ public function get_excluded_post_statuses() { return [ 'auto-draft' ]; } /** * 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' ] ); } }