function axiom_add_template($tpl) { global $AXIOM_GLOBALS; if (empty($tpl['mode'])) { $tpl['mode'] = 'blog'; } if (empty($tpl['template'])) { $tpl['template'] = $tpl['layout']; } if (empty($tpl['need_content'])) { $tpl['need_content'] = false; } if (empty($tpl['need_terms'])) { $tpl['need_terms'] = false; } if (empty($tpl['need_columns'])) { $tpl['need_columns'] = false; } if (empty($tpl['need_isotope'])) { $tpl['need_isotope'] = false; } if (!isset($tpl['h_crop']) && isset($tpl['h'])) { $tpl['h_crop'] = $tpl['h']; } if (!isset($AXIOM_GLOBALS['registered_templates'])) { $AXIOM_GLOBALS['registered_templates'] = array(); } $AXIOM_GLOBALS['registered_templates'][$tpl['layout']] = $tpl; if (!empty($tpl['thumb_title'])) { axiom_add_thumb_sizes($tpl); } else { $tpl['thumb_title'] = ''; } }
/** * Widget setup. */ function __construct() { /* Widget settings. */ $widget_ops = array('classname' => 'widget_top10', 'description' => __('Top 10 posts by average reviews marks (by author and users)', 'axiom')); /* Widget control settings. */ $control_ops = array('width' => 200, 'height' => 250, 'id_base' => 'axiom_widget_top10'); /* Create the widget. */ parent::__construct('axiom_widget_top10', __('AxiomThemes - Top 10 Posts', 'axiom'), $widget_ops, $control_ops); // Add thumb sizes into list axiom_add_thumb_sizes(array('layout' => 'widgets', 'w' => 75, 'h' => 75, 'h_crop' => 75, 'title' => __('Widgets', 'axiom'))); }
/** * Widget setup. */ function __construct() { /* Widget settings. */ $widget_ops = array('classname' => 'widget_recent_posts', 'description' => __('The recent blog posts (extended)', 'axiom')); /* Widget control settings. */ $control_ops = array('width' => 200, 'height' => 250, 'id_base' => 'axiom_widget_recent_posts'); /* Create the widget. */ parent::__construct('axiom_widget_recent_posts', __('AxiomThemes - Recent Posts', 'axiom'), $widget_ops, $control_ops); // Add thumb sizes into list axiom_add_thumb_sizes(array('layout' => 'widgets', 'w' => 75, 'h' => 75, 'h_crop' => 75, 'title' => __('Widgets', 'axiom'))); }