ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } } ublic_post_types = $this->get_public_post_types(); $excluded_post_types = $this->get_excluded_post_types_for_indexables(); $included_post_types = \array_diff( $public_post_types, $excluded_post_types ); return $this->filter_included_post_types( $included_post_types ); } /** * Returns all indexable post types with archive pages. * * @return array All post types which are indexable and have archive pages. */ public function get_indexable_post_archives() { return \array_filter( $this->get_indexable_post_type_objects(), [ $this, 'has_archive' ] ); } /** * Filters the post types that are included to be indexed. * * @param array $included_post_types The post types that are included to be indexed. * * @return array The filtered post types that are included to be indexed. */ protected function filter_included_post_types( $included_post_types ) { /** * Filter: 'wpseo_indexable_forced_included_post_types' - Allows force including posts of a certain post * type to be saved to the indexable table. * * @param array $included_post_types The currently included post types that indexables will be created for. */ $filtered_included_post_types = \apply_filters( 'wpseo_indexable_forced_included_post_types', $included_post_types ); if ( ! \is_array( $filtered_included_post_types ) ) { // If the filter got misused, let's return the unfiltered array. return \array_values( $included_post_types ); } // Add sanity check to make sure everything is an actual post type. foreach ( $filtered_included_post_types as $key => $post_type ) { if ( ! \post_type_exists( $post_type ) ) { unset( $filtered_included_post_types[ $key ] ); } } // `array_values`, to make sure that the keys are reset. return \array_values( $filtered_included_post_types ); } /** * Checks if the given post type should be indexed. * * @param string $post_type The post type that is checked. * * @return bool */ public function is_of_indexable_post_type( $post_type ) { $public_types = $this->get_indexable_post_types(); if ( ! \in_array( $post_type, $public_types, true ) ) { return false; } return true; } /** * Checks if the archive of a post type is indexable. * * @param string $post_type The post type to check. * * @return bool if the archive is indexable. */ public function is_post_type_archive_indexable( $post_type ) { $public_type_objects = $this->get_indexable_post_archives(); $public_types = \array_map( static function ( $post_type_object ) { return $post_type_object->name; }, $public_type_objects ); return \in_array( $post_type, $public_types, true ); } /** * Returns an array of complete post type objects for all indexable post types. * * @return array List of indexable post type objects. */ public function get_indexable_post_type_objects() { $post_type_objects = []; $indexable_post_types = $this->get_indexable_post_types(); foreach ( $indexable_post_types as $post_type ) { $post_type_object = \get_post_type_object( $post_type ); if ( ! empty( $post_type_object ) ) { $post_type_objects[ $post_type ] = $post_type_object; } } return $post_type_objects; } }
Fatal error: Uncaught Error: Class "Yoast\WP\SEO\Helpers\Post_Type_Helper" not found in /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php:3935 Stack trace: #0 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(3921): Yoast\WP\SEO\Generated\Cached_Container->getPostTypeHelperService() #1 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(2029): Yoast\WP\SEO\Generated\Cached_Container->getPostHelperService() #2 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(2049): Yoast\WP\SEO\Generated\Cached_Container->getIndexableAuthorBuilderService() #3 /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php(5963): Yoast\WP\SEO\Generated\Cached_Container->getIndexableBuilderService() #4 /htdocs/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php(271): Yoast\WP\SEO\Generated\Cached_Container->getIndexableRepositoryService() #5 /htdocs/wp-content/plugins/wordpress-seo/src/surfaces/classes-surface.php(38): YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container->get('Yoast\\WP\\SEO\\Re...') #6 /htdocs/wp-content/plugins/wordpress-seo/inc/class-wpseo-admin-bar-menu.php(133): Yoast\WP\SEO\Surfaces\Classes_Surface->get('Yoast\\WP\\SEO\\Re...') #7 /htdocs/wp-content/plugins/wordpress-seo/inc/wpseo-non-ajax-functions.php(20): WPSEO_Admin_Bar_Menu->__construct() #8 /htdocs/wp-includes/class-wp-hook.php(324): wpseo_initialize_admin_bar('') #9 /htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #10 /htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /htdocs/wp-settings.php(749): do_action('wp_loaded') #12 /htdocs/wp-config.php(101): require_once('/htdocs/wp-sett...') #13 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...') #14 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...') #15 /htdocs/index.php(17): require('/htdocs/wp-blog...') #16 {main} thrown in /htdocs/wp-content/plugins/wordpress-seo/src/generated/container.php on line 3935