• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP shortcode_atts函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: render

 function render($atts)
 {
     $this->block_uid = td_global::td_generate_unique_id();
     //update unique id on each render
     extract(shortcode_atts(array('limit' => 3, 'sort' => '', 'category_id' => '', 'category_ids' => '', 'custom_title' => '', 'custom_url' => '', 'hide_title' => '', 'show_child_cat' => '', 'tag_slug' => '', 'header_color' => ''), $atts));
     $buffy = '';
     //output buffer
     $td_unique_id = td_global::td_generate_unique_id();
     $td_query =& td_data_source::get_wp_query($atts);
     //by ref  do the query
     //get the js for this block
     $buffy .= $this->get_block_js($atts, $td_query);
     $buffy .= '<div class="td_block_wrap td_block7">';
     //get the block title
     $buffy .= $this->get_block_title($atts);
     //get the sub category filter for this block
     $buffy .= $this->get_block_sub_cats($atts, $td_unique_id);
     $buffy .= '<div id=' . $this->block_uid . ' class="td_block_inner">';
     //inner content of the block
     $buffy .= $this->inner($td_query->posts);
     $buffy .= '</div>';
     //get the ajax pagination for this block
     $buffy .= $this->get_block_pagination($atts, $td_unique_id);
     $buffy .= '</div> <!-- ./block1 -->';
     return $buffy;
 }
开发者ID:Vatia13,项目名称:wordpress,代码行数:26,代码来源:td_block_7.php


示例2: tt_event_hours

function tt_event_hours($atts, $content)
{
    extract(shortcode_atts(array("title" => "Event Hours", "time_format" => "H.i", "class" => "", "hour_category" => "", "text_color" => "", "border_color" => "", "columns" => ""), $atts));
    if ($hour_category != null && $hour_category != "-") {
        $hour_category = array_values(array_diff(array_filter(array_map('trim', explode(",", $hour_category))), array("-")));
    }
    if ($columns != "") {
        $weekdays_explode = explode(",", $columns);
        $weekdays_in_query = "";
        foreach ($weekdays_explode as $weekday_explode) {
            $weekdays_in_query .= "'" . $weekday_explode . "'" . ($weekday_explode != end($weekdays_explode) ? "," : "");
        }
    }
    global $wpdb;
    global $post;
    //The actual fields for data entry
    $query = "SELECT * FROM `" . $wpdb->prefix . "event_hours` AS t1 LEFT JOIN {$wpdb->posts} AS t2 ON t1.weekday_id=t2.ID \r\n\t\tWHERE t1.event_id='" . $post->ID . "'";
    if ($hour_category != null && $hour_category != "-") {
        $query .= "\r\n\t\t\tAND t1.category IN('" . join("','", $hour_category) . "')";
    }
    if ($weekdays_in_query != "") {
        $query .= " AND t2.post_name IN(" . $weekdays_in_query . ")";
    }
    $query .= " ORDER BY t2.menu_order, t1.start, t1.end";
    $event_hours = $wpdb->get_results($query);
    $event_hours_count = count($event_hours);
    if ($event_hours_count) {
        //get weekdays
        $query = "SELECT ID, post_title FROM {$wpdb->posts}\r\n\t\t\t\tWHERE \r\n\t\t\t\tpost_type='timetable_weekdays'\r\n\t\t\t\tORDER BY menu_order";
        $weekdays = $wpdb->get_results($query);
        $output = '';
        if ($title != "") {
            $output .= '<h3 class="tt_event_margin_top_27">' . $title . '<span class="tt_event_hours_count">(' . $event_hours_count . ')</span></h3>';
        }
        $output .= '
		<ul id="event_hours_list" class="timetable_clearfix tt_event_hours' . ($class != "" ? ' ' . $class : '') . '">';
        for ($i = 0; $i < $event_hours_count; $i++) {
            //get event color
            if ($border_color == "") {
                $border_color = "#" . get_post_meta($event_hours[$i]->event_id, "timetable_color", true);
            }
            //get day by id
            $current_day = get_post($event_hours[$i]->weekday_id);
            $output .= '<li' . ($border_color != "" ? ' style="border-left-color:' . $border_color . ';"' : '') . ' id="event_hours_' . $event_hours[$i]->event_hours_id . '" class="event_hours_' . ($i % 2 == 0 ? 'left' : 'right') . '"><h4' . ($text_color != "" ? ' style="color:' . $text_color . ';"' : '') . '>' . $current_day->post_title . '</h4><h4' . ($text_color != "" ? ' style="color:' . $text_color . ';"' : '') . '>' . date($time_format, strtotime($event_hours[$i]->start)) . ' - ' . date($time_format, strtotime($event_hours[$i]->end)) . '</h4>';
            if ($event_hours[$i]->before_hour_text != "" || $event_hours[$i]->after_hour_text != "") {
                $output .= '<p' . ($text_color != "" ? ' style="color:' . $text_color . ';"' : '') . ' class="tt_event_padding_bottom_0">';
                if ($event_hours[$i]->before_hour_text != "") {
                    $output .= $event_hours[$i]->before_hour_text;
                }
                if ($event_hours[$i]->after_hour_text != "") {
                    $output .= ($event_hours[$i]->before_hour_text != "" ? '<br>' : '') . $event_hours[$i]->after_hour_text;
                }
                $output .= '</p>';
            }
            $output .= '</li>';
        }
        $output .= '</ul>';
    }
    return $output;
}
开发者ID:slavai,项目名称:sadick,代码行数:60,代码来源:shortcodes.php


