<div class="feature-box-info"> <h4 class="shorter">' . $item['title'] . '</h4> <p class="tall">' . $item['teaser'] . '</p> </div> </div> </div>'; } function generate_box_item($item, $atts) { return ' <div class="' . $atts['column_class'] . '"> <div class="featured-box featured-box-' . $item['skin'] . '"> <div class="box-content"> <i class="' . $item['icon'] . '"></i> <h4>' . $item['title'] . '</h4> <p>' . $item['teaser'] . '</p> </div> </div> </div>'; } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view($style); } } spyropress_builder_register_module('Spyropress_Module_Parallax');
<p class="white"><strong>' . get_the_title() . '</strong><br><span>' . $data['designation'] . ' - ' . $data['website'] . '</span></p> </div> </div> </div>'; return $item_tmpl; } function generate_column_item($post_ID, $atts) { // these arguments will be available from inside $content $image = array('post_id' => $post_ID, 'echo' => false, 'responsive' => true); $image_tag = get_image($image); $data = get_post_meta($post_ID, '_testimonial', true); // item tempalte $item_tmpl = ' <div class="' . $atts['column_class'] . '"> <blockquote class="testimonial"> ' . $data['testimonial'] . ' </blockquote> <div class="testimonial-arrow-down"></div> <div class="testimonial-author"> <div class="img-thumbnail img-thumbnail-small"> ' . $image_tag . ' </div> <p><strong>' . get_the_title() . '</strong><span>' . $data['designation'] . ' - ' . $data['website'] . '</span></p> </div> </div>'; return $item_tmpl; } } spyropress_builder_register_module('Spyropress_Widget_Recent_Testimonials');
* Module: Carousel * Display an Image Carousel * * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_Carousel extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = 'module-carousel'; $this->description = __('Display an Image Carousel', 'spyropress'); $this->idbase = 'spyropress_carousel'; $this->name = __('Carousel', 'spyropress'); // Fields $this->fields = array(array('label' => __('Slides', 'spyropress'), 'type' => 'repeater', 'id' => 'slides', 'fields' => array(array('name' => __('Image', 'spyropress'), 'id' => 'image', 'type' => 'upload')))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Carousel');
scaleControl: true, streetViewControl: true, overviewMapControl: true }, scrollwheel: false, maptype: "' . $maptype . '", markers: mapMarkers, latitude: initLatitude, longitude: initLongitude, zoom: ' . $zoom . ' }; var map = $("#googlemaps").gMap(mapSettings); // Add Markers jQuery.each( mapMarkers, function(index, value) { $("#googlemaps").gMap("addMarker", value); }); '; $centerat_js = "\n\n" . '// Map Center At' . "\n"; $centerat_js .= ' var mapCenterAt = function(options, e) { e.preventDefault(); jQuery("#googlemaps").gMap("centerAt", options); }'; add_jquery_ready($markers_js); add_inline_js($centerat_js); } } spyropress_builder_register_module('Spyropress_Module_Gmap');
* Module: Rich Text * Provides a WYSIWYG editor. * * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_Rich_Text extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = 'rich-text'; $this->description = __('Provides a WYSIWYG editor.', 'spyropress'); $this->id_base = 'rich_text'; $this->name = __('Rich Text', 'spyropress'); // Fields $this->fields = array(array('id' => 'rich_text', 'type' => 'editor')); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Rich_Text');
* Module: Bucket * A list of partial layouts created using Template Builder. * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Bucket extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = 'module-bucket'; $this->description = __('A list of partial layouts created using Template Builder.', 'spyropress'); $this->id_base = 'spyropress_bucket'; $this->name = __('Bucket', 'spyropress'); // Fields $this->fields = array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Buckets', 'spyropress'), 'desc' => __('Partial Layout created using Template Builder.', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'options' => spyropress_get_buckets())); $this->create_widget(); } function widget($args, $instance) { extract($instance); spyropress_the_bucket($bucket); } } /** * Register */ spyropress_builder_register_module('Spyropress_Module_Bucket'); register_widget('Spyropress_Module_Bucket');
* @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Counters extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->path = dirname(__FILE__); $this->description = __('Display stats as counters.', 'spyropress'); $this->id_base = 'spyroress_counters'; $this->name = __('Stats Counter', 'spyropress'); // Fields $this->fields = array(array('label' => __('Stats', 'spyropress'), 'id' => 'stats', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Counter', 'spyropress'), 'id' => 'count', 'type' => 'text'), array('label' => __('Append text', 'spyropress'), 'id' => 'append', 'type' => 'text')))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); if (empty($stats)) { return; } // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Counters');
function widget($args, $instance) { // extracting info extract($args); // get view to render $template = isset($instance['layout']) ? $instance['layout'] : 'full'; include $this->get_view($template); } function query($atts) { $default = array('limit' => -1, 'pagination' => true); $atts = wp_parse_args($atts, $default); if (!empty($atts['cat'])) { $atts['tax_query']['relation'] = 'OR'; if (!empty($atts['cat'])) { $atts['tax_query'][] = array('taxonomy' => 'category', 'field' => 'slug', 'terms' => $atts['cat']); unset($atts['cat']); } } if ($atts['limit']) { $atts['posts_per_page'] = $atts['limit']; unset($atts['limit']); if ($atts['pagination']) { $atts['paged'] = get_page_query(); } } return $atts; } } spyropress_builder_register_module('Spyropress_Module_Blog');
* @package Spyropress */ class Spyropress_Module_FlexSlider extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->path = dirname(__FILE__); $this->cssclass = ''; $this->description = __('Slide content or images using FlexSlider', 'spyropress'); $this->idbase = 'spyropress_flexslider'; $this->name = __('Slider', 'spyropress'); // Fields $this->templates['image'] = array('label' => 'Image Slider'); $this->templates['image2'] = array('label' => 'Image Slider with Border'); $this->templates['content'] = array('label' => 'Content Slider', 'view' => 'content.php'); $this->fields = array(array('label' => __('Template', 'spyropress'), 'id' => 'template', 'type' => 'select', 'options' => $this->get_option_templates(), 'class' => 'enable_changer section-full', 'std' => 'image'), array('label' => __('Slides', 'spyropress'), 'type' => 'repeater', 'id' => 'slides', 'fields' => array(array('name' => __('Image', 'spyropress'), 'id' => 'image', 'type' => 'upload', 'class' => 'template image image2 section-full'), array('name' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'class' => 'template content section-full'))), array('id' => 'controlNav', 'type' => 'checkbox', 'options' => array('1' => __('Display control navigation', 'spyropress'))), array('id' => 'directionNav', 'type' => 'checkbox', 'options' => array('1' => 'Display direction navigation')), array('id' => 'slideshow', 'type' => 'checkbox', 'options' => array('1' => 'Enable AutoPlay')), array('id' => 'autoheight', 'type' => 'checkbox', 'options' => array('1' => 'Enable AutoHeight')), array('id' => 'items', 'type' => 'range_slider', 'label' => __('Number of items', 'spyropress'), 'std' => 1, 'min' => 1, 'max' => 20), array('label' => 'Animation', 'id' => 'animation', 'type' => 'select', 'options' => array('backSlide' => 'Back Slide', 'fade' => 'Fade', 'fadeUp' => 'Fade Up', 'goDown' => 'Go Down', 'slide' => 'Slide'))); $this->create_widget(); } function widget($args, $instance) { // extracting info $defaults = array('controlNav' => false, 'directionNav' => false, 'animation' => false, 'slideshow' => false, 'autoheight' => false, 'items' => 1); extract($args); extract(wp_parse_args($instance, $defaults)); // get view to render include $this->get_view($template); } } spyropress_builder_register_module('Spyropress_Module_FlexSlider');
/** * Module: About Me * A lightweight, flexible component to showcase intro * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_About_Me extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->description = __('Biography', 'spyropress'); $this->id_base = 'about_me'; $this->name = __('About Me', 'spyropress'); // Fields $this->fields = array(array('label' => __('Full Name', 'spyropress'), 'id' => 'full_name', 'type' => 'text'), array('label' => __('Designation', 'spyropress'), 'id' => 'designation', 'type' => 'text'), array('label' => __('Social Identities', 'spyropress'), 'id' => 'socials', 'type' => 'repeater', 'item_title' => 'network', 'fields' => array(array('label' => __('Network', 'spyropress'), 'id' => 'network', 'type' => 'select', 'options' => spyropress_get_options_social()), array('label' => __('URL', 'spyropress'), 'id' => 'url', 'type' => 'text'))), array('label' => __('About yourself', 'spyropress'), 'id' => 'about', 'type' => 'editor', 'rows' => 10)); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_About_Me');
* * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Teaser_Content extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->description = __('A flexible component to emphasize content on your site.', 'spyropress'); $this->id_base = 'teaser_content'; $this->name = __('Teaser Content', 'spyropress'); $this->templates['style1'] = array('label' => __('Featured', 'spyropress')); $this->templates['style2'] = array('label' => __('Tall', 'spyropress')); // Fields $this->fields = array(array('label' => __('Styles', 'spyropress'), 'id' => 'style', 'type' => 'select', 'options' => $this->get_option_templates(), 'std' => 'style1'), array('label' => __('Teaser Line 1', 'spyropress'), 'id' => 'teaser1', 'type' => 'textarea', 'rows' => 6), array('label' => __('Teaser Line 2', 'spyropress'), 'id' => 'teaser2', 'type' => 'textarea', 'rows' => 6)); $this->create_widget(); } function widget($args, $instance) { // extracting info $instance = spyropress_clean_array($instance); extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Teaser_Content');
* @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Call_Action extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->path = dirname(__FILE__); $this->description = __('Call of Action', 'spyropress'); $this->id_base = 'call_action'; $this->cssclass = 'call-action'; $this->name = __('Call of Action', 'spyropress'); $this->templates['compact'] = array('label' => __('Compact View', 'spyropress'), 'class' => 'home-intro home-intro-compact'); $this->templates['big'] = array('label' => __('Big Teaser', 'spyropress'), 'view' => 'bigview.php'); // Fields $this->fields = array(array('label' => __('Styles', 'spyropress'), 'id' => 'template', 'type' => 'select', 'options' => $this->get_option_templates()), array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Sub Title', 'spyropress'), 'id' => 'sub_title', 'type' => 'textarea', 'rows' => 5), array('label' => __('Button Setting', 'spyropress'), 'type' => 'toggle'), array('label' => __('Link Text', 'spyropress'), 'id' => 'btn_url_text', 'type' => 'text'), array('label' => __('URL/Hash', 'spyropress'), 'id' => 'btn_url', 'type' => 'text'), array('label' => __('Link to Post/Page', 'spyropress'), 'id' => 'btn_link_url', 'type' => 'page'), array('type' => 'toggle_end'), array('label' => __('Link Setting', 'spyropress'), 'type' => 'toggle'), array('label' => __('Link Text', 'spyropress'), 'id' => 'url_text', 'type' => 'text'), array('label' => __('URL/Hash', 'spyropress'), 'id' => 'url', 'type' => 'text'), array('label' => __('Link to Post/Page', 'spyropress'), 'id' => 'link_url', 'type' => 'page'), array('type' => 'toggle_end')); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view($template); } } spyropress_builder_register_module('Spyropress_Module_Call_Action');
* * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Flickr_Feed extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->path = dirname(__FILE__); $this->description = __('A lightweight, component to show your flickr feed', 'spyropress'); $this->id_base = 'flickr_feed'; $this->cssclass = 'flickr-feed'; $this->name = __('Flickr Feed', 'spyropress'); // Fields $this->fields = array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Flickr ID', 'spyropress'), 'id' => 'username', 'type' => 'text'), array('label' => __('Limit of Flickr gallery images', 'spyropress'), 'id' => 'limit', 'type' => 'text', 'std' => '6'), array('label' => __('Points', 'spyropress'), 'id' => 'points', 'type' => 'repeater', 'fields' => array(array('id' => 'point', 'type' => 'text')))); $this->create_widget(); } function widget($args, $instance) { // extracting info $instance = spyropress_clean_array($instance); extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Flickr_Feed');
} } if ($content) { return token_repalce($content, spyropress_query_generator($atts)); } return spyropress_query_generator($atts); } // Item HTML Generator function generate_item($post_ID, $atts) { // these arguments will be available from inside $content $image = array('post_id' => $post_ID, 'echo' => false); $image_tag = get_image($image); // item tempalte $item_tmpl = ' <div class="' . $atts['column_class'] . '"> <article> <div class="date"> <span class="day">' . get_the_date('j') . '</span> <span class="month">' . get_the_date('M') . '</span> </div> <h4><a href="' . get_permalink() . '">' . get_the_title() . '</a></h4> <p>' . spyropress_get_excerpt('by=words&length=' . $atts['excerpt_length'] . '&link_to_post=0&ellipsis=&before_text=&after_text=') . ' <a href="' . get_permalink() . '" class="read-more">' . get_setting('excerpt_link_text', 'read more') . ' <i class="fa fa-angle-right"></i></a></p> </article> </div>'; return $item_tmpl; } } spyropress_builder_register_module('Spyropress_Module_Recent_Posts');
* * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_Timeline extends SpyropressBuilderModule { /** * Constructor */ public function __construct() { $this->path = dirname(__FILE__); // Widget variable settings $this->description = __('A flexible component to generate Timeline.', 'spyropress'); $this->id_base = 'timeline'; $this->name = __('Timeline', 'spyropress'); // Fields $this->fields = array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Lines', 'spyropress'), 'id' => 'lines', 'type' => 'repeater', 'item_title' => 'heading', 'fields' => array(array('label' => __('Heading', 'spyropress'), 'id' => 'heading', 'type' => 'text'), array('label' => __('Teaser', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 4), array('label' => __('Image', 'spyropress'), 'id' => 'img', 'type' => 'upload')))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Timeline');
* @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Toggle extends SpyropressBuilderModule { public function __construct() { $this->path = dirname(__FILE__); // Widget variable settings $this->description = __('Toggle Content Builder', 'spyropress'); $this->id_base = 'toggle'; $this->cssclass = 'toogle'; $this->name = __('Toggle Content', 'spyropress'); // Fields $this->templates['one'] = array('label' => __('One Toggle at a Time', 'spyropress')); $this->fields = array(array('label' => __('Styles', 'spyropress'), 'id' => 'template', 'type' => 'select', 'options' => $this->get_option_templates()), array('label' => __('Toggles', 'spyropress'), 'id' => 'toggles', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render $template = isset($instance['template']) ? $instance['template'] : ''; include $this->get_view($template); } } spyropress_builder_register_module('Spyropress_Module_Toggle');
* A flexible component to showcase your concept. * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Home_Concept extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->description = __('A flexible component to showcase your concept', 'spyropress'); $this->id_base = 'home_concept'; $this->name = __('Home Concept', 'spyropress'); // Fields $this->fields = array(array('label' => __('Concepts', 'spyropress'), 'id' => 'concepts', 'item_field' => 'title', 'type' => 'repeater', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Image', 'spyropress'), 'id' => 'img', 'type' => 'upload'))), array('label' => __('Works', 'spyropress'), 'type' => 'sub_heading'), array('label' => __('Title', 'spyropress'), 'id' => 'work_title', 'type' => 'text'), array('id' => 'works', 'type' => 'repeater', 'fields' => array(array('label' => __('Image', 'spyropress'), 'id' => 'img', 'type' => 'upload'), array('label' => __('Link', 'spyropress'), 'id' => 'link', 'type' => 'custom_post', 'post_type' => array('portfolio')), array('label' => __('External Link', 'spyropress'), 'id' => 'url', 'type' => 'text')))); $this->create_widget(); } function widget($args, $instance) { extract($args); extract($instance); // get view to render if (empty($concepts)) { return; } include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Home_Concept');
/** * Module: Icon List * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Icon_List extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->path = dirname(__FILE__); $this->description = __('List your text with icons.', 'spyropress'); $this->id_base = 'icon_list'; $this->name = __('Icon List', 'spyropress'); // Fields $this->fields = array(array('label' => __('Same Icon for All', 'spyropress'), 'id' => 'same_icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons()), array('label' => __('Style', 'spyropress'), 'id' => 'style', 'type' => 'select', 'options' => array('in' => __('Indent', 'spyropress'), 'list-unstyled' => __('Unindent', 'spyropress')), 'std' => 'in'), array('label' => __('List', 'spyropress'), 'id' => 'list', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7), array('label' => __('Icon', 'spyropress'), 'id' => 'icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons())))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Icon_List');
} $terms = get_the_terms($post_ID, 'designation'); $terms_name = $terms_slug = array(); if (!empty($terms) && !is_wp_error($terms)) { foreach ($terms as $term) { $terms_name[] = $term->name; $terms_slug[] = $term->slug; } } $url = isset($info['link_page']) && !empty($info['link_page']) ? get_permalink($info['link_page']) : '#'; // item tempalte return ' <li class="col-sm-6 col-xs-12 ' . $atts['column_class'] . ' isotope-item ' . join(' ', $terms_slug) . '"> <div class="team-item thumbnail"> <a href="' . $url . '" class="thumb-info team"> ' . $image_tag . ' <span class="thumb-info-title"> <span class="thumb-info-inner">' . get_the_title() . '</span> <span class="thumb-info-type">' . join(', ', $terms_name) . '</span> </span> </a> <span class="thumb-info-caption"> ' . do_shortcode($info['about']) . ' ' . $socials . ' </span> </div> </li>'; } } spyropress_builder_register_module('Spyropress_Module_Staff');
* Display a list of our clients * * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_Our_Clients extends SpyropressBuilderModule { /** * Constructor */ public function __construct() { // Widget variable settings $this->description = __('Display a list of our clients.', 'spyropress'); $this->id_base = 'spyropress_our_clients'; $this->name = __('Our Clients', 'spyropress'); // Fields $this->fields = array(array('id' => 'clients', 'label' => __('Client', 'spyropress'), 'type' => 'repeater', 'fields' => array(array('label' => __('Logo', 'spyropress'), 'id' => 'logo', 'type' => 'upload'), array('label' => __('Link to Client Website', 'spyropress'), 'id' => 'url', 'type' => 'text')))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Our_Clients');
* Module: Heading * Add headings into the page layout wherever needed. * * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_Heading extends SpyropressBuilderModule { public function __construct() { // Widget variable settings $this->cssclass = 'module-heading'; $this->description = __('Add headings into the page layout wherever needed.', 'spyropress'); $this->id_base = 'spyropress_heading'; $this->name = __('Heading', 'spyropress'); // Fields $this->fields = array(array('label' => __('Heading Text', 'spyropress'), 'id' => 'heading', 'type' => 'text'), array('label' => __('HTML Tag', 'spyropress'), 'id' => 'html_tag', 'type' => 'select', 'options' => array(1 => __('H1', 'spyropress'), 2 => __('H2', 'spyropress'), 3 => __('H3', 'spyropress'), 4 => __('H4', 'spyropress'), 5 => __('H5', 'spyropress'), 6 => __('H6', 'spyropress')), 'std' => 2), array('label' => __('Animation', 'spyropress'), 'id' => 'animation', 'type' => 'select', 'options' => spyropress_get_options_animation()), array('label' => __('Styles', 'spyropress'), 'id' => 'styles', 'type' => 'multi_select', 'options' => array('short' => __('Short', 'spyropress'), 'push-top' => __('Push Top', 'spyropress'), 'spaced' => __('Spaced', 'spyropress'), 'more-spaced' => __('More Spaced', 'spyropress')))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Heading');
* Module: Skills * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Skill_Knob extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->path = dirname(__FILE__); $this->description = __('List your skills.', 'spyropress'); $this->id_base = 'spyroress_skills'; $this->name = __('Skills', 'spyropress'); // Fields $this->fields = array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Percentage', 'spyropress'), 'id' => 'percentage', 'type' => 'range_slider'), array('label' => __('Knob Color', 'spyropress'), 'id' => 'knob_color', 'type' => 'colorpicker'), array('label' => __('Delay', 'spyropress'), 'id' => 'delay', 'type' => 'range_slider', 'max' => 4000)); $this->create_widget(); } function widget($args, $instance) { // extracting info $delay = 0; extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Skill_Knob');
</span> <span class="thumb-info-action"> <span title="' . __('Universal', 'spyropress') . '" class="thumb-info-action-icon"><i class="fa fa-link"></i></span> </span> </a> </div> <div id="popupProject' . $post_ID . '" class="popup-inline-content"> <h2>' . get_the_title() . '</h2> <div class="row"> <div class="col-md-6"> ' . $full_image . ' </div> <div class="col-md-6"> <h4>' . $translate['description-title'] . '</h4> ' . get_the_content() . ' ' . $live_url . ' <h4 class="push-top">' . $translate['service-title'] . '</h4> <ul class="list icons list-unstyled"> ' . $services . ' </ul> </div> </div> </div> </div>'; return $item_tmpl; } } spyropress_builder_register_module('Spyropress_Module_Recent_Portfolio_Carousel');
* @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Tabs extends SpyropressBuilderModule { public function __construct() { $this->path = dirname(__FILE__); // Widget variable settings $this->description = __('Tab Builder.', 'spyropress'); $this->id_base = 'tab'; $this->name = __('Tabs', 'spyropress'); // Fields $this->fields = array(array('label' => __('Tab Position', 'spyropress'), 'id' => 'tab_position', 'type' => 'select', 'options' => array('top' => __('Top', 'spyropress'), 'bottom' => __('Bottom', 'spyropress'), 'vertical' => __('Vertical', 'spyropress'))), array('label' => __('Tab Alignment', 'spyropress'), 'id' => 'tab_align', 'type' => 'select', 'options' => array('left' => __('Left', 'spyropress'), 'right' => __('Right', 'spyropress'), 'justified' => __('Justified', 'spyropress'))), array('label' => __('Tab', 'spyropress'), 'id' => 'tabs', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Icon', 'spyropress'), 'id' => 'icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons(), 'desc' => __('See the <a target="_blank" href="http://fontawesome.io/icons/">icons here</a>.', 'spyropress')), array('label' => __('Tab Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); } function widget($args, $instance) { // Defaults $defaults = array('tab_position' => 'top', 'tab_align' => 'left'); // extracting info extract($args); extract(wp_parse_args(spyropress_clean_array($instance), $defaults)); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Tabs'); global $spyropress_tab_counter; $spyropress_tab_counter = 0;
// get view to render include $this->get_view(); } function query($atts, $content = null) { $default = array('post_type' => 'faq', 'limit' => -1, 'columns' => false, 'row' => false, 'pagination' => false, 'callback' => array($this, 'generate_item')); $atts = wp_parse_args($atts, $default); if (!empty($atts['cat'])) { $atts['tax_query']['relation'] = 'OR'; if (!empty($atts['cat'])) { $atts['tax_query'][] = array('taxonomy' => 'faq_category', 'field' => 'slug', 'terms' => $atts['cat']); unset($atts['cat']); } } if ($content) { return token_repalce($content, spyropress_query_generator($atts)); } return spyropress_query_generator($atts); } // Item HTML Generator function generate_item($post_ID, $atts) { return ' <section class="toggle"> <label>' . get_the_title() . '</label> ' . apply_filters('the_content', get_the_content()) . ' </section>'; } } spyropress_builder_register_module('SpyroPress_Module_Faqs');
* Add raw HTML or JavaScript or you can apply Standard WordPress formatting. * * @author SpyroSol * @category BuilderModules * @package Spyropress */ class Spyropress_Module_HTML extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = 'module-html'; $this->description = __('Add raw HTML or JavaScript or you can apply Standard WordPress formatting.', 'spyropress'); $this->idbase = 'spyropress_html'; $this->name = __('HTML', 'spyropress'); // Fields $this->fields = array(array('options' => array('1' => __('Apply Wordpress formatting.', 'spyropress')), 'id' => 'apply', 'type' => 'checkbox'), array('id' => 'html_text', 'type' => 'textarea', 'class' => 'section-full', 'rows' => 15, 'cols' => 230)); $this->create_widget(); } function widget($args, $instance) { // extracting info $apply = false; extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_HTML');
* Module: Accordion * * @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Accordions extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = ''; $this->description = __('Accordion Builder.', 'spyropress'); $this->id_base = 'accordion'; $this->name = __('Accordions', 'spyropress'); // Fields $this->fields = array(array('label' => __('Style', 'spyropress'), 'id' => 'style', 'type' => 'select', 'options' => array('secundary' => 'Secundary')), array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Animation', 'spyropress'), 'id' => 'animation', 'type' => 'select', 'options' => spyropress_get_options_animation()), array('label' => __('Active', 'spyropress'), 'id' => 'is_active', 'type' => 'checkbox', 'options' => array(1 => __('Disable first slide active effect on page load', 'spyropress'))), array('label' => __('Accordion', 'spyropress'), 'id' => 'accordions', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Icon', 'spyropress'), 'id' => 'icon', 'type' => 'select', 'options' => spyropress_get_options_fontawesome_icons(), 'desc' => __('See the <a target="_blank" href="http://fontawesome.io/icons/">icons here</a>.', 'spyropress')), array('label' => __('Accordion Bucket', 'spyropress'), 'id' => 'bucket', 'type' => 'select', 'desc' => __('If you want to use complex html instead of plain text.', 'spyropress'), 'options' => spyropress_get_buckets()), array('label' => __('Content', 'spyropress'), 'id' => 'content', 'type' => 'textarea', 'rows' => 7)))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } global $accordion_ids; spyropress_builder_register_module('Spyropress_Module_Accordions');
* @category BuilderModules * @package Spyropress */ class Spyropress_Module_SideBar extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->cssclass = 'sidebar'; $this->description = __('Place a WordPress Sidebar in to the layout.', 'spyropress'); $this->idbase = 'spyropress_sidebar'; $this->name = __('SideBar', 'spyropress'); global $wp_registered_sidebars; foreach ($wp_registered_sidebars as $key => $sidebar) { $reg_sidebars[$key] = $sidebar['name']; } // Fields $this->fields = array(array('label' => __('Registered Sidebars', 'spyropress'), 'id' => 'sidebar', 'type' => 'select', 'options' => $reg_sidebars)); $this->create_widget(); } public function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_SideBar');
<div class="feature-box-info"> <h4 class="shorter">' . $item['title'] . '</h4> <p class="tall">' . do_shortcode($item['teaser']) . '</p> </div> </div> </div>'; } function generate_box_item($item, $atts) { return ' <div class="col-sm-6 ' . $atts['column_class'] . '"> <div class="featured-box featured-box-' . $item['skin'] . '"> <div class="box-content"> <i class="icon-featured fa ' . icon_comp($item['icon']) . '"></i> <h4>' . $item['title'] . '</h4> <p>' . do_shortcode($item['teaser']) . '</p> </div> </div> </div>'; } function widget($args, $instance) { // extracting info extract($args); extract($instance); // get view to render include $this->get_view($style); } } spyropress_builder_register_module('Spyropress_Module_Feature_List');
* @author SpyroSol * @category SpyropressBuilderModules * @package Spyropress */ class Spyropress_Module_Progress_Bars extends SpyropressBuilderModule { public function __construct() { // Widget variable settings. $this->path = dirname(__FILE__); $this->description = __('Display count as progres bars.', 'spyropress'); $this->id_base = 'spyroress_progress_bars'; $this->name = __('Progress Bars', 'spyropress'); // Fields $this->fields = array(array('label' => __('Bars', 'spyropress'), 'id' => 'bars', 'type' => 'repeater', 'item_title' => 'title', 'fields' => array(array('label' => __('Title', 'spyropress'), 'id' => 'title', 'type' => 'text'), array('label' => __('Counter', 'spyropress'), 'id' => 'count', 'type' => 'text'), array('label' => __('Bar Skin', 'spyropress'), 'id' => 'skin', 'type' => 'select', 'options' => spyropress_get_options_bs_skins(), 'std' => 'primary'), array('label' => __('Delay', 'spyropress'), 'id' => 'delay', 'desc' => __('Animation delay in milliseconds', 'spyropress'), 'type' => 'text'), array('label' => __('Options', 'spyropress'), 'id' => 'extra', 'type' => 'multi_select', 'options' => array('progress-striped' => __('Striped', 'spyropress'), 'active' => __('Animate', 'spyropress')))))); $this->create_widget(); } function widget($args, $instance) { // extracting info extract($args); extract($instance); if (empty($bars)) { return; } // get view to render include $this->get_view(); } } spyropress_builder_register_module('Spyropress_Module_Progress_Bars');