Changeset 35269 for trunk/src/wp-includes/class-wp-term.php
- Timestamp:
- 10/19/2015 03:11:30 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-term.php
r35032 r35269 97 97 98 98 /** 99 * Info about the term, as stored in the database.100 *101 * @since 4.4.0102 * @access protected103 * @var array104 */105 protected $data = array();106 107 /**108 99 * Stores the term object's sanitization level. 109 100 * … … 167 158 $this->$key = $value; 168 159 } 169 170 $this->data = sanitize_term( $term, $this->taxonomy, $this->filter );171 160 } 172 161 … … 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 }
Note: See TracChangeset
for help on using the changeset viewer.