/** * Returns the HTML for the column titles, based on their type * * @param string $title title text * @param string $type title type * @return string column title html */ public static function column_title($title, $type) { if ($type === 'no-divider') { return "<h2 class='column-title'>{$title}</h2>"; } return WPV_Text_Divider::shortcode(array('more' => '', 'type' => $type), $title); }
private function all($atts) { extract(shortcode_atts(array('number' => '0', 'shows' => 'pages,categories,posts,portfolios'), $atts)); $shows = explode(',', $shows); if (empty($shows)) { return ''; } $types = array('pages' => __('Pages', 'honeymoon'), 'categories' => __('Categories', 'honeymoon'), 'posts' => __('Posts', 'honeymoon'), 'portfolios' => __('Portfolios', 'honeymoon')); $output = ''; foreach ($types as $type => $name) { if (in_array($type, $shows)) { $output .= WPV_Text_Divider::shortcode(array('more' => '', 'type' => 'double'), $name); $output .= $this->{$type}($atts); } } return $output; }