<?php /* * * Blog * [blog_box] * */ vc_map(array('base' => 'blog_box', 'name' => __('Blog Posts', 'rt_theme_admin'), 'icon' => 'rt_theme blog', 'category' => array(__('Content', 'rt_theme_admin'), __('Theme Addons', 'rt_theme_admin')), 'description' => __('Displays blog posts with selected parameters', 'rt_theme_admin'), 'params' => array(array('param_name' => 'id', 'heading' => __('ID', 'rt_theme_admin'), 'description' => __('Unique ID', 'rt_theme_admin'), 'type' => 'textfield', 'value' => ''), array('param_name' => 'class', 'heading' => __('Class', 'rt_theme_admin'), 'description' => __('CSS Class Name', 'rt_theme_admin'), 'type' => 'textfield'), array('param_name' => 'list_layout', 'heading' => __('Layout', 'rt_theme_admin'), "description" => __("Column layout for the list", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array("1/6" => "1/6", "1/4" => "1/4", "1/3" => "1/3", "1/2" => "1/2", "1/1" => "1/1"), 'save_always' => true), array('param_name' => 'layout_style', 'heading' => __('Layout Style', 'rt_theme_admin'), "description" => __("Design of the layout", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Grid", "rt_theme_admin") => "grid", __("Masonry", "rt_theme_admin") => "masonry"), 'save_always' => true), array('param_name' => 'use_excerpts', 'heading' => __("Excerpts", "rt_theme_admin"), "description" => __("As default the full blog content will be displayed for this list. Enable this option to minify the content automatically by using WordPress's excerpt option. You can keep disabled and split your content manually by using <a href=\"http://en.support.wordpress.com/splitting-content/more-tag/\">The More Tag</a>", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'save_always' => true), array('param_name' => 'pagination', 'heading' => __('Pagination', 'rt_theme_admin'), "description" => __("Splits the list into pages", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'save_always' => true), array('param_name' => 'ajax_pagination', 'description' => __('Works with Masonry layout only', 'rt_theme_admin'), 'type' => 'checkbox', "value" => array(__("Enable ajax pagination (load more)", "rt_theme_admin") => "true"), "dependency" => array("element" => "pagination", "value" => array("true")), 'save_always' => true), array('param_name' => 'list_orderby', 'heading' => __('List Order By', 'rt_theme_admin'), "description" => __("Sorts the posts by this parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Date', 'rt_theme_admin') => 'date', __('Author', 'rt_theme_admin') => 'author', __('Title', 'rt_theme_admin') => 'title', __('Modified', 'rt_theme_admin') => 'modified', __('ID', 'rt_theme_admin') => 'ID', __('Randomized', 'rt_theme_admin') => 'rand'), 'save_always' => true), array('param_name' => 'list_order', 'heading' => __('List Order', 'rt_theme_admin'), "description" => __("Designates the ascending or descending order of the list_orderby parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Descending', 'rt_theme_admin') => 'DESC', __('Ascending', 'rt_theme_admin') => 'ASC'), 'save_always' => true), array('param_name' => 'item_per_page', 'heading' => __('Amount of post per page', 'rt_theme_admin'), 'type' => 'textfield'), array('param_name' => 'categories', 'heading' => __('Categories', 'rt_theme_admin'), "description" => __("List posts of selected categories only.", 'rt_theme_admin'), 'type' => 'dropdown_multi', "value" => array_merge(array(__('All Categories', 'rt_theme_admin') => ""), array_flip(rt_get_categories())), 'save_always' => true), array('param_name' => 'show_date', 'heading' => __("Display Date", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_author', 'heading' => __("Display Post Author", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_categories', 'heading' => __("Display Categories", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_comment_numbers', 'heading' => __("Display Comment Numbers", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_resize', 'heading' => __('Resize Featured Images', 'rt_theme_admin'), 'description' => __('Enable "Image Resize" to resize or crop the featured images automatically. These settings will be overwrite the global settings. Please note, since the theme is reponsive the images cannot be wider than the column they are in. Leave values "0" to use theme defaults.', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Enabled", "rt_theme_admin") => "true", __("Disabled", "rt_theme_admin") => "false"), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_max_width', 'heading' => __('Featured Image Max Width', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 0, "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_max_height', 'heading' => __('Featured Image Max Height', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 0, "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_crop', 'heading' => __('Crop Featured Images', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Disabled", "rt_theme_admin") => "false", __("Enabled", "rt_theme_admin") => "true"), "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true))));
function form($instance) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $address = isset($instance['address']) ? esc_attr($instance['address']) : ''; $phone_1 = isset($instance['phone_1']) ? esc_attr($instance['phone_1']) : ''; $phone_2 = isset($instance['phone_2']) ? esc_attr($instance['phone_2']) : ''; $m_phone_1 = isset($instance['m_phone_1']) ? esc_attr($instance['m_phone_1']) : ''; $m_phone_2 = isset($instance['m_phone_2']) ? esc_attr($instance['m_phone_2']) : ''; $fax_1 = isset($instance['fax_1']) ? esc_attr($instance['fax_1']) : ''; $fax_2 = isset($instance['fax_2']) ? esc_attr($instance['fax_2']) : ''; $mail_1 = isset($instance['mail_1']) ? esc_attr($instance['mail_1']) : ''; $mail_2 = isset($instance['mail_2']) ? esc_attr($instance['mail_2']) : ''; $support_mail_1 = isset($instance['support_mail_1']) ? esc_attr($instance['support_mail_1']) : ''; $support_mail_2 = isset($instance['support_mail_2']) ? esc_attr($instance['support_mail_2']) : ''; $map_link = isset($instance['map_link']) ? esc_attr($instance['map_link']) : ''; $contact_form_link = isset($instance['contact_form_link']) ? esc_attr($instance['contact_form_link']) : ''; $map_link_text = isset($instance['map_link_text']) ? esc_attr($instance['map_link_text']) : ''; $contact_form_link_text = isset($instance['contact_form_link_text']) ? esc_attr($instance['contact_form_link_text']) : ''; // Categories $rt_getcat = rt_get_categories(); ?> <p><label for="<?php echo $this->get_field_id('title'); ?> "><?php _e('Title:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " type="text" value="<?php echo $title; ?> " /></p> <p><label for="<?php echo $this->get_field_id('address'); ?> "><?php _e('Address:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('address'); ?> " name="<?php echo $this->get_field_name('address'); ?> " type="text" value="<?php echo $address; ?> " /></p> <p><label for="<?php echo $this->get_field_id('phone_1'); ?> "><?php _e('Phone 1:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('phone_1'); ?> " name="<?php echo $this->get_field_name('phone_1'); ?> " type="text" value="<?php echo $phone_1; ?> " /></p> <p><label for="<?php echo $this->get_field_id('phone_2'); ?> "><?php _e('Phone 2:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('phone_2'); ?> " name="<?php echo $this->get_field_name('phone_2'); ?> " type="text" value="<?php echo $phone_2; ?> " /></p> <p><label for="<?php echo $this->get_field_id('phone_1'); ?> "><?php _e('Mobile Phone 1:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('m_phone_1'); ?> " name="<?php echo $this->get_field_name('m_phone_1'); ?> " type="text" value="<?php echo $m_phone_1; ?> " /></p> <p><label for="<?php echo $this->get_field_id('phone_2'); ?> "><?php _e('Mobile Phone 2:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('m_phone_2'); ?> " name="<?php echo $this->get_field_name('m_phone_2'); ?> " type="text" value="<?php echo $m_phone_2; ?> " /></p> <p><label for="<?php echo $this->get_field_id('fax_1'); ?> "><?php _e('Fax 1:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('fax_1'); ?> " name="<?php echo $this->get_field_name('fax_1'); ?> " type="text" value="<?php echo $fax_1; ?> " /></p> <p><label for="<?php echo $this->get_field_id('fax_2'); ?> "><?php _e('Fax 2:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('fax_2'); ?> " name="<?php echo $this->get_field_name('fax_2'); ?> " type="text" value="<?php echo $fax_2; ?> " /></p> <p><label for="<?php echo $this->get_field_id('mail_1'); ?> "><?php _e('Email 1:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('mail_1'); ?> " name="<?php echo $this->get_field_name('mail_1'); ?> " type="text" value="<?php echo $mail_1; ?> " /></p> <p><label for="<?php echo $this->get_field_id('mail_2'); ?> "><?php _e('Email 2:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('mail_2'); ?> " name="<?php echo $this->get_field_name('mail_2'); ?> " type="text" value="<?php echo $mail_2; ?> " /></p> <p><label for="<?php echo $this->get_field_id('support_mail_1'); ?> "><?php _e('Support Email 1:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('support_mail_1'); ?> " name="<?php echo $this->get_field_name('support_mail_1'); ?> " type="text" value="<?php echo $support_mail_1; ?> " /></p> <p><label for="<?php echo $this->get_field_id('support_mail_2'); ?> "><?php _e('Support Email 2:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('support_mail_2'); ?> " name="<?php echo $this->get_field_name('support_mail_2'); ?> " type="text" value="<?php echo $support_mail_2; ?> " /></p> <p><label for="<?php echo $this->get_field_id('contact_form_link'); ?> "><?php _e('Contact Form Link:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('contact_form_link'); ?> " name="<?php echo $this->get_field_name('contact_form_link'); ?> " type="text" value="<?php echo $contact_form_link; ?> " /></p> <p><label for="<?php echo $this->get_field_id('contact_form_link_text'); ?> "><?php _e('Contact Form Link Text:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('contact_form_link_text'); ?> " name="<?php echo $this->get_field_name('contact_form_link_text'); ?> " type="text" value="<?php echo empty($contact_form_link_text) ? __('Contact Form', 'rt_theme_admin') : $contact_form_link_text; ?> " /></p> <p><label for="<?php echo $this->get_field_id('map_link'); ?> "><?php _e('Map Link:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('map_link'); ?> " name="<?php echo $this->get_field_name('map_link'); ?> " type="text" value="<?php echo $map_link; ?> " /></p> <p><label for="<?php echo $this->get_field_id('map_link_text'); ?> "><?php _e('Map Link Text:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('map_link_text'); ?> " name="<?php echo $this->get_field_name('map_link_text'); ?> " type="text" value="<?php echo empty($map_link_text) ? __('Find us on map', 'rt_theme_admin') : $map_link_text; ?> " /></p> <?php }
<?php /* * * Blog Carousel * */ vc_map(array('base' => 'blog_carousel', 'name' => __('Blog Carousel', 'rt_theme_admin'), 'icon' => 'rt_theme carousel', 'category' => array(__('Content', 'rt_theme_admin'), __('Theme Addons', 'rt_theme_admin')), 'description' => __('Displays blog posts within a carousel', 'rt_theme_admin'), 'params' => array(array('param_name' => 'id', 'heading' => __('ID', 'rt_theme_admin'), 'description' => __('Unique ID', 'rt_theme_admin'), 'type' => 'textfield', 'value' => ''), array('param_name' => 'list_layout', 'heading' => __('Layout', 'rt_theme_admin'), "description" => __("Column width of an item. Percent of the visible part.", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array("1/6" => "1/6", "1/5" => "1/5", "1/4" => "1/4", "1/3" => "1/3", "1/2" => "1/2", "1/1" => "1/1"), 'save_always' => true), array('param_name' => 'max_item', 'heading' => __('Amount of item to display', 'rt_theme_admin'), 'type' => 'rt_number', 'value' => '10', 'save_always' => true), array('param_name' => 'excerpt_length', 'heading' => __('Excerpt Length', 'rt_theme_admin'), 'type' => 'rt_number', 'value' => '100', 'save_always' => true), array('param_name' => 'nav', 'heading' => __('Navigation Arrows', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Enabled", "rt_theme_admin") => "true", __("Disabled", "rt_theme_admin") => "false"), 'save_always' => true), array('param_name' => 'dots', 'heading' => __('Navigation Dots', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Enabled", "rt_theme_admin") => "true", __("Disabled", "rt_theme_admin") => "false"), 'save_always' => true), array('param_name' => 'autoplay', 'heading' => __('Auto Play', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Disabled", "rt_theme_admin") => "false", __("Enabled", "rt_theme_admin") => "true"), 'save_always' => true), array('param_name' => 'timeout', 'heading' => __('Auto Play Speed (ms)', 'rt_theme_admin'), 'type' => 'rt_number', 'value' => "", "description" => __("Auto play speed value in milliseconds. For example; set 5000 for 5 seconds", 'rt_theme_admin'), "dependency" => array("element" => "autoplay", "value" => array("true")), 'save_always' => true), array('param_name' => 'list_orderby', 'heading' => __('List Order By', 'rt_theme_admin'), "description" => __("Sorts the posts by this parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Date', 'rt_theme_admin') => 'date', __('Author', 'rt_theme_admin') => 'author', __('Title', 'rt_theme_admin') => 'title', __('Modified', 'rt_theme_admin') => 'modified', __('ID', 'rt_theme_admin') => 'ID', __('Randomized', 'rt_theme_admin') => 'rand'), 'save_always' => true), array('param_name' => 'list_order', 'heading' => __('List Order', 'rt_theme_admin'), "description" => __("Designates the ascending or descending order of the list_orderby parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Descending', 'rt_theme_admin') => 'DESC', __('Ascending', 'rt_theme_admin') => 'ASC'), 'save_always' => true), array('param_name' => 'categories', 'heading' => __('Categories', 'rt_theme_admin'), "description" => __("List posts of selected categories only.", 'rt_theme_admin'), 'type' => 'dropdown_multi', "value" => array_merge(array(__('All Categories', 'rt_theme_admin') => ""), array_flip(rt_get_categories())), 'save_always' => true), array('param_name' => 'show_date', 'heading' => __("Display Date", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_author', 'heading' => __("Display Post Author", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_categories', 'heading' => __("Display Categories", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'show_comment_numbers', 'heading' => __("Display Comment Numbers", "rt_theme_admin"), 'type' => 'dropdown', "value" => array(__('Yes', 'rt_theme_admin') => 'true', __('No', 'rt_theme_admin') => 'false'), 'group' => __('Post Meta', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_resize', 'heading' => __('Resize Featured Images', 'rt_theme_admin'), 'description' => __('Enable "Image Resize" to resize or crop the featured images automatically. These settings will be overwrite the global settings. Please note, since the theme is reponsive the images cannot be wider than the column they are in. Leave values "0" to use theme defaults.', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Enabled", "rt_theme_admin") => "true", __("Disabled", "rt_theme_admin") => "false"), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_max_width', 'heading' => __('Featured Image Max Width', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 0, "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_max_height', 'heading' => __('Featured Image Max Height', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 0, "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true), array('param_name' => 'featured_image_crop', 'heading' => __('Crop Featured Images', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__("Disabled", "rt_theme_admin") => "false", __("Enabled", "rt_theme_admin") => "true"), "dependency" => array("element" => "featured_image_resize", "value" => array("true")), 'group' => __('Featured Images', 'rt_theme_admin'), 'save_always' => true))));
function form($instance) { $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; $categories = isset($instance['categories']) ? $instance['categories'] : array(); $newWidget = isset($instance['newWidget']) ? $instance['newWidget'] : ''; $limit = empty($instance['limit']) ? 100 : $instance['limit']; $count = empty($instance['count']) ? 5 : $instance['count']; $show_thumbnails = isset($instance['show_thumbnails']) ? $instance['show_thumbnails'] : ''; $show_excerpt = isset($instance['show_excerpt']) ? $instance['show_excerpt'] : ''; $thumb_width = empty($instance['thumb_width']) ? 50 : $instance['thumb_width']; $thumb_height = empty($instance['thumb_height']) ? 50 : $instance['thumb_height']; // Categories $rt_getcat = rt_get_categories(); ?> <p><label for="<?php echo $this->get_field_id('title'); ?> "><?php _e('Title:', 'rt_theme_admin'); ?> </label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?> " name="<?php echo $this->get_field_name('title'); ?> " type="text" value="<?php echo $title; ?> " /></p> <p><label for="<?php echo $this->get_field_id('categories'); ?> "><?php _e('Select Categories:', 'rt_theme_admin'); ?> </label> <select class="widefat <?php echo empty($newWidget) ? '' : 'multiple'; ?> " name="<?php echo $this->get_field_name('categories'); ?> []" id="<?php echo $this->get_field_id('categories'); ?> " multiple="multiple" title="<?php _e('Select', 'rt_theme_admin'); ?> "> <?php foreach ($rt_getcat as $op_val => $option) { if ($categories) { foreach ($categories as $a_key => $a_value) { if ($a_value == $op_val) { $selected = "selected"; } } } ?> <option value="<?php echo $op_val; ?> " <?php echo empty($selected) ? "" : 'selected="selected"'; ?> > <?php echo $option; ?> </option> <?php $selected = ''; } ?> </select> <p><label for="<?php echo $this->get_field_id('count'); ?> "><?php _e('Number of posts to show:', 'rt_theme_admin'); ?> </label> <input id="<?php echo $this->get_field_id('count'); ?> " name="<?php echo $this->get_field_name('count'); ?> " type="text" value="<?php echo $count; ?> " size="4" /></p> <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_excerpt'); ?> " name="<?php echo $this->get_field_name('show_excerpt'); ?> " <?php checked($show_excerpt); ?> /> <label for="<?php echo $this->get_field_id('show_excerpt'); ?> "><?php _e('Display Excerpt', 'rt_theme_admin'); ?> </label></p> <p><label for="<?php echo $this->get_field_id('limit'); ?> "><?php _e('Limit excerpt characters: ', 'rt_theme_admin'); ?> </label> <input id="<?php echo $this->get_field_id('limit'); ?> " name="<?php echo $this->get_field_name('limit'); ?> " type="text" value="<?php echo $limit; ?> " size="4" /></p> <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('show_thumbnails'); ?> " name="<?php echo $this->get_field_name('show_thumbnails'); ?> " <?php checked($show_thumbnails); ?> /> <label for="<?php echo $this->get_field_id('show_thumbnails'); ?> "><?php _e('Don\'t display post thumbnails', 'rt_theme_admin'); ?> </label></p> <p><label for="<?php echo $this->get_field_id('thumb_width'); ?> "><?php _e('Thumbnail Width (px):', 'rt_theme_admin'); ?> </label> <input id="<?php echo $this->get_field_id('thumb_width'); ?> " name="<?php echo $this->get_field_name('thumb_width'); ?> " type="text" value="<?php echo $thumb_width; ?> " size="4" /></p> <p><label for="<?php echo $this->get_field_id('thumb_height'); ?> "><?php _e('Thumbnail Height (px):', 'rt_theme_admin'); ?> </label> <input id="<?php echo $this->get_field_id('thumb_height'); ?> " name="<?php echo $this->get_field_name('thumb_height'); ?> " type="text" value="<?php echo $thumb_height; ?> " size="4" /></p> <input class="widefat" id="<?php echo $this->get_field_id('newWidget'); ?> " name="<?php echo $this->get_field_name('newWidget'); ?> " type="hidden" value="1" /> <?php }
<?php /* * * Latest News * */ vc_map(array('base' => 'rt_latest_news', 'name' => __('Latest News', 'rt_theme_admin'), 'icon' => 'rt_theme latest_news', 'category' => array(__('Content', 'rt_theme_admin'), __('Theme Addons', 'rt_theme_admin')), 'description' => __('Displays blog posts with latest news style', 'rt_theme_admin'), 'params' => array(array('param_name' => 'style', 'heading' => __('Style', 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Style 1 - Big Dates', 'rt_theme_admin') => '1', __('Style 2- Featured Images', 'rt_theme_admin') => '2'), 'save_always' => true), array('param_name' => 'show_dates', 'heading' => __('Display Post Dates?', 'rt_theme_admin'), 'type' => 'checkbox', "value" => array(__("Yes", "rt_theme_admin") => "true"), "dependency" => array("element" => "style", "value" => array("2"))), array('param_name' => 'id', 'heading' => __('ID', 'rt_theme_admin'), 'description' => __('Unique ID', 'rt_theme_admin'), 'type' => 'textfield', 'value' => ''), array('param_name' => 'max_item', 'heading' => __('Amount of item to display', 'rt_theme_admin'), 'type' => 'rt_number', 'value' => '10', 'save_always' => true), array('param_name' => 'excerpt_length', 'heading' => __('Excerpt Length', 'rt_theme_admin'), 'type' => 'rt_number', 'value' => '100', 'save_always' => true), array('param_name' => 'list_orderby', 'heading' => __('List Order By', 'rt_theme_admin'), "description" => __("Sorts the posts by this parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Date', 'rt_theme_admin') => 'date', __('Author', 'rt_theme_admin') => 'author', __('Title', 'rt_theme_admin') => 'title', __('Modified', 'rt_theme_admin') => 'modified', __('ID', 'rt_theme_admin') => 'ID', __('Randomized', 'rt_theme_admin') => 'rand'), 'save_always' => true), array('param_name' => 'list_order', 'heading' => __('List Order', 'rt_theme_admin'), "description" => __("Designates the ascending or descending order of the list_orderby parameter", 'rt_theme_admin'), 'type' => 'dropdown', "value" => array(__('Descending', 'rt_theme_admin') => 'DESC', __('Ascending', 'rt_theme_admin') => 'ASC'), 'save_always' => true), array('param_name' => 'categories', 'heading' => __('Categories', 'rt_theme_admin'), "description" => __("List posts of selected categories only.", 'rt_theme_admin'), 'type' => 'dropdown_multi', "value" => array_merge(array(__('All Categories', 'rt_theme_admin') => ""), array_flip(rt_get_categories())), 'save_always' => true), array('param_name' => 'image_width', 'heading' => __('Featured Image Max Width', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 250, "dependency" => array("element" => "style", "value" => array("2")), 'save_always' => true), array('param_name' => 'image_height', 'heading' => __('Featured Image Max Height', 'rt_theme_admin'), 'type' => 'textfield', 'value' => 250, "dependency" => array("element" => "style", "value" => array("2")), 'save_always' => true))));