Merged in feature/81-dev-dev01 (pull request #5)

auto-patch  81-dev-dev01-2023-12-05T22_45_26

* auto-patch  81-dev-dev01-2023-12-05T22_45_26
This commit is contained in:
Tony Volpe
2023-12-05 23:05:59 +00:00
parent ba16964e7a
commit 725d3043d5
1463 changed files with 142461 additions and 89421 deletions

View File

@@ -222,6 +222,27 @@ function create_initial_taxonomies() {
'show_in_rest' => false,
)
);
register_taxonomy(
'wp_pattern_category',
array( 'wp_block' ),
array(
'public' => false,
'publicly_queryable' => false,
'hierarchical' => false,
'labels' => array(
'name' => _x( 'Pattern Categories', 'taxonomy general name' ),
'singular_name' => _x( 'Pattern Category', 'taxonomy singular name' ),
),
'query_var' => false,
'rewrite' => false,
'show_ui' => true,
'_builtin' => true,
'show_in_nav_menus' => false,
'show_in_rest' => true,
'show_admin_column' => true,
)
);
}
/**
@@ -959,6 +980,7 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
// Ensure for filters that this is not empty.
$taxonomy = $_term->taxonomy;
$old_term = $_term;
/**
* Filters a taxonomy term object.
*
@@ -998,7 +1020,9 @@ function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
}
// Sanitize term, according to the specified filter.
$_term->filter( $filter );
if ( $_term !== $old_term || $_term->filter !== $filter ) {
$_term->filter( $filter );
}
if ( ARRAY_A === $output ) {
return $_term->to_array();
@@ -1541,8 +1565,7 @@ function term_exists( $term, $taxonomy = '', $parent_term = null ) {
// Ensure that while importing, queries are not cached.
if ( ! empty( $_wp_suspend_cache_invalidation ) ) {
// @todo Disable caching once #52710 is merged.
$defaults['cache_domain'] = microtime();
$defaults['cache_results'] = false;
}
if ( ! empty( $taxonomy ) ) {
@@ -3090,7 +3113,7 @@ function wp_unique_term_slug( $slug, $term ) {
$num = 2;
do {
$alt_slug = $slug . "-$num";
$num++;
++$num;
$slug_check = $wpdb->get_var( $wpdb->prepare( "SELECT slug FROM $wpdb->terms WHERE slug = %s", $alt_slug ) );
} while ( $slug_check );
$slug = $alt_slug;