W3cubDocs

/WordPress

WP_Term::to_array()

Converts an object to array.

Return

(array) Object as array.

Source

File: wp-includes/class-wp-term.php

public function to_array() {
		return get_object_vars( $this );
	}

Changelog

Version Description
4.4.0 Introduced.

© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_term/to_array