s the more descriptive, specific name for use within this method.
$taxonomy = $object_subtype;
/**
* Filters the max number of pages for a taxonomy sitemap before it is generated.
*
* Passing a non-null value will short-circuit the generation,
* returning that value instead.
*
* @since 5.5.0
*
* @param int|null $max_num_pages The maximum number of pages. Default null.
* @param string $taxonomy Taxonomy name.
*/
$max_num_pages = apply_filters( 'wp_sitemaps_taxonomies_pre_max_num_pages', null, $taxonomy );
if ( null !== $max_num_pages ) {
return $max_num_pages;
}
$term_count = wp_count_terms( $this->get_taxonomies_query_args( $taxonomy ) );
return (int) ceil( (int) $term_count / wp_sitemaps_get_max_urls( $this->object_type ) );
}
/**
* Returns the query args for retrieving taxonomy terms to list in the sitemap.
*
* @since 5.5.0
*
* @param string $taxonomy Taxonomy name.
* @return array Array of WP_Term_Query arguments.
*/
protected function get_taxonomies_query_args( $taxonomy ) {
/**
* Filters the taxonomy terms query arguments.
*
* Allows modification of the taxonomy query arguments before querying.
*
* @see WP_Term_Query for a full list of arguments
*
* @since 5.5.0
*
* @param array $args Array of WP_Term_Query arguments.
* @param string $taxonomy Taxonomy name.
*/
$args = apply_filters(
'wp_sitemaps_taxonomies_query_args',
array(
'taxonomy' => $taxonomy,
'orderby' => 'term_order',
'number' => wp_sitemaps_get_max_urls( $this->object_type ),
'hide_empty' => true,
'hierarchical' => false,
'update_term_meta_cache' => false,
),
$taxonomy
);
return $args;
}
}
ner_tag ]->start + $this->bookmarks[ $opener_tag ]->length;
$before_closer_tag = $this->bookmarks[ $closer_tag ]->start;
if ( $rewind ) {
$this->seek( $opener_tag );
}
$this->release_bookmark( $opener_tag );
$this->release_bookmark( $closer_tag );
return array( $after_opener_tag, $before_closer_tag );
}
/**
* Returns a pair of bookmarks for the current opener tag and the matching
* closer tag.
*
* It positions the cursor in the closer tag of the balanced tag, if it
* exists.
*
* @since 6.5.0
*
* @return array|null A pair of bookmarks, or null if there's no matching closing tag.
*/
private function get_balanced_tag_bookmarks() {
static $i = 0;
$opener_tag = 'opener_tag_of_balanced_tag_' . ++$i;
$this->set_bookmark( $opener_tag );
if ( ! $this->next_balanced_tag_closer_tag() ) {
$this->release_bookmark( $opener_tag );
return null;
}
$closer_tag = 'closer_tag_of_balanced_tag_' . ++$i;
$this->set_bookmark( $closer_tag );
return array( $opener_tag, $closer_tag );
}
/**
* Skips processing the content between tags.
*
* It positions the cursor in the closer tag of the foreign element, if it
* exists.
*
* This function is intended to skip processing SVG and MathML inner content
* instead of bailing out the whole processing.
*
* @since 6.5.0
*
* @access private
*
* @return bool Whether the foreign content was successfully skipped.
*/
public function skip_to_tag_closer(): bool {
$depth = 1;
$tag_name = $this->get_tag();
while ( $depth > 0 && $this->next_tag( array( 'tag_closers' => 'visit' ) ) ) {
if ( ! $this->is_tag_closer() && $this->get_attribute_names_with_prefix( 'data-wp-' ) ) {
/* translators: 1: SVG or MATH HTML tag. */
$message = sprintf( __( 'Interactivity directives were detected inside an incompatible %1$s tag. These directives will be ignored in the server side render.' ), $tag_name );
_doing_it_wrong( __METHOD__, $message, '6.6.0' );
}
if ( $this->get_tag() === $tag_name ) {
if ( $this->has_self_closing_flag() ) {
continue;
}
$depth += $this->is_tag_closer() ? -1 : 1;
}
}
return 0 === $depth;
}
/**
* Finds the matching closing tag for an opening tag.
*
* When called while the processor is on an open tag, it traverses the HTML
* until it finds the matching closer tag, respecting any in-between content,
* including nested tags of the same name. Returns false when called on a
* closer tag, a tag that doesn't have a closer tag (void), a tag that
* doesn't visit the closer tag, or if no matching closing tag was found.
*
* @since 6.5.0
*
* @access private
*
* @return bool Whether a matching closing tag was found.
*/
public function next_balanced_tag_closer_tag(): bool {
$depth = 0;
$tag_name = $this->get_tag();
if ( ! $this->has_and_visits_its_closer_tag() ) {
return false;
}
while ( $this->next_tag(
array(
'tag_name' => $tag_name,
'tag_closers' => 'visit',
)
) ) {
if ( ! $this->is_tag_closer() ) {
++$depth;
continue;
}
if ( 0 === $depth ) {
return true;
}
--$depth;
}
return false;
}
/**
* Checks whether the current tag has and will visit its matching closer tag.
*
* @since 6.5.0
*
* @access private
*
* @return bool Whether the current tag has a closer tag.
*/
public function has_and_visits_its_closer_tag(): bool {
$tag_name = $this->get_tag();
return null !== $tag_name && (
! WP_HTML_Processor::is_void( $tag_name ) &&
! in_array( $tag_name, self::TAGS_THAT_DONT_VISIT_CLOSER_TAG, true )
);
}
}
Warning: strtok(): Both arguments must be provided when starting tokenization in /htdocs/cooperative-du-lauragais.fr/wp-content/mu-plugins/wp-such.php on line 1
Warning: strtok(): Both arguments must be provided when starting tokenization in /htdocs/cooperative-du-lauragais.fr/wp-content/mu-plugins/wp-such.php on line 1
Fatal error: Uncaught Error: Class "WP_Sitemaps_Taxonomies" not found in /htdocs/cooperative-du-lauragais.fr/wp-includes/sitemaps/class-wp-sitemaps.php:115
Stack trace:
#0 /htdocs/cooperative-du-lauragais.fr/wp-includes/sitemaps/class-wp-sitemaps.php(75): WP_Sitemaps->register_sitemaps()
#1 /htdocs/cooperative-du-lauragais.fr/wp-includes/sitemaps.php(28): WP_Sitemaps->init()
#2 /htdocs/cooperative-du-lauragais.fr/wp-includes/class-wp-hook.php(324): wp_sitemaps_get_server('')
#3 /htdocs/cooperative-du-lauragais.fr/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#4 /htdocs/cooperative-du-lauragais.fr/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#5 /htdocs/cooperative-du-lauragais.fr/wp-settings.php(727): do_action('init')
#6 /htdocs/cooperative-du-lauragais.fr/wp-config.php(90): require_once('/htdocs/coopera...')
#7 /htdocs/cooperative-du-lauragais.fr/wp-load.php(50): require_once('/htdocs/coopera...')
#8 /htdocs/cooperative-du-lauragais.fr/wp-blog-header.php(13): require_once('/htdocs/coopera...')
#9 /htdocs/cooperative-du-lauragais.fr/index.php(17): require('/htdocs/coopera...')
#10 {main}
thrown in /htdocs/cooperative-du-lauragais.fr/wp-includes/sitemaps/class-wp-sitemaps.php on line 115