示例3: st_vc_single_search

 function st_vc_single_search($attr, $content = false)
 {
     $data = shortcode_atts(array('st_list_form' => '', 'st_style_search' => 'style_1', 'st_direction' => 'horizontal', 'st_box_shadow' => 'no', 'st_search_tabs' => 'yes', 'st_title_search' => '', 'field_size' => '', 'active' => 1), $attr, 'st_single_search');
     extract($data);
     $txt = st()->load_template('vc-elements/st-single-search/search', 'form', array('data' => $data));
     return $txt;
 }
开发者ID:DaddyFool,项目名称:travelTest,代码行数:7,代码来源:st-single-search.php


示例4: 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


示例5: wolf_columns_shortcode

 /**
  * Columns shortcode
  *
  * @param array $atts
  * @param string $content
  * @return string
  */
 function wolf_columns_shortcode($atts, $content = null)
 {
     // if ( class_exists( 'Vc_Manager' ) && function_exists( 'vc_map_get_attributes' ) ) {
     // 	$atts = vc_map_get_attributes( 'wolf_column', $atts );
     // }
     extract(shortcode_atts(array('col' => 'col-6', 'class' => '', 'first' => '', 'last' => '', 'inline_style' => ''), $atts));
     $col = esc_attr($col);
     $first = esc_attr($first);
     $last = esc_attr($last);
     $col = esc_attr($col);
     $inline_style = sanitize_text_field($inline_style);
     $output = '';
     $style = '';
     $class = $class ? "{$class} " : '';
     // add space
     if ($inline_style) {
         $style .= $inline_style;
     }
     $style = $style ? " style='{$style}'" : '';
     if ($first) {
         $class = 'first';
     } elseif ($last) {
         $class = 'last';
     }
     if ($class == 'first') {
         $output .= '<div class="clear"></div>';
     }
     $output .= '<div class="' . $col . ' ' . $class . '"' . $style . '>' . do_shortcode($content) . '</div>';
     if ($class == 'last') {
         $output .= '<div class="clear"></div>';
     }
     return $output;
 }
开发者ID:estrategasdigitales,项目名称:dictobas,代码行数:40,代码来源:shortcode-columns.php


