diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index 9955a42..f9b6f2f 100644
|
|
|
function wp_ajax_add_tag() { |
| 856 | 856 | 'what' => 'taxonomy', |
| 857 | 857 | 'supplemental' => compact('parents', 'noparents') |
| 858 | 858 | ) ); |
| | 859 | _b( $tag ); |
| 859 | 860 | $x->add( array( |
| 860 | 861 | 'what' => 'term', |
| 861 | 862 | 'position' => $level, |
diff --git src/wp-includes/class-wp-term.php src/wp-includes/class-wp-term.php
index 9403641..857d5fc 100644
|
|
|
final class WP_Term { |
| 96 | 96 | public $count = 0; |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | | * Info about the term, as stored in the database. |
| 100 | | * |
| 101 | | * @since 4.4.0 |
| 102 | | * @access protected |
| 103 | | * @var array |
| 104 | | */ |
| 105 | | protected $data = array(); |
| 106 | | |
| 107 | | /** |
| 108 | 99 | * Stores the term object's sanitization level. |
| 109 | 100 | * |
| 110 | 101 | * Does not correspond to a database field. |
| … |
… |
final class WP_Term { |
| 166 | 157 | foreach ( get_object_vars( $term ) as $key => $value ) { |
| 167 | 158 | $this->$key = $value; |
| 168 | 159 | } |
| 169 | | |
| 170 | | $this->data = sanitize_term( $term, $this->taxonomy, $this->filter ); |
| 171 | 160 | } |
| 172 | 161 | |
| 173 | 162 | /** |
| … |
… |
final class WP_Term { |
| 205 | 194 | public function __get( $key ) { |
| 206 | 195 | switch ( $key ) { |
| 207 | 196 | case 'data' : |
| 208 | | return sanitize_term( $this->{$key}, $this->data->taxonomy, 'raw' ); |
| | 197 | $data = new stdClass(); |
| | 198 | $columns = array( 'term_id', 'name', 'slug', 'term_group', 'term_taxonomy_id', 'taxonomy', 'description', 'parent', 'count' ); |
| | 199 | foreach ( $columns as $column ) { |
| | 200 | $data->{$column} = isset( $this->{$column} ) ? $this->{$column} : null; |
| | 201 | } |
| | 202 | |
| | 203 | return sanitize_term( $data, $data->taxonomy, 'raw' ); |
| 209 | 204 | break; |
| 210 | 205 | } |
| 211 | 206 | } |