Update WP and plugins
This commit is contained in:
parent
10a4713229
commit
1fb77fc4ff
864 changed files with 101724 additions and 78262 deletions
|
@ -127,6 +127,14 @@ final class WP_Taxonomy {
|
|||
*/
|
||||
public $meta_box_cb = null;
|
||||
|
||||
/**
|
||||
* The callback function for sanitizing taxonomy data saved from a meta box.
|
||||
*
|
||||
* @since 5.1.0
|
||||
* @var callable
|
||||
*/
|
||||
public $meta_box_sanitize_cb = null;
|
||||
|
||||
/**
|
||||
* An array of object types this taxonomy is registered for.
|
||||
*
|
||||
|
@ -139,7 +147,7 @@ final class WP_Taxonomy {
|
|||
* Capabilities for this taxonomy.
|
||||
*
|
||||
* @since 4.7.0
|
||||
* @var array
|
||||
* @var object
|
||||
*/
|
||||
public $cap;
|
||||
|
||||
|
@ -238,9 +246,9 @@ final class WP_Taxonomy {
|
|||
*
|
||||
* @since 4.4.0
|
||||
*
|
||||
* @param array $args Array of arguments for registering a taxonomy.
|
||||
* @param string $taxonomy Taxonomy key.
|
||||
* @param array $object_type Array of names of object types for the taxonomy.
|
||||
* @param array $args Array of arguments for registering a taxonomy.
|
||||
* @param string $taxonomy Taxonomy key.
|
||||
* @param string[] $object_type Array of names of object types for the taxonomy.
|
||||
*/
|
||||
$args = apply_filters( 'register_taxonomy_args', $args, $this->name, (array) $object_type );
|
||||
|
||||
|
@ -257,6 +265,7 @@ final class WP_Taxonomy {
|
|||
'show_in_quick_edit' => null,
|
||||
'show_admin_column' => false,
|
||||
'meta_box_cb' => null,
|
||||
'meta_box_sanitize_cb' => null,
|
||||
'capabilities' => array(),
|
||||
'rewrite' => true,
|
||||
'query_var' => $this->name,
|
||||
|
@ -286,11 +295,14 @@ final class WP_Taxonomy {
|
|||
}
|
||||
|
||||
if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
|
||||
$args['rewrite'] = wp_parse_args( $args['rewrite'], array(
|
||||
'with_front' => true,
|
||||
'hierarchical' => false,
|
||||
'ep_mask' => EP_NONE,
|
||||
) );
|
||||
$args['rewrite'] = wp_parse_args(
|
||||
$args['rewrite'],
|
||||
array(
|
||||
'with_front' => true,
|
||||
'hierarchical' => false,
|
||||
'ep_mask' => EP_NONE,
|
||||
)
|
||||
);
|
||||
|
||||
if ( empty( $args['rewrite']['slug'] ) ) {
|
||||
$args['rewrite']['slug'] = sanitize_title_with_dashes( $this->name );
|
||||
|
@ -345,12 +357,26 @@ final class WP_Taxonomy {
|
|||
|
||||
$args['name'] = $this->name;
|
||||
|
||||
// Default meta box sanitization callback depends on the value of 'meta_box_cb'.
|
||||
if ( null === $args['meta_box_sanitize_cb'] ) {
|
||||
switch ( $args['meta_box_cb'] ) {
|
||||
case 'post_categories_meta_box':
|
||||
$args['meta_box_sanitize_cb'] = 'taxonomy_meta_box_sanitize_cb_checkboxes';
|
||||
break;
|
||||
|
||||
case 'post_tags_meta_box':
|
||||
default:
|
||||
$args['meta_box_sanitize_cb'] = 'taxonomy_meta_box_sanitize_cb_input';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $args as $property_name => $property_value ) {
|
||||
$this->$property_name = $property_value;
|
||||
}
|
||||
|
||||
$this->labels = get_taxonomy_labels( $this );
|
||||
$this->label = $this->labels->name;
|
||||
$this->label = $this->labels->name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue