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


PHP Magee_Core::fix_shortcodes方法代码示例

本文整理汇总了PHP中Magee_Core::fix_shortcodes方法的典型用法代码示例。如果您正苦于以下问题:PHP Magee_Core::fix_shortcodes方法的具体用法?PHP Magee_Core::fix_shortcodes怎么用?PHP Magee_Core::fix_shortcodes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magee_Core的用法示例。


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

示例1: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'style' => '', 'border_color' => '', 'border_width' => '0', 'border_position' => 'left', 'background_color' => '', 'button_color' => '', 'button_link' => '#', 'button_icon' => '', 'button_text' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $uniq_class = uniqid('promo_box-');
     $class .= ' ' . $uniq_class;
     $html = '';
     $textstyle = sprintf('.' . $uniq_class . '.boxed{border-' . esc_attr($border_position) . '-width: %s; background-color:%s;border-' . esc_attr($border_position) . '-color:%s;}', $border_width, $background_color, $border_color);
     $css_style = '';
     if ($button_color != '') {
         $css_style .= sprintf('.' . $uniq_class . ' .promo-action a{ background-color:%s;', $button_color);
     }
     if ($style == 'boxed') {
         $class .= ' boxed';
         $html .= sprintf('<style type="text/css" scoped="scoped">%s </style>', $textstyle);
     }
     if ($css_style != '') {
         $html .= sprintf('<style type="text/css" scoped="scoped">%s </style>', $css_style);
     }
     $html .= '<div class="magee-promo-box ' . esc_attr($class) . '" id="' . esc_attr($id) . '">
                                     <div class="promo-info">
                                         ' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '
                                     </div>
                                     <div class="promo-action">
                                         <a href="' . esc_url($button_link) . '" class="btn-normal btn-lg"><i class="fa ' . esc_attr($button_icon) . '"></i> ' . esc_attr($button_text) . '</a>
                                     </div>
                                 </div>';
     return $html;
 }
开发者ID:neruub,项目名称:onetonclub,代码行数:36,代码来源:class-promo-box.php

示例2: render

    /**
     * Render the shortcode
     * @param  array $args     Shortcode paramters
     * @param  string $content Content between shortcode
     * @return string          HTML output
     */
    function render($args, $content = '')
    {
        $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'style' => 'border', 'color' => '', 'border_color' => '', 'text_align' => '', 'font_weight' => '400', 'font_size' => '36px', 'margin_top' => '', 'margin_bottom' => '', 'border_width' => '5px'), $args);
        extract($defaults);
        self::$args = $defaults;
        $uniqid = uniqid('heading-');
        $class .= ' ' . $uniqid;
        $html = '<style type="text/css">
		                          
                                    .' . $uniqid . '.magee-heading{
                                        font-size:' . $font_size . ';
                                        font-weight:' . $font_weight . ';
                                        margin-top:' . $margin_top . ';
                                        margin-bottom:' . $margin_bottom . ';
                                        color: ' . $color . ';
                                        border-color: ' . $border_color . ';
                                        text-align: ' . $text_align . ';
                                    }
                                    .' . $uniqid . '.heading-border .heading-inner {
                                        border-width: ' . $border_width . ';
                                    }
								.' . $uniqid . '.heading-doubleline .heading-inner:before,
								.' . $uniqid . '.heading-doubleline .heading-inner:after {
									    border-color: ' . $border_color . ';
									    border-width: ' . $border_width . ';
									}
                                </style>';
        $html .= '<h1 class="magee-heading heading-' . $style . ' ' . $class . '" id="' . $id . '"><span class="heading-inner">' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '</span></h1>';
        return $html;
    }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:36,代码来源:class-heading.php

