当前位置: 首页>>代码示例>>PHP>>正文


PHP wpb_translateColumnWidthToSpan函数代码示例

本文整理汇总了PHP中wpb_translateColumnWidthToSpan函数的典型用法代码示例。如果您正苦于以下问题:PHP wpb_translateColumnWidthToSpan函数的具体用法?PHP wpb_translateColumnWidthToSpan怎么用?PHP wpb_translateColumnWidthToSpan使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wpb_translateColumnWidthToSpan函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: content

 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;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:33,代码来源:full-width-text.php

示例2: content

 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;
 }
开发者ID:earthshakira,项目名称:rachanasansad-portfolio,代码行数:29,代码来源:social.php

示例3: content

 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;
 }
开发者ID:rabisahar,项目名称:Spring,代码行数:28,代码来源:media.php

示例4: content

 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;
 }
开发者ID:earthshakira,项目名称:rachanasansad-portfolio,代码行数:28,代码来源:column.php

示例5: content

 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;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:31,代码来源:tweets-slider.php

示例6: at_calltoaction

 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;
     }
 }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:26,代码来源:calltoaction.php

示例7: content

 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;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:60,代码来源:faqs.php

示例8: content

 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;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:26,代码来源:search.php

示例9: at_subscribe

 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;
 }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:26,代码来源:subscribe.php

示例10: at_recent_cars

    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;
    }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:59,代码来源:recent_cars.php

示例11: content

 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;
 }
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:58,代码来源:clients.php

示例12: at_recent_posts

 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;
 }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:58,代码来源:recent_posts.php

示例13: content

 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;
 }
开发者ID:adams0917,项目名称:woocommerce_eht,代码行数:57,代码来源:team.php

示例14: content

 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;
 }
开发者ID:nilmadhab,项目名称:webtutplus,代码行数:55,代码来源:jobs-overview.php

示例15: content

 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;
 }
开发者ID:earthshakira,项目名称:rachanasansad-portfolio,代码行数:13,代码来源:example.php


注:本文中的wpb_translateColumnWidthToSpan函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。