示例6: calltoaction_sc

    function calltoaction_sc($atts, $content = '')
    {
        extract(shortcode_atts(array("link" => '', "class" => '', "title" => 'Call to actions'), $atts));
        $href = '';
        if ($link) {
            $href = 'href="' . $link . '"';
        }
        $classes = "btn";
        if ($class) {
            $classes .= ' ' . $class;
        }
        $classes = 'class="' . $classes . '"';
        ob_start();
        ?>

		<div class="row">
			<div class="twelve col text-center">
				<?php 
        echo do_shortcode($content);
        ?>
				<a <?php 
        echo $href . ' ' . $classes;
        ?>
 ><?php 
        echo $title;
        ?>
</a>
			</div>
		</div>

<?php 
        $data = ob_get_clean();
        return $data;
    }
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:34,代码来源:calltoaction.php


示例7: sc_embed_player_templater1_handler

function sc_embed_player_templater1_handler($atts)
{
    extract(shortcode_atts(array('fileurl' => '', 'autoplay' => '', 'volume' => '', 'class' => '', 'loops' => ''), $atts));
    if (empty($fileurl)) {
        return '<div style="color:red;font-weight:bold;">Compact Audio Player Error! You must enter the mp3 file URL via the "fileurl" parameter in this shortcode. Please check the documentation and correct the mistake.</div>';
    }
    if (empty($class)) {
        $class = "sc_fancy_player_container";
        //Set default container class
    }
    if (empty($autoplay)) {
        //Set autoplay value
        $autoplay = "";
    } else {
        $autoplay = "on";
    }
    if (empty($loops)) {
        //Set the loops value
        $loops = "";
    } else {
        $loops = "on";
    }
    $args = array('src' => $fileurl, 'loop' => $loops, 'autoplay' => $autoplay, 'preload' => 'none');
    $player_container = "";
    $player_container .= '<div class="' . $class . '">';
    $player_container .= wp_audio_shortcode($args);
    $player_container .= '</div>';
    return $player_container;
}
开发者ID:ericgnelson,项目名称:ericgnelson,代码行数:29,代码来源:shortcodes-functions.php


示例8: jigoshop_product_tag

function jigoshop_product_tag($attributes)
{
    global $paged;
    $jigoshop_options = Jigoshop_Base::get_options();
    $attributes = shortcode_atts(array('tag' => '', 'per_page' => $jigoshop_options->get('jigoshop_catalog_per_page'), 'columns' => $jigoshop_options->get('jigoshop_catalog_columns'), 'orderby' => $jigoshop_options->get('jigoshop_catalog_sort_orderby'), 'order' => $jigoshop_options->get('jigoshop_catalog_sort_direction'), 'pagination' => false, 'tax_operator' => 'IN'), $attributes);
    if (isset($_REQUEST['tag'])) {
        $attributes['tag'] = $_REQUEST['tag'];
    }
    /** Operator validation. */
    if (!in_array($attributes['tax_operator'], array('IN', 'NOT IN', 'AND'))) {
        $tax_operator = 'IN';
    }
    /** Multiple category values. */
    if (!empty($slug)) {
        $slug = explode(',', esc_attr($slug));
        $slug = array_map('trim', $slug);
    }
    $args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $attributes['per_page'], 'orderby' => $attributes['orderby'], 'order' => $attributes['order'], 'paged' => $paged, 'meta_query' => array(array('key' => 'visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')), 'tax_query' => array(array('taxonomy' => 'product_tag', 'field' => 'slug', 'terms' => $attributes['tag'], 'operator' => $attributes['tax_operator'])));
    query_posts($args);
    ob_start();
    jigoshop_get_template_part('loop', 'shop');
    if ($attributes['pagination']) {
        do_action('jigoshop_pagination');
    }
    wp_reset_query();
    return ob_get_clean();
}
开发者ID:ashik968,项目名称:digiplot,代码行数:27,代码来源:product_tag.php


示例9: do_shortcode

 function do_shortcode($attrs)
 {
     $attrs = shortcode_atts(array('url' => '', 'width' => '620', 'height' => '378', 'stream' => TRUE, 'chat_width' => '620', 'chat_height' => '400', 'chat' => FALSE, 'autoplay' => TRUE), $attrs);
     if (empty($attrs['url'])) {
         return '';
     }
     $api_core = new LSB_API_Core();
     $stream_summaries = $api_core->validate_urls(array($attrs['url']));
     $stream_summary = !empty($stream_summaries) ? $stream_summaries[0] : NULL;
     /** @var $stream_summary LSB_Stream_Summary */
     if (empty($stream_summary)) {
         return '';
     }
     $view = NULL;
     switch ($stream_summary->api_id) {
         case 'twitch':
             $view = new LSB_Embedded_Twitch_View();
             break;
     }
     if (empty($view)) {
         return '';
     }
     $attrs['stream_summary'] = $stream_summary;
     return $view->get_html($attrs);
 }
开发者ID:luskyj89,项目名称:mt-wordpress,代码行数:25,代码来源:class-embedded-stream.php


示例10: icon_list_item_shortcode

 function icon_list_item_shortcode($atts, $content = null)
 {
     $icon_type = $icon_img = $img_width = $icon = $icon_color = $icon_color_bg = $icon_size = $icon_style = $icon_border_style = $icon_border_radius = $icon_color_border = $icon_border_size = $icon_border_spacing = $icon_link = $el_class = $icon_animation = $tooltip_disp = $tooltip_text = $icon_margin = '';
     extract(shortcode_atts(array('icon_type' => 'selector', 'icon' => '', 'icon_img' => '', 'icon_color' => '#333333', 'icon_style' => 'none', 'icon_color_bg' => '#ffffff', 'icon_color_border' => '#333333', 'icon_border_style' => '', 'icon_border_size' => '1', 'icon_border_radius' => '500', 'icon_border_spacing' => '50', "icon_size" => "", "icon_margin" => "", 'el_class' => ''), $atts));
     global $vc_list_icon_size, $vc_list_icon_margin;
     if (empty($icon_size)) {
         $icon_size = $vc_list_icon_size;
     }
     if (empty($icon_margin)) {
         $icon_margin = $vc_list_icon_margin;
     }
     if ($icon_animation !== 'none') {
         $css_trans = 'data-animation="' . $icon_animation . '" data-animation-delay="03"';
     }
     $output = $style = $link_sufix = $link_prefix = $target = $href = $icon_align_style = '';
     if ($icon_margin !== '') {
         $style .= 'margin-right:' . $icon_margin . 'px;';
     }
     $icon_animation = $icon_link = '';
     $output .= '<div class="uavc-list-content">';
     if ($icon !== "" || $icon_img !== '') {
         if ($icon_type == 'custom') {
             $icon_style = 'none';
         }
         $main_icon = do_shortcode('[just_icon icon_type="' . $icon_type . '" icon="' . $icon . '" icon_img="' . $icon_img . '" img_width="' . $icon_size . '" icon_size="' . $icon_size . '" icon_color="' . $icon_color . '" icon_style="' . $icon_style . '" icon_color_bg="' . $icon_color_bg . '" icon_color_border="' . $icon_color_border . '"  icon_border_style="' . $icon_border_style . '" icon_border_size="' . $icon_border_size . '" icon_border_radius="' . $icon_border_radius . '" icon_border_spacing="' . $icon_border_spacing . '" icon_link="' . $icon_link . '" icon_animation="' . $icon_animation . '"]');
         $output .= "\n" . '<div class="uavc-list-icon ' . $el_class . '" ' . $css_trans . ' style="' . $style . '">';
         $output .= $main_icon;
         $output .= "\n" . '</div>';
     }
     $output .= '<span class="uavc-list-desc">' . do_shortcode($content) . '</span>';
     $output .= '</div>';
     $output = '<li>' . $output . '</li>';
     return $output;
 }
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:34,代码来源:Ultimate_List_Icon.php


示例11: x_shortcode_toc_item

