private function image($values) { if (is_array($values) && isset($values[0])) { return get_picture_controller($values[0]); } else { return $values; } }
/** * Returns the featured image * @since 0.1.0 * @param string $size (optional) * @return object|null */ public function featured_image($options = array()) { $id = get_post_thumbnail_id($this->id); if ($id) { return get_picture_controller($id, $options); } }