/**
  * Fetch a list of posts rendered markups.
  * @param array $data The properties data array
  * @return array Array of parsed markup items for each post in the list.
  */
 public static function get_posts_markup($data)
 {
     $posts = Upfront_Posts_Model::get_posts($data);
     $posts_markup = array();
     $view = new Upfront_Posts_PostView($data);
     foreach ($posts as $idx => $post) {
         $posts_markup[$idx] = $view->get_markup($post);
     }
     return $posts_markup;
 }
 /**
  * Fetch all default values for properties.
  * @return array Default element properties
  */
 public static function get_defaults()
 {
     static $defaults;
     if (!empty($defaults)) {
         return $defaults;
     }
     $default_parts = Upfront_Posts_PostView::get_default_parts();
     $default_parts = apply_filters('upfront_posts-defaults-default_parts', $default_parts);
     // Enabled parts are a subset of default ones
     $enabled_parts = $default_parts;
     $meta = array_search('meta', $enabled_parts);
     if (false !== $meta) {
         unset($enabled_parts[$meta]);
     }
     $enabled_parts = apply_filters('upfront_posts-defaults-enabled_parts', $enabled_parts);
     $defaults = array('type' => 'PostsModel', 'view_class' => 'PostsView', 'has_settings' => 1, 'class' => 'c24 uposts-object', 'id_slug' => 'posts', 'display_type' => '', 'list_type' => 'generic', 'offset' => 1, 'taxonomy' => '', 'term' => '', 'content' => 'excerpt', 'limit' => 5, 'pagination' => '', 'sticky' => '', 'posts_list' => '', 'post_parts' => $enabled_parts, 'enabled_post_parts' => $enabled_parts, 'default_parts' => $default_parts, 'date_posted_format' => get_option('date_format') . ' ' . get_option('time_format'), 'categories_limit' => 3, 'tags_limit' => 3, 'comment_count_hide' => 0, 'content_length' => 120, 'resize_featured' => '1', 'gravatar_size' => 200);
     foreach ($default_parts as $part) {
         $key = self::_slug_to_part_key($part);
         $defaults[$key] = self::get_template($part);
     }
     return $defaults;
 }