function x_shortcode_toc_item($atts)
{
    extract(shortcode_atts(array('id' => '', 'class' => '', 'style' => '', 'title' => '', 'page' => ''), $atts, 'x_toc_item'));
    $id = $id != '' ? 'id="' . esc_attr($id) . '"' : '';
    $class = $class != '' ? 'x-toc-item ' . esc_attr($class) : 'x-toc-item';
    $style = $style != '' ? 'style="' . $style . '"' : '';
    $title = $title != '' ? $title : '';
    switch ($page) {
        case 0:
            $page = '';
            break;
        case 1:
            $page = '';
            break;
        default:
            $page = $page;
            if (get_post_status(get_the_ID()) == "draft") {
                $page = '&page=' . $page;
            } else {
                $page = get_the_ID() == get_option('page_on_front') ? 'page/' . $page . '/' : $page . '/';
            }
    }
    $link = esc_url(get_permalink());
    $output = "<li {$id} class=\"{$class}\" {$style}><a href=" . $link . $page . " title=\"Go to {$title}\">" . $title . '</a></li>';
    return $output;
}
开发者ID:elinberg,项目名称:ericlinberg,代码行数:26,代码来源:toc.php


示例12: content

 /**
  * @param $atts
  * @param null $content
  *
  * @return mixed|void
  */
 protected function content($atts, $content = null)
 {
     $key = '';
     /**
      * @var string $el_class
      * @var string $post_type
      * @var string $product_field_key
      * @var string $order_field_key
      * @var string $product_custom_key
      * @var string $order_custom_key
      * @var string $show_label
      * @var string $align
      */
     $atts = shortcode_atts(array('el_class' => '', 'post_type' => 'product', 'product_field_key' => 'sku', 'product_custom_key' => '', 'order_field_key' => 'order_number', 'order_custom_key' => '', 'show_label' => '', 'align' => ''), $atts);
     extract($atts);
     if ('product' === $post_type) {
         $key = '_custom_' === $product_field_key ? $product_custom_key : $product_field_key;
     } elseif ('order' === $post_type) {
         $key = '_custom_' === $order_field_key ? $order_custom_key : $order_field_key;
     }
     if ('yes' === $show_label) {
         $key .= '_labeled';
     }
     $css_class = 'vc_gitem-woocommerce vc_gitem-woocommerce-' . $post_type . '-' . $key . (strlen($el_class) ? ' ' . $el_class : '') . (strlen($align) ? ' vc_gitem-align-' . $align : '');
     return '<div class="' . esc_attr($css_class) . '">' . '{{ woocommerce_' . $post_type . ':' . $key . ' }}' . '</div>';
 }
开发者ID:SayenkoDesign,项目名称:ividf,代码行数:32,代码来源:class-vc-gitem-woocommerce-shortcode.php


示例13: output

 /**
  * Output the shortcode.
  *
  * @param array $atts
  */
 public static function output($atts)
 {
     // Check cart class is loaded or abort
     if (is_null(WC()->cart)) {
         return;
     }
     extract(shortcode_atts(array(), $atts));
     global $post;
     if (!empty($_REQUEST['orderid']) && isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'woocommerce-order_tracking')) {
         $order_id = empty($_REQUEST['orderid']) ? 0 : esc_attr($_REQUEST['orderid']);
         $order_email = empty($_REQUEST['order_email']) ? '' : esc_attr($_REQUEST['order_email']);
         if (!$order_id) {
             echo '<p class="woocommerce-error">' . __('Please enter a valid order ID', 'woocommerce') . '</p>';
         } elseif (!$order_email) {
             echo '<p class="woocommerce-error">' . __('Please enter a valid order email', 'woocommerce') . '</p>';
         } else {
             $order = wc_get_order(apply_filters('woocommerce_shortcode_order_tracking_order_id', $order_id));
             if ($order && $order->get_id() && $order_email) {
                 if (strtolower($order->get_billing_email()) == strtolower($order_email)) {
                     do_action('woocommerce_track_order', $order->get_id());
                     wc_get_template('order/tracking.php', array('order' => $order));
                     return;
                 }
             } else {
                 echo '<p class="woocommerce-error">' . sprintf(__('Sorry, we could not find that order ID in our database.', 'woocommerce'), get_permalink($post->ID)) . '</p>';
             }
         }
     }
     wc_get_template('order/form-tracking.php');
 }
