示例#1
0
 public function content($atts, $content = null)
 {
     $title = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'alt_background' => 'none', 'el_class' => '', 'el_position' => '', 'width' => '1/1'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $el_class .= ' wpb_text_column';
     $sidebar_config = get_post_meta(get_the_ID(), 'sf_sidebar_config', true);
     $sidebars = '';
     if ($sidebar_config == "left-sidebar" || $sidebar_config == "right-sidebar") {
         $sidebars = 'one-sidebar';
     } else {
         if ($sidebar_config == "both-sidebars") {
             $sidebars = 'both-sidebars';
         } else {
             $sidebars = 'no-sidebars';
         }
     }
     if ($alt_background == "none" || $sidebars != "no-sidebars") {
         $output .= "\n\t" . '<div class="full-width-text wpb_content_element ' . $width . $el_class . '">';
     } else {
         $output .= "\n\t" . '<div class="full-width-text wpb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
     }
     $output .= "\n\t\t" . '<div class="wpb_wrapper clearfix">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t" . do_shortcode($content);
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 protected function content($atts, $content = null)
 {
     $width = $el_class = $title = $twitter_name = $tweet_count = $el_position = $tweets_count = '';
     wp_enqueue_script('tweet');
     //
     extract(shortcode_atts(array('title' => '', 'twitter_name' => 'twitter', 'tweets_count' => 5, 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= '<div class="wpb_twitter_widget wpb_content_element ' . $width . $el_class . '">';
     if (is_page_template('page-home.php')) {
         $output .= '<h2 class="wpb_heading wpb_teaser_grid_heading">' . $title . '</h2>';
         $output .= '<div class="clearfix"></div>';
         $output .= '<div class="wpb_wrapper border">';
     } else {
         $output .= '<div class="wpb_wrapper">';
     }
     if (!is_page_template('page-home.php')) {
         $output .= $title != '' ? '<h2 class="wpb_heading wpb_twitter_heading">' . $title . '</h2>' : '';
     }
     $output .= '<div class="tweets" data-tw_name="' . $twitter_name . '" data-tw_count="' . $tweets_count . '"></div><p class="twitter_follow_button_wrap"><i class="twitter_follow_button"></i><a href="http://twitter.com/' . $twitter_name . '">' . __("Follow us on twitter", "js_composer") . '</a></p>';
     $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
     if (is_page_template('page-home.php')) {
         $output .= '<div class="double-bg"><div class="left-sdw"></div><div class="right-sdw"></div><div class="repeat-sdw"></div></div>';
     }
     $output .= '</div>' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#3
0
 protected function content($atts, $content = null)
 {
     $title = $address = $size = $zoom = $pin_image = $type = $el_position = $width = $el_class = '';
     extract(shortcode_atts(array('title' => '', 'full_width' => '', 'address' => '', 'size' => 200, 'zoom' => 14, 'pin_image' => '', 'type' => 'm', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     if ($address == '') {
         return null;
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $size = str_replace(array('px', ' '), array('', ''), $size);
     $map_coords = map_embed($address);
     $img_url = wp_get_attachment_image_src($pin_image, 'full');
     if ($full_width == "yes") {
         $output .= "\n\t" . '<div class="wpb_gmaps_widget full-width wpb_content_element ' . $width . $el_class . '">';
     } else {
         $output .= "\n\t" . '<div class="wpb_gmaps_widget wpb_content_element ' . $width . $el_class . '">';
     }
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading wpb_video_heading">' . $title . '</h3>' : '';
     $output .= '<div class="wpb_map_wraper"><div class="map-canvas" style="width:100%;height:' . $size . 'px;" data-address="' . $address . '" data-lat="' . $map_coords['lat'] . '" data-long="' . $map_coords['long'] . '" data-zoom="' . $zoom . '" data-maptype="' . $type . '" data-pinimage="' . $img_url[0] . '"></div></div>';
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_maps;
     $include_maps = true;
     return $output;
 }
 public function content($atts, $content = null)
 {
     $tt_double_border = $tt_border_class = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     if ($this->shortcode == 'vc_column') {
         $el_class .= ' column_container';
         if (is_page_template('page-home.php')) {
             $tt_border_class = ' border';
             $tt_double_border = '<div class="double-bg"><div class="left-sdw"></div><div class="right-sdw"></div><div class="repeat-sdw"></div></div>';
         }
     } else {
         if ($this->shortcode == 'vc_column_text') {
             $el_class .= ' wpb_text_column';
         }
     }
     $output .= '<div class="wpb_content_element tt_border ' . $width . $el_class . '">';
     $output .= '<div class="wpb_wrapper' . $tt_border_class . '">';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
     $output .= $tt_double_border;
     $output .= '</div>' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#5
0
 public function content($atts, $content = null)
 {
     $title = $order = $text_size = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'twitter_username' => '', 'text_size' => 'normal', 'item_count' => '6', 'animation' => 'fade', 'autoplay' => 'yes', 'el_class' => '', 'alt_background' => 'none', 'el_position' => '', 'width' => '1/1'), $atts));
     $output = '';
     if ($autoplay == "yes") {
         $items .= '<div class="flexslider tweets-slider content-slider" data-animation="' . $animation . '" data-autoplay="yes"><ul class="slides">';
     } else {
         $items .= '<div class="flexslider tweets-slider content-slider" data-animation="' . $animation . '" data-autoplay="no"><ul class="slides">';
     }
     $items .= latestTweet($item_count, $twitter_username, true);
     wp_reset_postdata();
     $items .= '</ul></div>';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $el_class .= ' testimonial';
     if ($alt_background == "none") {
         $output .= "\n\t" . '<div class="wpb_tweets_slider_widget wpb_content_element ' . $width . $el_class . '">';
     } else {
         $output .= "\n\t" . '<div class="wpb_tweets_slider_widget wpb_content_element alt-bg ' . $alt_background . ' ' . $width . $el_class . '">';
     }
     $output .= "\n\t\t" . '<div class="wpb_wrapper slider-wrap text-' . $text_size . '">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     global $include_carousel;
     $include_carousel = true;
     return $output;
 }
 public static function at_calltoaction($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Call to action", AT_ADMIN_TEXTDOMAIN), "base" => "at_calltoaction", 'icon' => "im-icon-spinner-4", "class" => "at-calltoaction-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "dropdown", "heading" => __("Action", AT_ADMIN_TEXTDOMAIN), "param_name" => "action", "width" => 200, "value" => array("Search" => "banner_1", "Join" => "banner_2"), "description" => ''), array("type" => "dropdown", "heading" => __("Visibility", AT_ADMIN_TEXTDOMAIN), "param_name" => "visible", "width" => 200, "value" => array("Always visible" => "always", "Visible only for unauthorised visitors" => "guest", "Visible only for members" => "members"), "description" => ''), array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Enter block caption.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Link", AT_ADMIN_TEXTDOMAIN), "param_name" => "url", "value" => "", "description" => __("Internal or external URI.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Button", AT_ADMIN_TEXTDOMAIN), "param_name" => "button", "value" => "", "description" => __("Button caption.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textarea", "heading" => __("Description", AT_ADMIN_TEXTDOMAIN), "param_name" => "description", "value" => "", "description" => __("Please enter few words about action.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
     }
     $shortcode_id = self::_shortcode_id();
     extract(shortcode_atts(array('title' => '', 'url' => '', 'visible' => 'guest', 'description' => '', 'button' => '', 'action' => '', 'el_class' => '', 'width' => '1/1'), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $output = '<div class="main_banner ' . $action . ' ' . $el_class . '">';
     $output .= '<div class="text_wrapper">';
     if (!empty($title)) {
         $output .= '<p class="title">' . $title . '</p>';
     }
     if (!empty($description)) {
         $output .= '<p class="desc">' . $description . '</p>';
     }
     $output .= '</div>';
     if (!empty($url)) {
         $output .= '<a href="' . $url . '" class="btn4">' . $button . '</a>';
     }
     $output .= '</div>';
     // OUTPUT
     if (AT_Common::is_user_logged() == false && $visible == 'guest' || $visible == 'always' || $visible == 'member' && AT_Common::is_user_logged()) {
         return $output;
     }
 }
示例#7
0
 public function content($atts, $content = null)
 {
     $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = $items_nav = $items = '';
     // get all the categories from the database
     $cat_args = array('taxonomy' => 'faqs-category');
     $cats = get_categories($cat_args);
     // FAQ NAVIGATION
     $items_nav .= '<h3>' . __("Browse F.A.Q. Topics", "swiftframework") . '</h3>';
     $items_nav .= '<ul class="faqs-nav clearfix">';
     foreach ($cats as $cat) {
         if (function_exists('icl_object_id')) {
             if ($cat->term_id != icl_object_id($cat->term_id, 'faqs-category', false, ICL_LANGUAGE_CODE)) {
                 return;
             }
         }
         $items_nav .= '<li><a href="#' . $cat->slug . '"><i class="icon-list"></i>' . $cat->name . '<span class="count">' . $cat->count . '</span></a></li>';
     }
     $items_nav .= '</ul>';
     // FAQ LISTINGS
     foreach ($cats as $cat) {
         // setup the category ID
         $cat_id = $cat->term_id;
         if (function_exists('icl_object_id')) {
             if ($cat_id != icl_object_id($cat_id, 'faqs-category', false, ICL_LANGUAGE_CODE)) {
                 return;
             }
         }
         // Make a header for the cateogry
         $items .= '<h3 class="faq-section-title" id="' . $cat->slug . '">' . $cat->name . '</h3>';
         $faqs_args = array('post_type' => 'faqs', 'post_status' => 'publish', 'faqs-category' => $cat->slug, 'posts_per_page' => 100);
         $faqs = new WP_Query($faqs_args);
         $items .= '<ul class="faqs-section clearfix">';
         // PORTFOLIO LOOP
         while ($faqs->have_posts()) {
             $faqs->the_post();
             $faq_title = get_the_title();
             $faq_text = get_the_content_with_formatting();
             $items .= '<li class="faq-item">';
             $items .= '<h6>' . $faq_title . '</h6>';
             $items .= '<div class="faq-text">' . do_shortcode($faq_text) . '</div>';
             $items .= '</li>';
         }
         $items .= '<div class="wpb_divider go_to_top_icon1 wpb_content_element "><a class="animate-top" href="#"><i class="icon-arrow-up"></i></a></div>';
         $items .= '</ul>';
         wp_reset_postdata();
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper faqs-wrap">';
     $output .= "\n\t\t\t" . $items_nav;
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#8
0
 protected function content($atts, $content = null)
 {
     $width = $pb_margin_bottom = $pb_border_bottom = $pb_border_top = $el_class = $output = $search_form = $el_position = '';
     extract(shortcode_atts(array('el_position' => '', 'search_input_text' => '', 'pb_margin_bottom' => 'no', 'pb_border_bottom' => 'no', 'pb_border_top' => 'no', 'width' => '1/1', 'twitter_username' => '', 'el_class' => ''), $atts));
     if ($pb_margin_bottom == "yes") {
         $el_class .= ' pb-margin-bottom';
     }
     if ($pb_border_bottom == "yes") {
         $el_class .= ' pb-border-bottom';
     }
     if ($pb_border_top == "yes") {
         $el_class .= ' pb-border-top';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $search_form .= '<form method="get" class="search-form search-widget" action="' . get_home_url() . '/">';
     $search_form .= '<input type="text" placeholder="' . $search_input_text . '" name="sf-search" />';
     $search_form .= '</form>';
     $output .= "\n\t" . '<div class="wpb_search_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper latest-tweet-bar-wrap clearfix">';
     $output .= "\n\t\t\t" . $search_form;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 public static function at_subscribe($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Subscribe Form", AT_ADMIN_TEXTDOMAIN), "base" => "at_subscribe", 'icon' => "im-icon-spinner-4", "class" => "at-subscribe-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Enter block caption.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Custom subscribe URL (optional)", AT_ADMIN_TEXTDOMAIN), "param_name" => "action", "value" => "", "description" => __("If you wish to use your own newsletter system, please enter custom URL here.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Email field name (optional)", AT_ADMIN_TEXTDOMAIN), "param_name" => "email", "value" => ""), array("type" => "textarea", "heading" => __("Custom FORM fields (optional)", AT_ADMIN_TEXTDOMAIN), "param_name" => "fields", "value" => "", "description" => __("If you wish to use your own newsletter system with custo fields, please enter below. HTML allowed.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
     }
     $shortcode_id = self::_shortcode_id();
     extract(shortcode_atts(array('title' => '', 'email' => 'email', 'fields' => '', 'method' => 'GET', 'action' => '', 'el_class' => '', 'width' => '1/1'), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $output = '<div class="get_news_box ' . $el_class . '">';
     if (!empty($title)) {
         $output .= '<h3>' . $title . '</h3>';
     }
     if (!empty($action)) {
         $action = ' action="' . $action . '"';
     }
     $placeholder = __('Enter your email', AT_TEXTDOMAIN);
     $output .= '<form method="' . $method . '"' . $action . '>';
     $output .= '<input type="text" name="' . $email . '" onblur="if(this.value==\'\') this.value=\'' . $placeholder . '\';" onfocus="if(this.value==\'' . $placeholder . '\') this.value=\'\';" value="' . $placeholder . '" class="txb">';
     if (!empty($fields)) {
         $output .= $fields;
     }
     $output .= '<input type="submit" value="' . __('Subscribe', AT_TEXTDOMAIN) . '" class="btn_subscribe btn4">';
     $output .= '</form>';
     $output .= '</div>';
     return $output;
 }
    public static function at_recent_cars($atts = null, $content = null)
    {
        if ($atts == 'generator') {
            return array("name" => __("Recent Listings", AT_ADMIN_TEXTDOMAIN), "base" => "at_recent_cars", 'icon' => "im-icon-spinner-4", "class" => "at-recent-cars-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Description will appear below each chart.", AT_ADMIN_TEXTDOMAIN), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "range", "heading" => __("Limit", AT_ADMIN_TEXTDOMAIN), "param_name" => "limit", "value" => "12", "min" => "0", "max" => "20", "step" => "1", "unit" => '', "description" => __("Select limit to display on this block", AT_ADMIN_TEXTDOMAIN)), array("type" => "dropdown", "heading" => __("Make", AT_ADMIN_TEXTDOMAIN), "param_name" => "manufacturer_id", "width" => 200, "value" => AT_VC_Helper::get_manufacturers(), "description" => ''), array("type" => "dropdown", "heading" => __("Model", AT_ADMIN_TEXTDOMAIN), "param_name" => "model_id", "width" => 200, "value" => array("Any" => "0"), "description" => ''), array("type" => "dropdown", "heading" => __("Autoplay", AT_ADMIN_TEXTDOMAIN), "param_name" => "autoplay", "width" => 200, "value" => array("Yes" => "true", "No" => "false"), "description" => ''), array("type" => "textfield", "heading" => __("Pause", AT_ADMIN_TEXTDOMAIN), "param_name" => "pause", "value" => "4000", "description" => __("Specify slideshow timeout in ms.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
        }
        $shortcode_id = self::_shortcode_id();
        extract(shortcode_atts(array('title' => '', 'manufacturer_id' => 0, 'model_id' => 0, 'limit' => 12, 'autoplay' => 'false', 'pause' => '4000', 'el_class' => '', 'width' => '1/1'), $atts));
        $width = wpb_translateColumnWidthToSpan($width);
        $car_model = AT_Loader::get_instance()->model('car_model');
        $cars = array();
        $params = array();
        if ($manufacturer_id > 0) {
            $params['manufacturer_id'] = $manufacturer_id;
            if ($model_id == 0) {
                $params['model_id'] = $model_id;
            }
        }
        $cars = $car_model->get_cars($params, $offset = 0, $limit);
        $output = '<div class="recent ' . $el_class . '">
					<h2>' . $title . '</h2>
					<div class="recent_carousel" data-settings=\'{
						"auto": ' . $autoplay . ',
						"pause": ' . $pause . ',
						"slideWidth": 220,
						"minSlides": 1,
						"infiniteLoop": 1,
						"maxSlides": 4,
						"slideMargin": 20,
						"controls" : true,
						"pager" : false,
						"infiniteLoop": true
					}\'>';
        foreach ($cars as $key => $car) {
            if (isset($car['photo']['photo_name']) && file_exists($car['photo']['photo_path'] . '213x164/' . $car['photo']['photo_name'])) {
                $static = $car['photo']['photo_url'] . '213x164/' . $car['photo']['photo_name'];
                $image = '<img src="' . AT_Common::static_url($static) . '" alt="' . $title . '"/>';
            } else {
                if (has_post_thumbnail()) {
                    $image = get_the_post_thumbnail($post_id = get_the_ID(), $size = array(213, 164));
                } else {
                    $image = '<img src="' . AT_Common::site_url(AT_URI_THEME . '/framework/assets/images/pics/noimage-small.jpg') . '" alt="' . $title . '"/>';
                }
            }
            // OLD WAY:
            // <img src="' . AT_Common::static_url( $car['photo']['photo_path'] . '213x164/' . $car['photo']['photo_name'] ) . '" alt="' . $car['options']['_manufacturer_id']['name'] . ' ' . $car['options']['_model_id']['name'] . '"/>
            $cost = AT_Common::show_full_price($value = $car['options']['_price'], $currency = $car['options']['_currency_id']);
            $output .= '<div class="slide">
							<a href="' . get_permalink($car['ID']) . '">
							' . $image . '
								<div class="description">
									Registration ' . $car['options']['_fabrication'] . '<br/>' . (!empty($car['options']['_cilindrics']) ? $car['options']['_cilindrics'] . ' cm³ ' : '') . (!empty($car['options']['_fuel_id']['name']) ? $car['options']['_fuel_id']['name'] . '<br/>' : '') . (!empty($car['options']['_engine_power']) ? $car['options']['_engine_power'] . ' HP<br/>' : '') . (!empty($car['options']['_body_type_id']['name']) ? 'Body ' . $car['options']['_body_type_id']['name'] . '<br/>' : '') . (!empty($car['options']['_mileage']) ? number_format((int) $car['options']['_mileage'], 0, '', ' ') . ' ' . AT_Common::car_mileage(0) : '') . '</div>
								<div class="title">' . $car['options']['_manufacturer_id']['name'] . ' ' . $car['options']['_model_id']['name'] . ' <span class="price">' . $cost . '</span></div>
							</a>
						</div>';
        }
        $output .= '</div>
				</div>';
        return $output;
    }
示例#11
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $tax_terms = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'category' => '', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // CLIENTS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $client_args = array('post_type' => 'clients', 'post_status' => 'publish', 'paged' => $paged, 'clients-category' => $category_slug, 'posts_per_page' => $item_count);
     $clients_items = new WP_Query($client_args);
     $items .= '<ul class="clients-items clearfix">';
     $client_width = 135;
     $client_height = 135;
     // CLIENTS LOOP
     while ($clients_items->have_posts()) {
         $clients_items->the_post();
         $client_image = get_post_thumbnail_id();
         $client_img_url = wp_get_attachment_url($client_image, 'full');
         $client_link_url = get_post_meta($post->ID, 'sf_client_link', true);
         $items .= '<li class="clearfix client-item">';
         $items .= '<figure>';
         $image = aq_resize($client_img_url, $client_width, $client_height, true, false);
         if ($image) {
             if ($client_link_url) {
                 $items .= '<a href="' . $client_link_url . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" /></a>';
             } else {
                 $items .= '<img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" />';
             }
         }
         $items .= '</figure>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($clients_items);
         $items .= '</div>';
     }
     // PAGE BUILDER OUPUT
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_clients_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper clients-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 public static function at_recent_posts($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Recent Posts", AT_ADMIN_TEXTDOMAIN), "base" => "at_recent_posts", 'icon' => "im-icon-spinner-4", "class" => "at-resent-posts-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Description will appear below each chart.", AT_ADMIN_TEXTDOMAIN), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "dropdown", "heading" => __("Post type", AT_ADMIN_TEXTDOMAIN), "param_name" => "post_type", "width" => 200, "value" => array("Posts" => "post", "News" => "news", "Reviews" => "reviews"), "description" => ''), array("type" => "range", "heading" => __("Limit", AT_ADMIN_TEXTDOMAIN), "param_name" => "limit", "default" => 12, "min" => 0, "max" => 20, "step" => 1, "unit" => '', "description" => __("Select limit to display on this block", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Description length", AT_ADMIN_TEXTDOMAIN), "param_name" => "trim", "value" => "80", "description" => __("Enter truncated content length in symbols.", AT_ADMIN_TEXTDOMAIN)), array("type" => "range", "heading" => __("View post", AT_ADMIN_TEXTDOMAIN), "param_name" => "view_post", "default" => "3", "min" => "0", "max" => "4", "step" => "1", "unit" => '', "description" => __("Select limit to display on one row", AT_ADMIN_TEXTDOMAIN)), array('heading' => __("Hide <small>(optional)</small>", AT_ADMIN_TEXTDOMAIN), 'description' => __("You may hide away some screen items.", AT_ADMIN_TEXTDOMAIN), 'param_name' => "disable", 'value' => array(__("Date", AT_ADMIN_TEXTDOMAIN) => "date", __("Featured image", AT_ADMIN_TEXTDOMAIN) => "featured", __("Teaser", AT_ADMIN_TEXTDOMAIN) => "excerpt"), 'type' => 'checkbox'), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
     }
     $shortcode_id = self::_shortcode_id();
     $view_post = 0;
     extract(shortcode_atts(array('title' => '', 'limit' => '3', 'trim' => 80, 'view_post' => '3', 'disable' => '', 'el_class' => '', 'width' => '1/1', 'post_type' => 'post'), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $cwidth = (100 - 2.5 * ($view_post - 1)) / $view_post;
     $query = array('post_type' => $post_type, 'showposts' => $limit, 'nopaging' => false, 'ignore_sticky_posts' => 1);
     $results = new WP_Query();
     $results->query($query);
     $output = '<div class="recent_blog ">';
     $output .= '<h2>' . $title . '</h2>';
     $view_post = (int) $view_post;
     if ($results->have_posts()) {
         $c = 0;
         while ($results->have_posts()) {
             $c++;
             $class = "post_block";
             $results->the_post();
             $margin = 2.5;
             if ($c === $view_post) {
                 $class .= ' last';
                 $margin = 0;
             }
             $output .= '<div class="' . $class . '" style="max-width: ' . $cwidth . '%; margin-right: ' . $margin . '%;">';
             // Show featured image
             if (has_post_thumbnail() && strpos($disable, 'featured') === false) {
                 // $car_model = AT_Loader::get_instance()->model('car_model');
                 // $cars = array();
                 // <a title="' . $title . '" href="' . get_permalink( $car['ID'] ) . '"><img src="' . AT_Common::static_url( $car['photo']['photo_path'] . 'original/' . $car['photo']['photo_name'] ) . '" alt="' . $title . '"/></a>
                 $output .= '<a class="thumb" href="' . get_permalink() . '">' . get_the_post_thumbnail($post_id = get_the_ID(), $size = array(180, 180));
                 if (get_post_meta(get_the_ID(), '_featured_video', true)) {
                     $output .= '<i class="icon-youtube-play has_video"></i>';
                 }
                 $output .= '</a>';
             }
             $output .= '<h5><a href="' . get_permalink() . '">' . strtoupper(get_the_title()) . '</a></h5>';
             // Show date
             if (strpos($disable, 'date') === false) {
                 $output .= '<div class="date">' . get_the_date() . '</div>';
             }
             // Show teaser
             if (strpos($disable, 'excerpt') === false) {
                 $output .= '<div class="post"><p>' . AT_Common::truncate($content = get_the_excerpt(), $limit = $trim) . '</p></div>';
             }
             $output .= '</div>';
             if ($c === $view_post) {
                 $output .= '<div class="clear"></div>';
                 $c = 0;
             }
         }
     }
     $output .= '<div class="clear"></div></div>';
     return $output;
 }
示例#13
0
 protected function content($atts, $content = null)
 {
     $title = $width = $el_class = $output = $filter = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', "item_count" => '12', "category" => '', 'pagination' => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $team_args = array('post_type' => 'team', 'post_status' => 'publish', 'paged' => $paged, 'team-category' => $category_slug, 'posts_per_page' => $item_count, 'ignore_sticky_posts' => 1);
     $team_members = new WP_Query($team_args);
     $count = 0;
     $items .= '<ul class="team-members clearfix">';
     while ($team_members->have_posts()) {
         $team_members->the_post();
         $member_name = get_the_title();
         $member_position = get_post_meta($post->ID, 'sf_team_member_position', true);
         $member_image = get_post_thumbnail_id();
         $member_page_link = get_permalink();
         $items .= '<li data-id="id-' . $count . '" class="clearfix team-member four columns">';
         $img_url = wp_get_attachment_url($member_image, 'full');
         $image = aq_resize($img_url, 220, 298, true, false);
         $items .= '<figure>';
         if ($image) {
             $items .= '<a href="' . $member_page_link . '"><img src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" /></a>';
         }
         $items .= '</figure>';
         $items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
         $items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
         $items .= '<a class="read-more" href="' . $member_page_link . '">' . __("Find out more", "swiftframework") . '<i class="icon-chevron-right"></i></a>';
         $items .= '</li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap full-width">';
         $items .= pagenavi($team_members);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="team_list_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading">' . $title . '</h3>' : '';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#14
0
 public function content($atts, $content = null)
 {
     $title = $job_text = $order = $view_all_link = $output = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'job_text' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'view_all_link' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // JOBS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $jobs_args = array('orderby' => $order, 'post_type' => 'jobs', 'post_status' => 'publish', 'paged' => $paged, 'jobs-category' => $category_slug, 'posts_per_page' => $item_count);
     $jobs = new WP_Query($jobs_args);
     $count = 0;
     $items .= '<ul class="jobs-overview clearfix">';
     // PORTFOLIO LOOP
     while ($jobs->have_posts()) {
         $jobs->the_post();
         $job_title = get_the_title();
         $job_permalink = get_permalink();
         $items .= '<li class="job"><a href="' . $job_permalink . '">' . $job_title . '</a></li>';
         $count++;
     }
     wp_reset_postdata();
     $items .= '</ul>';
     if ($view_all_link == "yes") {
         $options = get_option('sf_flexform_options');
         $jobs_page = __($options['jobs_page'], 'swiftframework');
         if ($jobs_page) {
             $jobs_page_title = get_page_by_path($jobs_page);
             if (isset($jobs_page_title)) {
                 $jobs_page_id = $jobs_page_title->ID;
             }
         }
         if ($jobs_page && isset($jobs_page_title)) {
             $items .= '<a href="' . get_permalink($jobs_page_id) . '" class="read-more">' . __("View all vacancies", "swiftframework") . ' [' . $current_jobs . ']<i class="icon-angle-right"></i></a>';
         }
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
     $output .= "\n\t\t\t" . "<p>" . $job_text . "</p>";
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 protected function content($atts, $content = null)
 {
     extract(shortcode_atts(array('width' => '1/2', 'el_position' => '', 'foo' => '', 'my_dropdown' => ''), $atts));
     $width_class = wpb_translateColumnWidthToSpan($width);
     // Determine width for our div holder
     $output = '<div class="' . $width_class . '">';
     $output .= '<h3>' . $foo . '</h3>';
     $output .= wpb_js_remove_wpautop($content);
     $output .= '<p> Dropdown: ' . $my_dropdown . '</p>';
     $output .= '</div>';
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#16
0
 public function content($atts, $content = null)
 {
     $title = $order = $items = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'item_count' => '-1', 'order' => '', 'category' => '', 'pagination' => 'no', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     // JOBS QUERY SETUP
     global $post, $wp_query;
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     $jobs_args = array('orderby' => $order, 'post_type' => 'jobs', 'post_status' => 'publish', 'paged' => $paged, 'jobs-category' => $category_slug, 'posts_per_page' => $item_count);
     $jobs = new WP_Query($jobs_args);
     $items .= '<ul class="jobs clearfix">';
     // PORTFOLIO LOOP
     while ($jobs->have_posts()) {
         $jobs->the_post();
         $job_title = get_the_title();
         $job_text = get_the_content();
         $items .= '<li class="job">';
         $items .= '<h3>' . $job_title . '</h3>';
         $items .= '<div class="job-text">' . do_shortcode($job_text) . '</div>';
         $items .= '</li>';
     }
     wp_reset_postdata();
     $items .= '</ul>';
     // PAGINATION
     if ($pagination == "yes") {
         $items .= '<div class="pagination-wrap">';
         $items .= pagenavi($jobs);
         $items .= '</div>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper jobs-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h3></div>' : '';
     $output .= "\n\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#17
0
 protected function content($atts, $content = null)
 {
     $width = $el_class = $output = $items = $el_position = '';
     extract(shortcode_atts(array("item_count" => '12', "revslider_shortcode" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $items .= '[rev_slider ' . $revslider_shortcode . ']';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_showcase_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper showcase-wrap">';
     $output .= "\n\t\t\t\t" . do_shortcode($items);
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#18
0
 public function content($atts, $content = null)
 {
     $title = $output = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $sitemap = '[coope_sitemap]';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper sitemap-wrap">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t" . do_shortcode($sitemap);
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
    public static function at_slider_posts($atts = null, $content = null)
    {
        if ($atts == 'generator') {
            return array("name" => __("Slider: Posts", AT_ADMIN_TEXTDOMAIN), "base" => "at_slider_posts", 'icon' => "im-icon-spinner-4", "class" => "at-auto-gallery-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "range", "heading" => __("Limit", AT_ADMIN_TEXTDOMAIN), "param_name" => "limit", "value" => "5", "min" => "0", "max" => "12", "step" => "1", "unit" => '', "description" => __("Select limit to display on this block", AT_ADMIN_TEXTDOMAIN)), array("type" => "dropdown", "heading" => __("Post type", AT_ADMIN_TEXTDOMAIN), "param_name" => "post_type", "width" => 200, "value" => array("Posts" => "post", "News" => "news", "Reviews" => "reviews"), "description" => ''), array("type" => "dropdown", "heading" => __("Autoplay", AT_ADMIN_TEXTDOMAIN), "param_name" => "autoplay", "width" => 200, "value" => array("Yes" => "true", "No" => "false"), "description" => ''), array("type" => "textfield", "heading" => __("Pause", AT_ADMIN_TEXTDOMAIN), "param_name" => "pause", "value" => "4000", "description" => __("Specify slideshow timeout in ms.", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
        }
        $shortcode_id = self::_shortcode_id();
        extract(shortcode_atts(array('limit' => 5, 'post_type' => 'post', 'autoplay' => 'false', 'pause' => '4000', 'el_class' => '', 'width' => '1/1'), $atts));
        $width = wpb_translateColumnWidthToSpan($width);
        $query = array('post_type' => $post_type, 'showposts' => $limit, 'nopaging' => false, 'ignore_sticky_posts' => 1);
        $results = new WP_Query();
        $results->query($query);
        if ($results->have_posts()) {
            $output = '<div class="home_slider ' . $el_class . '">
							<div class="slider slider_1" data-settings=\'{
								"auto": ' . $autoplay . ',
								"slideWidth": 940,
								"pause": ' . $pause . ',
								"minSlides": 1,
								"infiniteLoop" : "true",
								"maxSlides": 1,
								"slideMargin": 0,
								"controls" : false}\'>';
            while ($results->have_posts()) {
                $results->the_post();
                $title = get_the_title();
                if (has_post_thumbnail()) {
                    $image = get_the_post_thumbnail($post_id = get_the_ID(), $size = array(640, 428));
                } else {
                    $image = '<img src="' . AT_Common::site_url(AT_URI_THEME . '/framework/assets/images/pics/noimage-large.jpg') . '" alt="' . $title . '"/>';
                }
                $output .= '<div class="slide" data-onclick="location.href=' . get_permalink(get_the_ID()) . '">
							<a title="' . $title . '" href="' . get_permalink(get_the_ID()) . '">' . $image . '</a>
							<div class="description">
								<a title="' . $title . '" href="' . get_permalink(get_the_ID()) . '"><h2 class="title">' . $title . '</h2></a>
								<p class="desc">' . AT_Common::truncate($content = get_the_excerpt(), $limit = 80) . '</p>
							</div>
						</div>';
            }
            $output .= '</div>
				</div>';
        } else {
            $output = '<div class="home_slider ' . $el_class . '">' . __("Please add more posts.", AT_TEXTDOMAIN) . '</div>';
        }
        return $output;
    }
 public static function at_recent_dealers($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Recent Dealers", AT_ADMIN_TEXTDOMAIN), "base" => "at_recent_dealers", 'icon' => "im-icon-spinner-4", "class" => "at-resent-posts-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Enter custom title.", AT_ADMIN_TEXTDOMAIN), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "range", "heading" => __("Limit", AT_ADMIN_TEXTDOMAIN), "param_name" => "limit", "value" => "12", "min" => "0", "max" => "20", "step" => "1", "unit" => '', "description" => __("Select limit to display on this block", AT_ADMIN_TEXTDOMAIN)), array("type" => "dropdown", "heading" => __("Carousel", AT_ADMIN_TEXTDOMAIN), "param_name" => "carousel", "width" => 'carousel', "value" => array("Use carousel" => "carousel", "Static" => "static"), "description" => ''), array("type" => "range", "heading" => __("View post", AT_ADMIN_TEXTDOMAIN), "param_name" => "spans", "value" => "4", "min" => "0", "max" => "6", "step" => "1", "unit" => '', "description" => __("Select limit to display on one row", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
     }
     $shortcode_id = self::_shortcode_id();
     extract(shortcode_atts(array('title' => '', 'limit' => 3, 'trim' => 80, 'spans' => 4, 'disable' => '', 'carousel' => 'carousel', 'el_class' => '', 'width' => '1/1', 'post_type' => 'post'), $atts));
     $style = '';
     if ($carousel == 'static') {
         $style .= ' style="';
         $style .= 'max-width:' . 100 / $spans . '%';
         $style .= '"';
     }
     $width = wpb_translateColumnWidthToSpan($width);
     $dealers = AT_Loader::get_instance()->model('user_model');
     $results = $dealers->get_dealers(0, $limit);
     $total = $dealers->get_dealers_count();
     $output = '';
     if (count($results > 0)) {
         $c = 0;
         $class = "dealer-wrapper";
         $output .= '<div class="' . $class . '">';
         // $output .= '<a href="#" class="all">Show all...</a>';
         $output .= '<div class="results"><span>' . sprintf(__('Total %s dealers', AT_TEXTDOMAIN), $total) . '</span></div>';
         $output .= '<div class="clear"></div>';
         $output .= '<div class="tabs_' . $carousel . '">';
         foreach ($results as $dealer) {
             $c++;
             $url = AT_Common::site_url('dealer/info/' . trim($dealer['alias'] . '-' . $dealer['id'], '-') . '/');
             if (!file_exists($dealer['photo']['photo_path'] . '138x138/' . $dealer['photo']['photo_name'])) {
                 $photo = AT_URI . '/assets/images/default-dealer-small.jpg';
             } else {
                 $photo = $dealer['photo']['photo_url'] . '138x138/' . $dealer['photo']['photo_name'];
             }
             $output .= '<div class="slide"' . $style . '>';
             $output .= '<a class="thumb img" href="' . $url . '"><img src="' . $photo . '" /></a>';
             $output .= '<a class="title" href="' . $url . '">' . $dealer['name'] . '</a>';
             $output .= '</div>';
         }
         $output .= '</div>';
         $output .= '</div>';
     }
     $output .= '<div class="clear"></div>';
     return $output;
 }
 public function content($atts, $content = null)
 {
     $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('el_class' => '', 'el_position' => '', 'width' => '1/2'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $el_class .= ' wpb_raw_html';
     $content = base64_decode(strip_tags($content));
     $output .= '<div class="wpb_content_element ' . $width . $el_class . '">';
     $output .= '<div class="wpb_wrapper">';
     $output .= $content;
     $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
     $output .= '</div>' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#22
0
 protected function content($atts, $content = null)
 {
     $width = $el_class = $title = $twitter_name = $tweet_count = $el_position = $tweets_count = '';
     wp_enqueue_script('tweet');
     //
     extract(shortcode_atts(array('title' => '', 'twitter_name' => 'twitter', 'tweets_count' => 5, 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_twitter_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading wpb_twitter_heading"><span>' . $title . '</span></h3>' : '';
     $output .= "\n\t\t\t" . '<div class="tweets" data-tw_name="' . $twitter_name . '" data-tw_count="' . $tweets_count . '"></div> <p class="twitter_follow_button_wrap"><a class="twitter_follow_button" href="http://twitter.com/' . $twitter_name . '">' . __("Follow us on twitter", "js_composer") . '</a></p>';
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#23
0
 protected function content($atts, $content = null)
 {
     $title = $pin_image = $el_position = $width = $el_class = '';
     extract(shortcode_atts(array('title' => '', 'bg_image' => '', 'bg_type' => '', 'alt_background' => 'none', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $img_url = wp_get_attachment_image_src($bg_image, 'full');
     $output .= "\n\t" . '<div class="spb_parallax_asset sf-parallax spb_content_element bg-type-' . $bg_type . ' ' . $width . $el_class . ' alt-bg ' . $alt_background . '" style="background-image: url(' . $img_url[0] . ');">';
     $output .= "\n\t\t" . '<div class="spb_content_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_text_heading"><span>' . $title . '</span></h4></div>' : '';
     $output .= "\n\t\t\t" . do_shortcode($content);
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.spb_content_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     //        global $include_parallax;
     //        $include_parallax = true;
     return $output;
 }
示例#24
0
        public static function im_skill_meter_chart($atts = null, $content = null)
        {
            if ($atts == 'generator') {
                return array("name" => __("Diagram Bar", "js_composer"), "base" => "im_skill_meter_chart", 'icon' => "im-icon-pie-3", "class" => "im-skill-meter-chart-class", 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "im_textfield", "heading" => __("Heading Title", "js_composer"), "param_name" => "title", "value" => "", "margin_bottom" => 40, "description" => __("Type here Caption for this chart", "js_composer")), array("type" => "range", "heading" => __("Skill 1 : Percent", "js_composer"), "param_name" => "percent_1", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 1 : Arch Color", "js_composer"), "param_name" => "color_1", "value" => "#e74c3c", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 1 : Name", "js_composer"), "param_name" => "name_1", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 2 : Percent", "js_composer"), "param_name" => "percent_2", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 2 : Arch Color", "js_composer"), "param_name" => "color_2", "value" => "#8c6645", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 2 : Name", "js_composer"), "param_name" => "name_2", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 3 : Percent", "js_composer"), "param_name" => "percent_3", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 3 : Arch Color", "js_composer"), "param_name" => "color_3", "value" => "#265573", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 3 : Name", "js_composer"), "param_name" => "name_3", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 4 : Percent", "js_composer"), "param_name" => "percent_4", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 4 : Arch Color", "js_composer"), "param_name" => "color_4", "value" => "#008b83", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 4 : Name", "js_composer"), "param_name" => "name_4", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 5 : Percent", "js_composer"), "param_name" => "percent_5", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 5 : Arch Color", "js_composer"), "param_name" => "color_5", "value" => "#d96b52", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 5 : Name", "js_composer"), "param_name" => "name_5", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 6 : Percent", "js_composer"), "param_name" => "percent_6", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 6 : Arch Color", "js_composer"), "param_name" => "color_6", "value" => "#82bf56", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 6 : Name", "js_composer"), "param_name" => "name_6", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "range", "heading" => __("Skill 7 : Percent", "js_composer"), "param_name" => "percent_7", "value" => "0", "min" => "0", "max" => "100", "step" => "1", "unit" => '%', "description" => __("Please evaluate your skill in percent", "js_composer")), array("type" => "im_color", "heading" => __("Skill 7 : Arch Color", "js_composer"), "param_name" => "color_7", "value" => "#4ecdc4", "format" => "rgba", "description" => __("Select color for this skill", "js_composer")), array("type" => "im_textfield", "heading" => __("Skill 7 : Name", "js_composer"), "param_name" => "name_7", "value" => "", "margin_bottom" => 40, "description" => __("Which skill are you demonstrating. eg : HTML, Design, CSS,...", "js_composer")), array("type" => "im_textfield", "heading" => __("Default Text", "js_composer"), "param_name" => "default_text", "value" => "Skill", "description" => __("Type here text that will be displayed when not one skill not be selected.", "js_composer")), array("type" => "im_color", "heading" => __("Center Circle Background Color", "js_composer"), "param_name" => "center_color", "value" => "#1e3641", "format" => "rgba", "description" => __("Select color for center circle background", "js_composer")), array("type" => "im_color", "heading" => __("Default Text Color", "js_composer"), "param_name" => "default_text_color", "value" => "#fff", "format" => "rgba", "description" => __("Select color for text", "js_composer")), array("type" => "dropdown", "heading" => __("Viewport Animation", "js_composer"), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", "js_composer")), array("type" => "im_textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "js_composer"))));
            }
            extract(shortcode_atts(array('title' => '', 'percent_1' => false, 'name_1' => false, 'color_1' => false, 'percent_2' => false, 'name_2' => false, 'color_2' => false, 'percent_3' => false, 'name_3' => false, 'color_3' => false, 'percent_4' => false, 'name_4' => false, 'color_4' => false, 'percent_5' => false, 'color_5' => false, 'name_5' => false, 'percent_6' => false, 'name_6' => false, 'color_6' => false, 'percent_7' => false, 'name_7' => false, 'color_7' => false, 'center_color' => '', 'default_text' => '', 'default_text_color' => '#fff', 'width' => '1/1', 'el_position' => '', 'animation' => '', 'el_class' => ''), $atts));
            $width = wpb_translateColumnWidthToSpan($width);
            $el_position_css = $output = $animation_css = '';
            if ($el_position != '') {
                $el_position_css = $el_position . '-column';
            }
            $id = mt_rand(99, 999);
            $shortcode_id = self::_shortcode_id();
            if ($shortcode_id == 1) {
                wp_enqueue_script('jquery-raphael');
                wp_enqueue_style(MISS_PREFIX . '-jsc-skill-meter-chart', IRISHFRAMEWORK_JS_COMPOSER_URI . '/css/im_charts.css');
                wp_enqueue_script(MISS_PREFIX . '-jsc-raphael', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/jquery.raphael.min.js', array('jquery'), THEME_VERSION, true);
                wp_enqueue_script(MISS_PREFIX . '-jsc-raphael-init', IRISHFRAMEWORK_JS_COMPOSER_URI . '/js/jquery.raphael.init.js', array('jquery'), THEME_VERSION, true);
                // wp_enqueue_script( MISS_PREFIX . '-jsc-charts', IRISHFRAMEWORK_JS_COMPOSER_URI .'/js/im_charts.js', array('jquery'), THEME_VERSION, true );
            }
            if ($animation != '') {
                $animation_css = ' im-animate-element ' . $animation . ' ';
            }
            $output .= '<div class="raphael-chart ' . $el_position_css . '"><div class="im-skill-chart im-shortcode ' . $animation_css . $el_class . '">';
            $f = 0;
            for ($i = 1; $i <= 7; $i++) {
                if (!empty(${'name_' . $i}) && ${'percent_' . $i} != 0) {
                    $f++;
                    $output .= '<div class="im-meter-arch">
                               <input type="hidden" class="name" value="' . ${'name_' . $i} . '" />
                               <input type="hidden" class="percent" value="' . ${'percent_' . $i} . '" />
                               <input type="hidden" class="color" value="' . ${'color_' . $i} . '" />
                           </div>';
                }
            }
            $diag_dimension = $f * 56 + 190;
            $output .= '<div id="im_skill_diagram" class="im_skill_diagram im_skill_diagram_' . $shortcode_id . '" data-dimension="' . $diag_dimension . '" data-circle-color="' . $center_color . '" data-default-text-color="' . $default_text_color . '" data-default-text="' . $default_text . '"></div></div></div>



        ';
            return $output;
        }
示例#25
0
 protected function content($atts, $content = null)
 {
     wp_enqueue_script('jquery-ui-accordion');
     $widget_title = $type = $active_section = $interval = $width = $el_position = $el_class = '';
     //
     extract(shortcode_atts(array('widget_title' => '', 'interval' => 0, 'active_section' => '', 'width' => '1/1', 'el_position' => '', 'el_class' => ''), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_accordion wpb_content_element ' . $width . $el_class . ' not-column-inherit" data-active="' . $active_section . '">';
     //data-interval="'.$interval.'"
     $output .= $widget_title != '' ? "\n\t\t\t" . '<h3 class="wpb_heading wpb_accordion_heading"><span>' . $widget_title . '</span></h3>' : '';
     $output .= "\n\t\t" . '<div class="wpb_wrapper wpb_accordion_wrapper ">';
     $output .= "\n\t\t\t" . wpb_js_remove_wpautop($content);
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#26
0
 public function content($atts, $content = null)
 {
     $title = $pb_margin_bottom = $el_class = $width = $el_position = '';
     extract(shortcode_atts(array('title' => '', 'pb_margin_bottom' => '', 'el_class' => '', 'el_position' => '', 'width' => '1'), $atts));
     $output = '';
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     if ($pb_margin_bottom == "yes") {
         $el_class .= ' pb-margin-bottom';
     }
     $output .= "\n\t" . '<div class="wpb_codesnippet_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper">';
     $output .= $title != '' ? "\n\t\t\t" . '<div class="heading-wrap"><h3 class="wpb_heading wpb_codesnippet_heading">' . $title . '</h3></div>' : '';
     $output .= "\n\t\t\t<code>" . wpb_js_remove_wpautop($content) . "</code>";
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     //
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
 protected function content($atts, $content = null)
 {
     $title = $link = $size = $zoom = $type = $el_position = $width = $el_class = '';
     extract(shortcode_atts(array('title' => '', 'link' => '', 'size' => 200, 'zoom' => 14, 'type' => 'm', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     $output = '';
     if ($link == '') {
         return null;
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $size = str_replace(array('px', ' '), array('', ''), $size);
     $output .= '<div class="wpb_gmaps_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= '<div class="wpb_wrapper">';
     $output .= $title != '' ? '<h2 class="wpb_heading wpb_video_heading">' . $title . '</h2>' : '';
     $output .= '<div class="wpb_map_wraper"><iframe width="100%" height="' . $size . '" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="' . $link . '&amp;t=' . $type . '&amp;z=' . $zoom . '&amp;output=embed"></iframe></div>';
     $output .= '</div>' . $this->endBlockComment('.wpb_wrapper');
     $output .= '</div>' . $this->endBlockComment($width);
     $output = $this->startRow($el_position) . $output . $this->endRow($el_position);
     return $output;
 }
示例#28
0
 public static function im_steps($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Steps Builder", "js_composer"), "base" => "im_steps", "class" => "im-steps-class", 'icon' => "im-icon-arrow-right-6", 'category' => __('Theme Short-Codes', MISS_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", "js_composer"), "param_name" => "title", "value" => "", "description" => __("Type here caption for this scheme", "js_composer")), array("type" => "range", "heading" => __("How Many Steps?", "js_composer"), "param_name" => "step", "value" => "2", "min" => "2", "max" => "5", "step" => "1", "unit" => 'step', "description" => __("How many steps do you want to have?", "js_composer")), array("type" => "colorpicker", "heading" => __("Container Hover Fill Color", "js_composer"), "param_name" => "hover_color", "value" => "#202020", "description" => __("Select container color when mouse over", "js_composer")), array("type" => "im_icon", "heading" => __("Step 1 : Icon", "js_composer"), "param_name" => "icon_1", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer")), array("type" => "textfield", "heading" => __("Step 1 : Title", "js_composer"), "param_name" => "title_1", "value" => "", "description" => __("Type here caption for this step", "js_composer")), array("type" => "textarea", "heading" => __("Step 1 : Description", "js_composer"), "param_name" => "desc_1", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer")), array("type" => "im_icon", "heading" => __("Step 2 : Icon", "js_composer"), "param_name" => "icon_2", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer")), array("type" => "textfield", "heading" => __("Step 2 : Title", "js_composer"), "param_name" => "title_2", "value" => "", "description" => __("Type here caption for this step", "js_composer")), array("type" => "textarea_html", "heading" => __("Step 2 : Description", "js_composer"), "param_name" => "desc_2", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer")), array("type" => "im_icon", "heading" => __("Step 3 : Icon", "js_composer"), "param_name" => "icon_3", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "textfield", "heading" => __("Step 3 : Title", "js_composer"), "param_name" => "title_3", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "textarea_html", "heading" => __("Step 3 : Description", "js_composer"), "param_name" => "desc_3", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(3, 5)))), array("type" => "im_icon", "heading" => __("Step 4 : Icon", "js_composer"), "param_name" => "icon_4", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "textfield", "heading" => __("Step 4 : Title", "js_composer"), "param_name" => "title_4", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "textarea_html", "heading" => __("Step 4 : Description", "js_composer"), "param_name" => "desc_4", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => miss_array_int_to_sting(range(4, 5)))), array("type" => "im_icon", "heading" => __("Step 5 : Icon", "js_composer"), "param_name" => "icon_5", "width" => 200, "value" => array_flip(miss_get_all_font_icons()), "encoding" => "false", "description" => __("Select icon for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), array("type" => "textfield", "heading" => __("Step 5 : Title", "js_composer"), "param_name" => "title_5", "value" => "", "description" => __("Type here caption for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), array("type" => "textarea_html", "heading" => __("Step 5 : Description", "js_composer"), "param_name" => "desc_5", 'margin_bottom' => 40, "value" => "", "description" => __("Type here description for this step", "js_composer"), 'dependency' => array('element' => 'step', 'value' => array('5'))), array("type" => "dropdown", "heading" => __("Viewport Animation", "js_composer"), "param_name" => "animation", "value" => miss_js_composer_css_animation(), "description" => __("Viewport animation will be triggered when this element is being viewed when you scroll page down. you only need to choose the animation style from this option. please note that this only works in moderns. We have disabled this feature in touch devices to increase browsing speed.", "js_composer")), array("type" => "textfield", "heading" => __("Extra class name", "js_composer"), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", "js_composer"))));
     }
     $shortcode_id = self::_shortcode_id();
     if ($shortcode_id == 1) {
         wp_enqueue_style(MISS_PREFIX . '-jsc-steps', IRISHFRAMEWORK_JS_COMPOSER_URI . '/css/im_steps.css');
         // wp_enqueue_script( MISS_PREFIX . '-jsc-steps', IRISHFRAMEWORK_JS_COMPOSER_URI .'/js/im_steps.js', array('jquery'), THEME_VERSION, false );
     }
     extract(shortcode_atts(array('title' => '', 'step' => 4, 'hover_color' => '#202020', 'icon_1' => '', 'title_1' => '', 'desc_1' => '', 'icon_2' => '', 'title_2' => '', 'desc_2' => '', 'icon_3' => '', 'title_3' => '', 'desc_3' => '', 'icon_4' => '', 'title_4' => '', 'desc_4' => '', 'icon_5' => '', 'title_5' => '', 'desc_5' => '', 'el_class' => '', 'width' => '1/1', 'animation' => '', 'el_position' => ''), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $el_position_css = $animation_css = $output = '';
     if ($el_position != '') {
         $el_position_css = $el_position . '-column';
     }
     // $id = mt_rand( 99, 999 );
     if ($animation != '') {
         $animation_css = ' im-animate-element ' . $animation . ' ';
     }
     $output .= '<div class="' . $width . ' ' . $el_position_css . '">';
     $output .= '<div id="im-process-' . $shortcode_id . '" class="im-process-steps im-shortcode process-steps-' . $step . ' ' . $el_class . '">';
     if (!empty($title)) {
         $output .= '<h3 class="im-shortcode im-fancy-title pattern-style im-shortcode-heading" style="text-align:left;"><span>' . $title . '</span></h3>';
     }
     $output .= '<ul>' . "\n";
     for ($i = 1; $i <= $step; $i++) {
         $output .= '<li>
                 <span class="im-process-icon' . $animation_css . '"><i class="' . ${'icon_' . $i} . '"></i></span>
                 <div class="im-process-detail">
                 <h3>' . ${'title_' . $i} . '</h3>
                 <p>' . ${'desc_' . $i} . '</p>
                 </div>
             </li>' . "\n";
     }
     $output .= '<div class="clearboth"></div></ul></div></div>' . "\n";
     $output .= '<style type="text/css">
             #im-process-' . $shortcode_id . ' ul li:hover .im-process-icon {background-color:' . $hover_color . ';}
           </style>';
     return $output;
 }
 public static function at_auto_news($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Auto news vertical column", AT_ADMIN_TEXTDOMAIN), "base" => "at_auto_news", 'icon' => "im-icon-spinner-4", "class" => "at-auto-news-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Description will appear below each chart.", AT_ADMIN_TEXTDOMAIN), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "range", "heading" => __("Limit", AT_ADMIN_TEXTDOMAIN), "param_name" => "limit", "value" => "2", "min" => "0", "max" => "20", "step" => "1", "unit" => '', "description" => __("Select limit to display on this block", AT_ADMIN_TEXTDOMAIN)), array("type" => "textfield", "heading" => __("Extra class name", AT_ADMIN_TEXTDOMAIN), "param_name" => "el_class", "value" => "", "description" => __("If you wish to style particular content element differently, then use this field to add a class name and then refer to it in Custom CSS Shortcode or Masterkey Custom CSS option.", AT_ADMIN_TEXTDOMAIN))));
     }
     $shortcode_id = self::_shortcode_id();
     extract(shortcode_atts(array('title' => '', 'limit' => 2, 'el_class' => '', 'width' => '1/1'), $atts));
     $width = wpb_translateColumnWidthToSpan($width);
     $query = array('post_type' => 'news', 'posts_per_page' => $limit, 'nopaging' => 0, 'ignore_sticky_posts' => 1);
     $results = new WP_Query();
     $results->query($query);
     $output = '<div class="news_wrapper ">';
     $output = '<div class="news ">';
     $output .= '<h2>' . $title . '</h2>';
     if ($results->have_posts()) {
         $c = 0;
         while ($results->have_posts()) {
             $c++;
             $class = "news_box";
             $results->the_post();
             $output .= '<div class="' . $class . '">';
             if (has_post_thumbnail()) {
                 $output .= '<a class="thumb" href="' . get_permalink() . '">' . get_the_post_thumbnail($post_id = get_the_ID(), $size = array(178, 178)) . '</a>';
             }
             $output .= '<h5><a href="' . get_permalink() . '">' . strtoupper(get_the_title()) . '</a></h5>';
             $output .= '<div class="date">' . get_the_date() . '</div>';
             $output .= '<div class="post"><p>' . AT_Common::truncate($content = get_the_excerpt(), $limit = 40) . '</p></div>';
             $output .= '</div>';
             if ($c === 2) {
                 $class .= ' last';
                 $output .= '<div class="clear"></div>';
                 $c = 0;
             }
         }
     }
     $output .= '<div class="all_wrapper"><a class="all_news btn7" href="' . get_post_type_archive_link('news') . '">' . __("All news", AT_TEXTDOMAIN) . '</a></div>';
     $output .= '</div>';
     $output .= '</div>';
     wp_reset_postdata();
     return $output;
 }
示例#30
0
 protected function content($atts, $content = null)
 {
     $width = $excerpt_length = $el_class = $output = $items = $el_position = '';
     extract(shortcode_atts(array('title' => '', "item_count" => '4', "category" => '', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
     // CATEGORY SLUG MODIFICATION
     if ($category == "All") {
         $category = "all";
     }
     if ($category == "all") {
         $category = '';
     }
     $category_slug = str_replace('_', '-', $category);
     global $post, $wp_query;
     $args = array('post_type' => 'post', 'post_status' => 'publish', 'category_name' => $category_slug, 'posts_per_page' => $item_count);
     $blog_items = query_posts($args);
     if (have_posts()) {
         $items .= '<ul id="posts-ticker" class="news-ticker js-hidden clearfix" data-latesttext="' . __("Latest:", "swiftframework") . '">';
         while (have_posts()) {
             the_post();
             $item_title = get_the_title();
             $post_permalink = get_permalink();
             $items .= '<li class="news-item">';
             $items .= '<a href="' . $post_permalink . '" title="' . $item_title . '">' . $item_title . '</a>';
             $items .= '</li>';
         }
         wp_reset_query();
         $items .= '</ul>';
     }
     $el_class = $this->getExtraClass($el_class);
     $width = wpb_translateColumnWidthToSpan($width);
     $output .= "\n\t" . '<div class="wpb_posts_ticker_widget wpb_content_element ' . $width . $el_class . '">';
     $output .= "\n\t\t" . '<div class="wpb_wrapper posts-ticker-wrap">';
     $output .= "\n\t\t\t\t" . $items;
     $output .= "\n\t\t" . '</div> ' . $this->endBlockComment('.wpb_wrapper');
     $output .= "\n\t" . '</div> ' . $this->endBlockComment($width);
     global $include_ticker;
     $include_ticker = true;
     $output = $this->startRow($el_position, "ticker-row") . $output . $this->endRow($el_position);
     return $output;
 }