示例3: render_child

    /**
     * Render the child shortcode
     * @param  array $args     Shortcode paramters
     * @param  string $content Content between shortcode
     * @return string          HTML output
     */
    function render_child($args, $content = '')
    {
        $defaults = Magee_Core::set_shortcode_defaults(array('title' => '', 'status' => '', 'icon' => ''), $args);
        extract($defaults);
        self::$args = $defaults;
        if ($status == "open") {
            $status = "in";
            $expanded = "true";
            $collapse = "";
        } else {
            $status = "";
            $expanded = "false";
            $collapse = "collapsed";
        }
        $itemId = 'collapse' . $this->id . "-" . $this->num;
        $html = '<div class="panel panel-default">
                                                    <div class="panel-heading" role="tab" id="heading' . $itemId . '">
                                                        <a class="accordion-toggle ' . $collapse . '" data-toggle="collapse" data-parent="#' . $this->id . '" href="#' . $itemId . '" aria-expanded="' . $expanded . '" aria-controls="' . $itemId . '">
                                                            <h4 class="panel-title">
                                                                <i class="fa ' . $icon . '"></i> ' . esc_attr($title) . '
                                                            </h4>
                                                        </a>
                                                    </div>
                                                    <div id="' . $itemId . '" class="panel-collapse collapse ' . $status . '" role="tabpanel" aria-labelledby="heading' . $itemId . '" aria-expanded="' . $expanded . '">
                                                        <div class="panel-body">
                                                          ' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '
														  <div class="clear"></div>
                                                        </div>
                                                    </div>
                                                </div>';
        $this->num++;
        return $html;
    }
开发者ID:neruub,项目名称:onetonclub,代码行数:39,代码来源:class-accordion.php

示例4: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'direction' => 'horizontal', 'front_paddings' => '', 'front_background' => '', 'front_color' => '', 'back_paddings' => '', 'back_background' => '', 'back_color' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $uniq_class = uniqid('flip_box-');
     $class .= ' ' . $uniq_class;
     $class .= ' ' . $direction;
     $html = '';
     if ($content) {
         $contentsplit = explode("|||", $content);
         $front_content = isset($contentsplit[0]) ? $contentsplit[0] : '';
         $back_content = isset($contentsplit[1]) ? $contentsplit[1] : '';
         $html = '<style type="text/css" scoped="scoped">.' . $uniq_class . ' .flipbox-front{background-color:' . $front_background . ';}.' . $uniq_class . ' .flipbox-front .flipbox-content{padding:' . $front_paddings . ';}.' . $uniq_class . ' .flipbox-back{background-color:' . $back_background . ';}.' . $uniq_class . ' .flipbox-back .flipbox-content{padding:' . $back_paddings . ';}</style>';
         $html .= '<div class="magee-flipbox-wrap ' . $class . '" id="' . $id . '">
                                             <div class="magee-flipbox">
                                                 <div class="flipbox-front">
                                                     <div class="flipbox-content">
                                                         ' . do_shortcode(Magee_Core::fix_shortcodes($front_content)) . '
                                                     </div>
                                                 </div>
                                                 <div class="flipbox-back">
                                                     <div class="flipbox-content">
                                                        ' . do_shortcode(Magee_Core::fix_shortcodes($back_content)) . '
                                                     </div>
                                                 </div>
                                             </div>
                                         </div>';
     }
     return $html;
 }
开发者ID:neruub,项目名称:onetonclub,代码行数:37,代码来源:class-flip-box.php