开发者ID:tlovett1,项目名称:woocommerce,代码行数:35,代码来源:class-wc-shortcode-order-tracking.php


示例14: osc_theme_dlitem

function osc_theme_dlitem($params, $content = null)
{
    extract(shortcode_atts(array('heading' => ''), $params));
    $out = '<dt>' . do_shortcode($heading) . '</dt>';
    $out .= '<dd>' . do_shortcode($content) . '</dd>';
    return $out;
}
开发者ID:chypriote,项目名称:wp-video,代码行数:7,代码来源:plugin_shortcode.php


示例15: product_cat_shortcode

/**
 * Defines [show_categories] shortcode
 *
 * @global type $cat_shortcode_query
 * @param type $atts
 * @return string
 */
function product_cat_shortcode($atts)
{
    global $cat_shortcode_query, $product_sort, $archive_template;
    $cat_shortcode_query = array();
    $cat_shortcode_query['current'] = 0;
    $args = shortcode_atts(array('exclude' => array(), 'include' => array(), 'archive_template' => get_option('archive_template', 'default'), 'parent' => '', 'sort' => 0, 'shortcode_query' => 'yes'), $atts);
    $div = '<div class="product-subcategories ' . $args['archive_template'] . ' ' . product_list_class('category-list') . '">';
    $cats = get_terms('al_product-cat', $args);
    $cat_shortcode_query['count'] = count($cats);
    $cat_shortcode_query['enable'] = $args['shortcode_query'];
    $product_sort = intval($args['sort']);
    $inside = '';
    if ($args['parent'] == '' && empty($args['include'])) {
        $old_args = $args;
        $args['parent'] = 0;
        $cats = get_terms('al_product-cat', $args);
        foreach ($cats as $cat) {
            $inside .= get_product_category_template($args['archive_template'], $cat);
            $cat_shortcode_query['current']++;
            $inside .= get_sub_product_subcategories($args, $cat);
        }
    } else {
        foreach ($cats as $cat) {
            $inside .= get_product_category_template($args['archive_template'], $cat);
            $cat_shortcode_query['current']++;
        }
    }
    if (!empty($inside)) {
        do_action('before_category_list', $archive_template);
        $inside = $div . $inside;
        $inside .= '</div>';
    }
    reset_row_class();
    return $inside;
}
开发者ID:jazzindizzin,项目名称:Quality-Timber-Doors,代码行数:42,代码来源:shortcodes.php


示例16: shortode_faqs_function

function shortode_faqs_function($atts)
{
    $a = shortcode_atts(array('question' => 'question', 'answer' => 'answer'), $atts);
    $return_string = '<h6 class = "question">' . $a['question'] . '</h6><p class = "answer">' . $a['answer'] . '</p>';
    return $return_string;
    //$download_Label = {$a['download_Label']};
}
开发者ID:pixelstorm,项目名称:custom_shortcodes,代码行数:7,代码来源:faqs.php


示例17: list_group

 /**
  * List group.
  *
  * @param  array  $atts
  * @param  string $content
  * @return string
  */
 public function list_group($atts, $content = null)
 {
     extract(shortcode_atts(array('class' => ''), $atts));
     $content = str_replace('<ul>', '<ul class="list-group">', $content);
     $content = str_replace('<li>', '<li class="list-group-item">', $content);
     return '<div class="wabbr-list-group ' . $class . '">' . do_shortcode($content) . '</div>';
 }
开发者ID:gizburdt,项目名称:wabbr,代码行数:14,代码来源:class-wabbr-components.php


