本文整理汇总了PHP中yit_plugin_get_template函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_plugin_get_template函数的具体用法?PHP yit_plugin_get_template怎么用?PHP yit_plugin_get_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_plugin_get_template函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: request_quote_list
public function request_quote_list($atts, $content = null)
{
$raq_content = YITH_Request_Quote()->get_raq_return();
$args = array('raq_content' => $raq_content, 'template_part' => 'view');
$args['args'] = $args;
ob_start();
yit_plugin_get_template(YITH_YWRAQ_DIR, 'request-quote.php', $args);
return ob_get_clean();
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:9,代码来源:class.yith-ywraq-shortcodes.php
示例2: get_box
public function get_box()
{
$recent_posts = $this->_get_content();
$tabs = array();
if (!empty($recent_posts)) {
$tabs['view-all'] = array('title' => __('View all', 'yit'), 'content' => $recent_posts);
}
$data = array('model' => 'static', 'type' => 'static', 'tabs' => $tabs, 'label' => $this->name, 'label_all' => sprintf(__('All %s', 'yit'), $this->name));
yit_plugin_get_template(YIT_Layout()->plugin_path, 'admin/accordion-item.php', $data);
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:10,代码来源:yit-layout-module-static.php
示例3: social_buttons
/**
* Print social buttons
*
* @return void
* @since 1.0.0
* @author Emanuela Castorina
*/
public function social_buttons($template_part = '', $is_shortcode = false)
{
$enabled_social = YITH_WC_Social_Login()->enabled_social;
$template_part = empty($template_part) ? 'social-buttons' : $template_part;
if ($is_shortcode) {
ob_start();
}
if (!is_user_logged_in() && !empty($enabled_social)) {
yit_plugin_get_template(YITH_YWSL_DIR, $template_part . '.php', array('label' => get_option('ywsl_social_label'), 'socials' => $enabled_social, 'label_checkout' => get_option('ywsl_social_label_checkout')));
}
if ($is_shortcode) {
return ob_get_clean();
}
}
开发者ID:pcuervo,项目名称:mobbily-wordpress,代码行数:21,代码来源:class-yith-social-login-frontend.php
示例4: print_product_slider
public static function print_product_slider($atts, $content = null)
{
global $yith_wc_product_slider;
$default_attrs = array('id' => '');
$atts = shortcode_atts($default_attrs, $atts);
extract($atts);
$id = intval(yith_wpml_get_translated_id($id, 'yith_wcps_type'));
if (isset($id) && !empty($id)) {
$extra_params = array('en_responsive' => get_option('ywcps_check_responsive') == 'yes' ? "true" : "false", 'n_item_desk_small' => get_option('ywcps_n_item_small_desk'), 'n_item_tablet' => get_option('ywcps_n_item_tablet'), 'n_item_mobile' => get_option('ywcps_n_item_mobile'), 'is_rtl' => get_option('ywcps_check_rtl') == 'yes' ? "true" : "false", 'posts_per_page' => get_option('ywcps_n_posts_per_page'), 'title' => get_the_title($id), 'categories' => get_post_meta($id, '_ywcps_categories', true), 'product_type' => get_post_meta($id, '_ywcps_product_type', true), 'show_title' => get_post_meta($id, '_ywcp_show_title', true) == 1, 'hide_add_to_cart' => get_post_meta($id, '_ywcps_hide_add_to_cart', true) == 1, 'hide_price' => get_post_meta($id, '_ywcps_hide_price', true) == 1, 'n_items' => get_post_meta($id, '_ywcps_image_per_row', true), 'order_by' => get_post_meta($id, '_ywcps_order_by', true), 'order' => get_post_meta($id, '_ywcps_order_type', true), 'is_loop' => get_post_meta($id, '_ywcps_check_loop', true) == 1 ? "true" : "false", 'page_speed' => get_post_meta($id, '_ywcps_pagination_speed', true), 'auto_play' => get_post_meta($id, '_ywcps_auto_play', true), 'stop_hov' => get_post_meta($id, '_ywcps_stop_hover', true) == 1 ? "true" : "false", 'show_nav' => get_post_meta($id, '_ywcps_show_navigation', true) == 1 ? "true" : "false", 'anim_in' => get_post_meta($id, '_ywcps_animate_in', true), 'anim_out' => get_post_meta($id, '_ywcps_animate_out', true), 'anim_speed' => get_post_meta($id, '_ywcps_animation_speed', true), 'show_dot_nav' => get_post_meta($id, '_ywcps_show_dot_navigation', true) == 1 ? "true" : "false", 'template_slider' => get_post_meta($id, '_ywcps_layout_type', true));
$atts['id'] = $id;
$atts = array_merge($extra_params, $atts);
$atts['atts'] = $atts;
$yith_wc_product_slider = true;
$template = yit_plugin_get_template(YWCPS_DIR, 'product_slider_view.php', $atts, true);
$yith_wc_product_slider = false;
return apply_filters('yith_wcpsl_productslider_html', $template, array(), true);
}
}
开发者ID:JailsonH1Sites,项目名称:v8brasil,代码行数:18,代码来源:class.yith-product-slider-shortcode.php
示例5: put_content_tabs
/**
* put_content_tabs
* Put the content at the tabs
* @param $key
* @param $tab
*/
public function put_content_tabs($key, $tab)
{
$args['content'] = get_post_meta($key, '_ywtm_text_tab', true);
yit_plugin_get_template(YWTM_DIR, $this->_default_layout . '.php', $args);
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:11,代码来源:class.yith-woocommerce-tab-manager.php
示例6: yit_sidebar_panel
/**
* Yit Sidebar Panel
*
* print HTML code to sidebar panel
*
* @return void
* @since 1.0
* @author Emanuela Castorina <[email protected]>
*/
public function yit_sidebar_panel()
{
yit_plugin_get_template($this->plugin_path, '/admin/sidebar-panel.php', array('plugin_path' => $this->plugin_path));
?>
<?php
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:16,代码来源:yit-plugin-sidebars.php
示例7: show_premium_version_upgrade
/**
* Show the upgrade to pro version page
*
* @return void
* @since 2.9.13
* @author Andrea Grillo <[email protected]>
*/
public function show_premium_version_upgrade()
{
yit_plugin_get_template(YIT_CORE_PLUGIN_PATH, 'upgrade/upgrade-to-pro-version.php', array('core_plugin_url' => YIT_CORE_PLUGIN_URL));
}
开发者ID:sistercylon,项目名称:loverboy-wp-local,代码行数:11,代码来源:yit-plugin-panel.php
示例8: shortcode_callback
/**
* Shortcode Callback
*
* Callback for contact forms shortcode; load the correct template whit variables inserted and return the html markup
*
* @param $atts array() Attributes array for shortcode
* @param $content string Shortcode content
* @param $shortcode string Shortcode Tag
*
* @return string
* @since 1.0.0
* @author Francesco Licandro <[email protected]>
*/
public function shortcode_callback($atts, $content = null, $shortcode)
{
//$shortcode_contact = $this->contactform_shortcode();
//foreach( $shortcode_contact as $short ){}
global $wpdb;
$all_atts = $atts;
$all_atts['content'] = $content;
$all_atts['button_style'] = isset($all_atts['button_style']) ? $all_atts['button_style'] : 'btn btn-flat';
// get post id of contact form
$this->current_form_id = $wpdb->get_var($wpdb->prepare("SELECT ID FROM {$wpdb->posts} WHERE post_name = %s AND post_type = %s", $all_atts['name'], 'contact-form'));
//wpml control
$this->current_form_id = yit_wpml_get_translated_id($this->current_form_id, 'contact-form');
$fields = $this->get('_items');
if (!is_array($fields) or empty($fields)) {
return null;
}
ob_start();
yit_plugin_get_template(untrailingslashit($this->plugin_path), 'contact-form/contactform-template.php', array('fields' => $fields, 'post_id' => $this->current_form_id, 'button_style' => $all_atts['button_style'], 'title_position' => $this->get('_title_position')));
$shortcode_html = ob_get_clean();
return apply_filters('yit_shortcode_' . $shortcode, $shortcode_html, $shortcode);
}
开发者ID:jabue,项目名称:wordpress,代码行数:34,代码来源:yit-contact-form.php
示例9: add_shortcode
/**
* Return an array with all testimonial categories
*
* All testimonial categories in an array, the first element of array is a general item
* that is useful to show all categories
*
* @param $atts
* @param string $content
* @param $shortcode
*
* @return array
* @since 1.0
* @author Emanuela Castorina <[email protected]>
* @author Francesco Licandro <[email protected]>
*/
public function add_shortcode($atts, $content = "", $shortcode)
{
$all_atts = $atts;
$all_atts['content'] = $content;
if (defined('YIT_SHORTCODE')) {
$shortcodes = YIT_Shortcodes()->shortcodes;
} else {
$shortcodes = $this->shortcodes_hook();
}
if (isset($shortcodes[$shortcode]['unlimited']) && $shortcodes[$shortcode]['unlimited']) {
$atts['content'] = $content;
} else {
//retrieves default atts
$default_atts = array();
if (!empty($shortcodes[$shortcode]['attributes'])) {
foreach ($shortcodes[$shortcode]['attributes'] as $name => $type) {
$default_atts[$name] = isset($type['std']) ? $type['std'] : '';
if (isset($atts[$name]) && $type['type'] == "checkbox") {
if ($atts[$name] == 1 || $atts[$name] == 'yes') {
$atts[$name] = 'yes';
} else {
$atts[$name] = 'no';
}
}
}
}
//
// if ( ! empty( $shortcodes[$shortcode]['attributes'] ) ) {
// foreach ( $shortcodes[$shortcode]['attributes'] as $name => $type ) {
// $default_atts[$name] = isset( $type['std'] ) ? $type['std'] : '';
// }
// }
//combines with user attributes
$atts = shortcode_atts($default_atts, $atts);
}
// remove validate attrs
foreach ($atts as $att => $v) {
unset($all_atts[$att]);
}
$atts['content'] = $content;
ob_start();
yit_plugin_get_template($this->plugin_path, 'shortcodes/' . $shortcode . '.php', $atts);
$shortcode_html = ob_get_clean();
return apply_filters('yit_shortcode_' . $shortcode, $shortcode_html);
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:60,代码来源:yit-testimonials.php
示例10: shortcode_callback
/**
* Shortcode Callback
*
* Callback for logos shortcode; load the correct template whit variables inserted and return the html markup
*
* @param $atts array() Attributes array for shortcode
* @param $content string Shortcode content
* @param $shortcode string Shortcode Tag
*
* @return string
* @since 1.0.0
* @author Antonio La Rocca <[email protected]>
*/
public function shortcode_callback($atts, $content = null, $shortcode)
{
$shortcode_logo = $this->newsletter_shortcode_list();
$all_atts = $atts;
$all_atts['content'] = $content;
if (isset($shortcode_logo[$shortcode]['unlimited']) && $shortcode_logo[$shortcode]['unlimited']) {
$atts['content'] = $content;
} else {
//retrieves default atts
$default_atts = array();
if (!empty($shortcode_logo[$shortcode]['attributes'])) {
foreach ($shortcode_logo[$shortcode]['attributes'] as $name => $type) {
$default_atts[$name] = isset($type['std']) ? $type['std'] : '';
if (isset($atts[$name]) && $type['type'] == "checkbox") {
if ($atts[$name] == 1 || $atts[$name] == 'yes') {
$atts[$name] = 'yes';
} else {
$atts[$name] = 'no';
}
}
}
}
//combines with user attributes
$atts = shortcode_atts($default_atts, $atts);
$atts['content'] = $content;
}
// remove validate attrs
foreach ($atts as $att => $v) {
unset($all_atts[$att]);
}
ob_start();
yit_plugin_get_template($this->plugin_path, 'shortcodes/' . $shortcode . '.php', $atts);
$shortcode_html = ob_get_clean();
return apply_filters('yit_shortcode_' . $shortcode, $shortcode_html, $shortcode);
}
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:48,代码来源:yit-newsletter.php
示例11: widget
/**
* Widget
*
* Show output of the widget
*
* @param $args
* @param $instance
*
* @return void
* @since Version 1.0
* @author Antonio La Rocca <[email protected]>
* @author Francesco Licandro <[email protected]>
*/
public function widget($args, $instance)
{
extract($args);
$args['title'] = apply_filters('widget_title', $instance['title']);
$args['subtitle'] = apply_filters('widget_subtitle', $instance['subtitle']);
$args['icon_form'] = $instance['icon_form'];
$args['post_name'] = $instance['post_name'];
$args['with_border'] = isset($instance['with_border']) ? $instance['with_border'] : '';
$args['widget'] = true;
$args['text'] = empty($instance['text']) ? '' : $instance['text'];
$args['button_class'] = isset($instance['button_class']) ? $instance['button_class'] : '';
$class = isset($instance['with_border']) && $instance['with_border'] == 'yes' ? 'newsletter-form with-border' : 'newsletter-form';
echo str_replace('newsletter-form', $class, $before_widget);
echo $before_title . $args['title'] . $after_title;
if ($args['subtitle'] != '') {
echo '<p class="newsletter-subtitle">' . $args['subtitle'] . '</p>';
}
yit_plugin_get_template(untrailingslashit(plugin_dir_path(__FILE__)), 'shortcodes/newsletter_form.php', $args);
echo $after_widget;
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:33,代码来源:yit-newsletter.widget.php
示例12: show
/**
* Show metabox
*
* show the html of metabox
*
*
* @return void
* @since 1.0
* @author Emanuela Castorina <[email protected]>
*/
public function show()
{
$this->reorder_tabs();
yit_plugin_get_template(YIT_CORE_PLUGIN_PATH, 'metaboxes/tab.php', array('tabs' => $this->tabs));
}
开发者ID:rinodung,项目名称:live-theme,代码行数:15,代码来源:yit-metabox.php
示例13: apply_filters
$tab['fields'] = apply_filters('yit_metabox_' . sanitize_title($tab['label']) . '_tab_fields', $tab['fields']);
foreach ($tab['fields'] as $id_tab => $field) {
$value = yit_get_post_meta($post->ID, $field['id']);
$field['value'] = $value != '' ? $value : (isset($field['std']) ? $field['std'] : '');
?>
<div class="the-metabox <?php
echo $field['type'];
?>
clearfix<?php
if (empty($field['label'])) {
?>
no-label<?php
}
?>
">
<?php
$args = apply_filters('yit_fw_metaboxes_type_args', array('basename' => YIT_CORE_PLUGIN_PATH, 'path' => '/metaboxes/types/', 'type' => $field['type'], 'args' => array('args' => $field)));
extract($args);
?>
<?php
yit_plugin_get_template($basename, $path . $type . '.php', $args);
?>
</div>
<?php
}
?>
</div>
<?php
}
?>
</div>
开发者ID:quinntron,项目名称:tmad,代码行数:31,代码来源:tab.php
示例14: do_shortcode
<h2 class="ypop-title"><?php
echo $header;
?>
</h2>
</div>
<div class="ypop-content-wrapper">
<div class="ypop-content">
<?php
echo do_shortcode($content);
?>
<div class="ypop-content-type">
<?php
if ($template_part != '') {
yit_plugin_get_template(YITH_YPOP_DIR, $template_part, $args);
} elseif ($shortcode != '') {
echo do_shortcode($shortcode);
}
?>
</div>
</div>
</div>
<!-- ypop-border -->
<div class="ypop-footer">
<?php
echo do_shortcode($footer_content);
?>
</div>
<div class="ypop-checkzone">
开发者ID:JacerOmri,项目名称:yith-woocommerce-popup,代码行数:31,代码来源:markup.php
示例15: switch
case 'date':
if (!isset($query_args['orderby'])) {
$query_args['orderby'] = 'post_date';
$query_args['order'] = $order;
}
break;
case 'price':
$query_args['meta_key'] = '_price';
$query_args['orderby'] = 'meta_value_num';
$query_args['order'] = $order;
break;
case 'name':
if (!isset($query_args['orderby'])) {
$query_args['orderby'] = 'post_title';
$query_args['order'] = $order;
}
break;
}
}
$atts['query_args'] = $query_args;
switch ($template_slider) {
case 'default':
yit_plugin_get_template(YWCPS_DIR, 'product_slider_view_default.php', $atts, false);
break;
case 'tmp1':
case 'tmp2':
case 'tmp3':
$atts['layouts'] = $template_slider;
yit_plugin_get_template(YWCPS_DIR, 'product_slider_view_custom_template.php', $atts, false);
break;
}
开发者ID:JailsonH1Sites,项目名称:v8brasil,代码行数:31,代码来源:product_slider_view.php
示例16: add_shortcode
public function add_shortcode( $atts, $content = "" ) {
$shortcode = $this->shortcode_hook();
$default_atts = array();
if ( ! empty( $shortcode['faq']['attributes'] ) ) {
foreach ( $shortcode['faq']['attributes'] as $name => $type ) {
$default_atts[$name] = isset( $type['std'] ) ? $type['std'] : '';
if( isset( $atts[$name] ) && $type['type'] == "checkbox" ){
if ( $atts[$name] == 1 || $atts[$name] == 'yes' ){
$atts[$name] = 'yes';
}else{
$atts[$name] = 'no';
}
}
}
}
//combines with user attributes
$atts = shortcode_atts( $default_atts, $atts );
ob_start();
yit_plugin_get_template( $this->plugin_path, 'shortcodes/faq.php', $atts );
$shortcode_html = ob_get_clean();
return apply_filters( 'yit_shortcode_faq', $shortcode_html );
}
开发者ID:jabue,项目名称:wordpress,代码行数:32,代码来源:yit-faq.php
示例17: yit_plugin_get_template
<div class="yit-panel-sidebar-widget-title <?php
echo $title_class;
?>
">
<?php
echo $title;
?>
</div>
<?php
}
?>
<div class="yit-panel-sidebar-widget-content"><?php
echo $content;
?>
</div>
<?php
if (!empty($image)) {
$path = YIT_CORE_PLUGIN_URL . '/assets/images/widgets/' . $image;
echo "<img class='yit-panel-sidebar-widget-image {$image_class}' src='{$path}' alt='' width='100%'/>";
}
?>
</div>
<?php
if (!empty($badge)) {
$basename = YIT_CORE_PLUGIN_PATH;
$path = '/panel/sidebar/widgets/badges/badge.php';
yit_plugin_get_template($basename, $path, array('text' => $badge_text, 'type' => $badge));
}
?>
</div>
开发者ID:sistercylon,项目名称:loverboy-wp-local,代码行数:30,代码来源:widget.php
示例18: load_single_template
/**
* Load single template
*
* Add the print of single template part for the YIThemes's themes. For all others templates, it's valid the
* standard single-services.php template of wordpress.
*
* @return void
* @since 1.0
* @author Antonino Scarfì <[email protected]>
*/
public function load_single_template()
{
if (!is_singular($this->service_post_type)) {
return;
}
yit_plugin_get_template($this->plugin_path, 'services/single.php');
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:17,代码来源:yit-services.php
示例19: print_messages
/**
* Print Messages
*
* Print all message in cart and checkout
*
* @return void
* @since 1.0
* @author Emanuela Castorina <[email protected]>
*/
public function print_messages()
{
foreach ($this->messages as $message) {
if (apply_filters('yith_ywcm_is_valid_message', $this->is_valid($message->ID), $message->ID)) {
$message_type = get_post_meta($message->ID, '_ywcm_message_type', true);
$layout = get_post_meta($message->ID, '_ywcm_message_layout', true) !== '' ? get_post_meta($message->ID, '_ywcm_message_layout', true) : 'layout';
$args = method_exists($this, 'get_' . $message_type . '_args') ? $this->{'get_' . $message_type . '_args'}($message) : false;
if ($args) {
yit_plugin_get_template(YITH_YWCM_DIR, '/layouts/' . $layout . '.php', $args);
}
}
}
}
开发者ID:yarwalker,项目名称:ecobyt,代码行数:22,代码来源:class.yith-woocommerce-cart-messages.php
示例20: yit_plugin_get_template
?>
" alt="" title=""/></span>
<?php
} else {
?>
<span class="add-on"><i class="icon-<?php
echo $field['icon'];
?>
"></i></span>
<?php
}
}
}
yit_plugin_get_template(untrailingslashit(YIT_Contact_Form()->plugin_path), 'contact-form/fields/' . $field['type'] . '.php', array('field' => $field, 'form_name' => $form_name, 'value' => $value, 'input_class' => $input_class, 'title_position' => $title_position));
?>
<div class="msg-error"><?php
echo $error_msg;
?>
</div>
</div>
<div class="clear"></div>
</li>
<?php
}
?>
<?php
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:contactform-template.php
注:本文中的yit_plugin_get_template函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论