示例5: render_parent

        /**
         * Render the shortcode
         * @param  array $args     Shortcode paramters
         * @param  string $content Content between shortcode
         * @return string          HTML output
         */
        function render_parent($args, $content = '')
        {
            $defaults = Magee_Core::set_shortcode_defaults(array('width' => '', 'height' => '', 'class' => '', 'id' => ''), $args);
            extract($defaults);
            self::$args = $defaults;
            $uniqid = uniqid('pie-');
            $this->id = $id . $uniqid;
            $html = '<canvas id="' . esc_attr($this->id) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '" class="' . esc_attr($class) . '"></canvas>
		<script>
		if(document.getElementById(\'magee-sc-form-preview\')){
		var buyers = document.getElementById(\'magee-sc-form-preview\').contentWindow.document.getElementById("' . $this->id . '").getContext(\'2d\');
		}else{
		var buyers = document.getElementById("' . $this->id . '").getContext(\'2d\');
		}
		var pieData = [
		' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '
	    ];
		var pieOptions = {
			segmentShowStroke : false,
			animateScale : true
		}
		new Chart(buyers).Pie(pieData,pieOptions);
		</script>';
            return $html;
        }
开发者ID:JasonAJames,项目名称:jasonajamescom,代码行数:31,代码来源:class-chart-pie.php

示例6: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'title' => '', 'border_color' => '', 'title_background_color' => '', 'title_color' => '', 'border_radius' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $add_class = uniqid('panel-');
     $class .= ' ' . $add_class;
     $css_style = '';
     if (is_numeric($border_radius)) {
         $border_radius = $border_radius . 'px';
     }
     if ($title_color) {
         $css_style .= '.' . $add_class . ' h3.panel-title{color:' . esc_attr($title_color) . ';}';
     }
     if ($border_color) {
         $css_style .= '.' . $add_class . '{border-color:' . esc_attr($border_color) . ';}';
     }
     if ($title_background_color) {
         $css_style .= '.' . $add_class . ' .panel-heading{background-color:' . esc_attr($title_background_color) . ';}';
     }
     if ($border_radius) {
         $css_style .= '.' . $add_class . '{border-radius:' . esc_attr($border_radius) . ';}';
     }
     $styles = sprintf('<style type="text/css" scoped="scoped">%s </style>', $css_style);
     $content = do_shortcode(Magee_Core::fix_shortcodes($content));
     $html = sprintf('%s<div class="panel magee-panel %s" id="%s">
                                     <div class="panel-heading">
                                         <h3 class="panel-title">%s</h3>
                                     </div>
                                     <div class="panel-body">
                                         %s
                                     </div>
                                 </div>', $styles, esc_attr($class), esc_attr($id), esc_attr($title), $content);
     return $html;
 }
开发者ID:neruub,项目名称:onetonclub,代码行数:41,代码来源:class-panel.php

示例7: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('type' => '', 'alternative' => ''), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = '';
     switch (esc_attr($type)) {
         case 'private':
             if (current_user_can('publish_posts')) {
                 $html .= '<div class="content-private">' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '</div>';
             } else {
                 $html .= '<div class="content-private-no">' . esc_attr($alternative) . '</div>';
             }
             break;
         case 'members':
             if (is_user_logged_in()) {
                 $html .= '<div class="content-members">' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '</div>';
             } else {
                 $html .= '<div class="content-members-no">' . esc_attr($alternative) . '</div>';
             }
             break;
         case 'guests':
             if (!is_user_logged_in()) {
                 $html .= '<div class="content-guests">' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '</div>';
             } else {
                 $html .= '<div class="content-guests-no">' . esc_attr($alternative) . '</div>';
             }
             break;
     }
     return $html;
 }
开发者ID:JasonAJames,项目名称:jasonajamescom,代码行数:37,代码来源:class-targeted-content.php

示例8: render_modal_content

 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_modal_content($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array(), $args);
     extract($defaults);
     self::$args = $defaults;
     $this->modal_content = do_shortcode(Magee_Core::fix_shortcodes($content));
 }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:13,代码来源:class-modal.php

示例9: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'color' => '', 'boxed' => 'yes', 'boxed_radius' => '0'), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<span %s>%s</span>', Magee_Core::attributes('dropcap-shortcode'), do_shortcode(Magee_Core::fix_shortcodes($content)));
     return $html;
 }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:14,代码来源:class-dropcap.php