示例18: at_manufacturers

 public static function at_manufacturers($atts = null, $content = null)
 {
     if ($atts == 'generator') {
         return array("name" => __("Make", AT_ADMIN_TEXTDOMAIN), "base" => "at_manufacturers", 'icon' => "im-icon-spinner-4", "class" => "at-manufacturers-class", 'category' => __("Theme Short-Codes", AT_ADMIN_TEXTDOMAIN), "params" => array(array("type" => "textfield", "heading" => __("Title", AT_ADMIN_TEXTDOMAIN), "param_name" => "title", "value" => "", "description" => __("Enter shortcode title.", AT_ADMIN_TEXTDOMAIN), 'dependency' => array('element' => 'content_type', 'value' => array('custom_text'))), array("type" => "range", "heading" => __("Columns", AT_ADMIN_TEXTDOMAIN), "param_name" => "columns", "default" => "1", "min" => "1", "max" => "7", "step" => "1", "unit" => 'col', "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' => '', 'columns' => '1', 'el_class' => ''), $atts));
     $car_model = AT_Loader::get_instance()->model('car_model');
     $manufacturers = $car_model->get_manufacturers();
     $output = '';
     if (!empty($title)) {
         $output .= '<h2>' . $title . '</h2>';
     }
     if ($columns > 1) {
         $output .= '<div class="auto-columns col-' . $columns . '">';
     }
     $output .= '<ul>';
     foreach ($manufacturers as $manufacturer) {
         $output .= '<li><a href="' . AT_Common::site_url('catalog/' . $manufacturer['alias']) . '">' . $manufacturer['name'] . '</a></li>';
     }
     $output .= '</ul>';
     if ($columns > 1) {
         $output .= '</div>';
     }
     $output .= '<div class="clear"></div>';
     return $output;
 }
开发者ID:ashanrupasinghe,项目名称:amc-car-from-server-2015-1-14,代码行数:27,代码来源:manufacturers.php


示例19: grpdocs_assembly_getdocument

function grpdocs_assembly_getdocument($atts) {

	extract(shortcode_atts(array(
		'file' => '',
		'width' => '',
		'height' => '',
		'page' => 0,
		'version' => 1,
	), $atts));

	$guid = grpdocs_assembly_getGuid(urlencode($file));


	$no_iframe = 'If you can see this text, your browser does not support iframes. Please enable iframe support in your browser or use the latest version of any popular web browser such as Mozilla Firefox or Google Chrome. For more help, please check our documentation Wiki: <a href="http://groupdocs.com/docs/display/assembly/GroupDocs+Assembly+Integration+with+3rd+Party+Platforms">http://groupdocs.com/docs/display/assembly/GroupDocs+Assembly+Integration+with+3rd+Party+Platforms</a>';

	$code = '<iframe src="https://apps.groupdocs.com/assembly2/questionnaire-assembly/'. $guid .'?referer=wordpress-assembly/1.0.4" frameborder="0" width="'. $width .'" height="'. $height .'">' . $no_iframe . '</iframe>';

	$code = str_replace("%W%", $width, $code);
	$code = str_replace("%H%", $height, $code);
	$code = str_replace("%P%", $page, $code);
	$code = str_replace("%V%", $version, $code);
	$code = str_replace("%A%", '', $code);
	$code = str_replace("%B%", $download, $code);
	$code = str_replace("%GUID%", $guid, $code);

	return $code;

}
开发者ID:unisexx,项目名称:drtooth,代码行数:28,代码来源:grpdocsassembly.php


示例20: dnp_code_inline

function dnp_code_inline($params, $content = null)
{
    extract(shortcode_atts(array('type' => '', 'value' => ''), $params));
    $content = preg_replace('/<br class="nc".\\/>/', '', $content);
    $result = '<code>' . do_shortcode($content) . '</code>';
    return force_balance_tags($result);
}
开发者ID:samuel657677,项目名称:www.mertex.de,代码行数:7,代码来源:dnp_code.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP shortcode_exists函数代码示例发布时间:2022-05-24
下一篇:
PHP short_title函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap