);
}
/**
* Retrieves the public indexable sub types.
*
* @return array The sub types.
*/
protected function get_public_sub_types() {
$object_sub_types = \array_values(
\array_merge(
$this->post_type_helper->get_public_post_types(),
\get_taxonomies( [ 'public' => true ] )
)
);
$excluded_post_types = \apply_filters( 'wpseo_indexable_excluded_post_types', [ 'attachment' ] );
$object_sub_types = \array_diff( $object_sub_types, $excluded_post_types );
return $object_sub_types;
}
/**
* Gets the orphaned indexables.
*
* @param array $indexable_ids_in_orphaned_workout The orphaned indexable ids.
* @param int $limit The limit.
*
* @return array The orphaned indexables.
*/
protected function get_orphaned( array $indexable_ids_in_orphaned_workout, $limit = 10 ) {
$orphaned = $this->indexable_repository->query()
->where_raw( '( incoming_link_count is NULL OR incoming_link_count < 3 )' )
->where_raw( '( post_status = \'publish\' OR post_status IS NULL )' )
->where_raw( '( is_robots_noindex = FALSE OR is_robots_noindex IS NULL )' )
->where_raw( 'NOT ( object_sub_type = \'page\' AND permalink = %s )', [ \home_url( '/' ) ] )
->where_in( 'object_sub_type', $this->get_public_sub_types() )
->where_in( 'object_type', [ 'post' ] )
->where_not_in( 'id', $indexable_ids_in_orphaned_workout )
->order_by_asc( 'created_at' )
->limit( $limit )
->find_many();
$orphaned = \array_map( [ $this->indexable_repository, 'ensure_permalink' ], $orphaned );
return $orphaned;
}
}
بایگانیها استارتاپ بورسی - اکوفاین | مدیریتی ، مالی ، اقتصادی