示例10: render_child

 /**
  * Render the child shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render_child($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array(), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<li><i class="fa %s"></i> %s</li>', $this->icon_a, do_shortcode(Magee_Core::fix_shortcodes($content)));
     return $html;
 }
开发者ID:neruub,项目名称:onetonclub,代码行数:14,代码来源:class-list.php

示例11: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'title' => '', 'trigger' => 'click', 'placement' => 'top'), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<span class="%s tooltip-text" id="%s" data-toggle="tooltip" data-trigger="%s" data-placement="%s" data-original-title="%s" >%s</span>', $class, $id, $trigger, $placement, $title, do_shortcode(Magee_Core::fix_shortcodes($content)));
     return $html;
 }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:14,代码来源:class-tooltip.php

示例12: render

 /**
  * Render the shortcode
  * @param  array $args	 Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string		  HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('class' => '', 'id' => '', 'background_color' => '#007005', 'border_radius' => '0'), $args);
     extract($defaults);
     self::$args = $defaults;
     $html = sprintf('<span %s>%s</span>', Magee_Core::attributes('highlight-shortcode'), do_shortcode(Magee_Core::fix_shortcodes($content)));
     return $html;
 }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:14,代码来源:class-highlight.php

示例13: render

        /**
         * Render the shortcode
         * @param  array $args     Shortcode paramters
         * @param  string $content Content between shortcode
         * @return string          HTML output
         */
        function render($args, $content = '')
        {
            $defaults = Magee_Core::set_shortcode_defaults(array('id' => '', 'class' => '', 'style' => '', 'border_color' => '', 'border_width' => '0', 'border_position' => 'left', 'background_color' => '', 'button_color' => '', 'button_link' => '#', 'button_icon' => '', 'button_text' => '', 'button_text_color' => ''), $args);
            extract($defaults);
            self::$args = $defaults;
            if (is_numeric($border_width)) {
                $border_width = $border_width . 'px';
            }
            $uniq_class = uniqid('promo_box-');
            $action_class = uniqid('promo-action-');
            $class .= ' ' . $uniq_class;
            $html = '';
            if ($button_text == '') {
                $html .= '<style type="text/css" scoped="scoped">.' . $action_class . '{display:none;}</style>';
            }
            $textstyle = sprintf('.' . $uniq_class . '.boxed{border-' . esc_attr($border_position) . '-width: %s; background-color:%s;border-' . esc_attr($border_position) . '-color:%s;}', $border_width, $background_color, $border_color);
            $css_style = '';
            if ($button_color != '') {
                $css_style .= sprintf('.' . $uniq_class . ' .promo-action a{background-color:%s;', $button_color);
            }
            if ($button_text_color != '') {
                $css_style .= sprintf('.' . $uniq_class . ' .promo-action a{color:%s;', $button_text_color);
            }
            if ($style == 'boxed') {
                $class .= ' boxed';
                $html .= sprintf('<style type="text/css" scoped="scoped">%s </style>', $textstyle);
            }
            if ($css_style != '') {
                $html .= sprintf('<style type="text/css" scoped="scoped">%s </style>', $css_style);
            }
            $html .= '<div class="magee-promo-box ' . esc_attr($class) . '" id="' . esc_attr($id) . '">
                                        <div class="promo-info">
                                            ' . do_shortcode(Magee_Core::fix_shortcodes($content)) . '
                                        </div>								
                                        <div class="promo-action ' . $action_class . '">
                                            <a href="' . esc_url($button_link) . '" class="btn-normal btn-lg">';
            if (stristr($button_icon, 'fa-')) {
                $html .= '<i class="fa ' . esc_attr($button_icon) . '"></i>';
            } else {
                $html .= '<img src="' . esc_attr($button_icon) . '" class="image_instead"/>';
            }
            $html .= esc_attr($button_text) . '</a>
                                        </div>
                                    </div>';
            $html .= '<script>
	    jQuery(function($) {
	      if($("#magee-sc-form-preview").length>0){
				 $("#magee-sc-form-preview").contents().find(".promo-action a").on("click",function(e){
				    if($(this).attr("href") == "#"){
					   e.preventDefault();
				    }
				 });
		      }
		  });           
		</script>';
            return $html;
        }
开发者ID:JasonAJames,项目名称:jasonajamescom,代码行数:63,代码来源:class-promo-box.php

示例14: render

    /**
     * Render the shortcode
     * @param  array $args     Shortcode paramters
     * @param  string $content Content between shortcode
     * @return string          HTML output
     */
    function render($args, $content = '')
    {
        $defaults = Magee_Core::set_shortcode_defaults(array('id' => 'magee-popover', 'class' => '', 'title' => '', 'triggering_text' => '', 'trigger' => 'click', 'placement' => 'top'), $args);
        extract($defaults);
        self::$args = $defaults;
        $uniqid = uniqid('popover-');
        $this->id = $id . $uniqid;
        $html = sprintf('<span class="%s" id="%s" data-toggle="popover" data-trigger="%s" data-placement="%s" 
		data-content="%s" data-original-title="%s" >%s</span>', $class, $id, $trigger, $placement, do_shortcode(Magee_Core::fix_shortcodes($content)), $title, $triggering_text);
        return $html;
    }
开发者ID:sourabh-mehra,项目名称:ASVYS-Charity-Foundation,代码行数:17,代码来源:class-popover.php

示例15: render

 /**
  * Render the shortcode
  * @param  array $args     Shortcode paramters
  * @param  string $content Content between shortcode
  * @return string          HTML output
  */
 function render($args, $content = '')
 {
     $defaults = Magee_Core::set_shortcode_defaults(array('id' => 'magee-timeline', 'class' => '', 'columns' => '4'), $args);
     extract($defaults);
     self::$args = $defaults;
     $this->columns = $columns;
     $html = '<div class="magee-timeline text-center ' . esc_attr($class) . '"  id="' . esc_attr($id) . '"><ul class="row">';
     $html .= do_shortcode(Magee_Core::fix_shortcodes($content));
     $html .= '</ul></div>';
     return $html;
 }
开发者ID:neruub,项目名称:onetonclub,代码行数:17,代码来源:class-timeline.php


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