Retrieves the font collection data.
Source
public function get_data() {
if ( is_wp_error( $this->data ) ) {
return $this->data;
}
// If the collection uses JSON data, load it and cache the data/error.
if ( isset( $this->src ) ) {
$this->data = $this->load_from_json( $this->src );
}
if ( is_wp_error( $this->data ) ) {
return $this->data;
}
// Set defaults for optional properties.
$defaults = array(
'description' => '',
'categories' => array(),
);
return wp_parse_args( $this->data, $defaults );
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.