WP_Comment::to_array() WordPress Method
The WP_Comment::to_array() method is used to convert a comment object into an array. This is useful for accessing comment data in a more flexible way, or for use with functions that require an array as input.
WP_Comment::to_array() #
Convert object to array.
Return
(array) Object as array.
Source
File: wp-includes/class-wp-comment.php
public function to_array() { return get_object_vars( $this ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |