本文整理汇总了PHP中yit_get_template函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_get_template函数的具体用法?PHP yit_get_template怎么用?PHP yit_get_template使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_get_template函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_page
/**
* Add theme page function callback
*
* The function to be called to output the content for this page.
*
* @since 2.0.0
* @author Antonio La Rocca <[email protected]>
* @return void
*/
public function display_page()
{
if (!current_user_can('edit_theme_options')) {
wp_die('<p>' . __('You do not have sufficient permissions to edit templates for this site.', 'yit') . '</p>');
}
yit_get_template('admin/script-editor/script-editor.php', array('option_name' => $this->option_name));
}
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:16,代码来源:Script_Editor.php
示例2: activate_maintenance
/**
* Render the maintenance page
*
*/
public function activate_maintenance()
{
if (!$this->_isMaintenanceEnabled() || $this->_userIsAllowed() || $this->_isLoginPage()) {
return;
}
yit_get_template('maintenance/maintenance.php', $this->_vars());
exit;
}
开发者ID:jayeshnair,项目名称:ctp,代码行数:12,代码来源:Maintenance.php
示例3: show_panel
public function show_panel($print = false)
{
if ($print) {
yit_get_template('/admin/layout/layout-panel.php', array('options' => $this->options, 'db_options' => $this->get_options(), 'current_panel' => $this->current_panel));
} else {
ob_start();
yit_get_template('/admin/layout/layout-panel.php', array('options' => $this->options, 'db_options' => $this->get_options(), 'current_panel' => $this->current_panel, 'prefix' => $this->prefix));
return ob_get_clean();
}
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:10,代码来源:yit-layout-panel.php
示例4: init_popup
public function init_popup()
{
if (!wp_verify_nonce($_REQUEST['_nonce'], 'yit-contact-popup-nonce')) {
die('You are not authorized!');
}
$title = yit_get_option('contact-title');
$contact = yit_get_option('contact-popup');
$content = yit_get_option('contact-content');
yit_get_template('contact-popup/markup.php', array('contact' => $contact, 'title' => $title, 'content' => $content));
die;
}
开发者ID:jayeshnair,项目名称:ctp,代码行数:11,代码来源:Contact_Popup.php
示例5: display_page
/**
* Callback function
*
* @since 2.0.0
* @author Simone D'Amico <[email protected]>
*/
public function display_page()
{
$theme = wp_get_theme();
$tabs = $this->load_tabs();
$type = $this->getModel('type');
$form_id = $this->slug;
yit_get_template('admin/panel/header.php', array('theme' => $theme->Name, 'version' => $theme->Version));
yit_get_template('admin/panel/form.php', array('form_id' => $form_id));
yit_get_template('admin/panel/menu.php', array('tabs' => $tabs));
yit_get_template('admin/panel/content-options.php', array('tabs' => $tabs, 'type' => $type));
yit_get_template('admin/panel/footer.php', array('form' => true, 'tab_slug' => $this->folder_options));
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:18,代码来源:Submenu.php
示例6: display_page
/**
* Add theme page function callback
*
* The function to be called to output the content for this page.
*
* @since 2.0.0
* @author Simone D'Amico <[email protected]>
* @return void
*/
public function display_page()
{
if (!current_user_can('edit_theme_options')) {
wp_die('<p>' . __('You do not have sufficient permissions to edit templates for this site.', 'yit') . '</p>');
}
$file = locate_template($this->filename);
if (!file_exists($file) || !yit_is_writable($file)) {
echo '<p>' . __('The file does not exist or you do not have sufficient permissions to edit this file.', 'yit') . '</p>';
echo '<p>' . __(sprintf('Make sure the file <strong>%s</strong> exists within the root of your theme folder and the file is writable. In order to use this tool, you need to make this file writable before you can save your changes. See <a href="http://codex.wordpress.org/Changing_File_Permissions">the Codex</a> for more information.', $this->filename), 'yit') . '</p>';
return;
}
$content = file_get_contents($file);
yit_get_template('admin/editor/editor.php', array('filename' => $this->filename, 'file' => $file, 'content' => $content));
}
开发者ID:NgocSon2412,项目名称:website_banhang,代码行数:23,代码来源:Editor.php
示例7: render
/**
* Render the HTML of the option
*
* @since Version 2.0.0
* @author Simone D'Amico <[email protected]>
*/
public function render($option)
{
if (isset($option['type']) && $option['type']) {
// set properly the default value for this option
if (isset($option['std']) && isset($option['id'])) {
$defaults = YIT_Registry::get_instance()->options->get_default_options();
if (isset($defaults[$option['id']])) {
$option['std'] = $defaults[$option['id']];
} else {
$option['std'] = '';
}
}
// alter option array by plugin
$option = apply_filters('yit_admin_option_args', $option);
$path = 'admin/type/' . $option['type'] . '.php';
yit_get_template($path, $option);
}
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:24,代码来源:Type.php
示例8: get_menu
/**
* Print the menu for the Theme Options
*
* @return void
* @since 1.0.0
*/
public function get_menu($id)
{
if (!empty($this->_menu) && !empty($this->_submenu)) {
yit_get_template('admin/panel/menu.php', array('id' => $id, 'menu' => $this->_menu, 'submenu' => $this->_submenu));
}
}
开发者ID:jayeshnair,项目名称:ctp,代码行数:12,代码来源:Theme_option.php
示例9: yit_get_sidebar_layout
$post_classes = 'hentry-post group blog-bazar row';
$span = yit_get_sidebar_layout() == 'sidebar-no' ? 12 : 9;
if( yit_get_option( 'blog-post-formats-list' ) )
{ $post_classes .= ' post-formats-on-list'; }
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_classes ); ?>>
<!-- post featured & title -->
<?php
$post_format = get_post_format() == '' ? 'standard' : get_post_format();
$post_format = yit_get_option( 'blog-post-formats-list' ) && get_post_format() != '' ? get_post_format() : $post_format;
yit_get_template( 'blog/bazar/post-formats/' . $post_format . '.php' );
?>
<!-- post content -->
<div class="the-content<?php if( is_single() ) echo ' single'; ?> span<?php echo $span ?> group"><?php
if( $post_format != 'quote' )
{
if( yit_get_option( 'blog-show-read-more' ) )
{
the_content( yit_get_option( 'blog-read-more-text' ) );
}
else
{
if( is_single() ) the_content();
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:markup.php
示例10: yit_get_template
'show_read_more' => $show_read_more,
'show_meta_box' => $show_meta_box,
'author_icon' => $author_icon,
'author_icon_type' => $author_icon_type,
'author_icon_class' => $author_icon_class,
'categories_icon' => $categories_icon,
'categories_icon_type' => $categories_icon_type,
'categories_icon_class' => $categories_icon_class,
'tags_icon' => $tags_icon,
'tags_icon_type' => $tags_icon_type,
'tags_icon_class' => $tags_icon_class,
'comments_icon' => $comments_icon,
'comments_icon_type' => $comments_icon_type,
'comments_icon_class' => $comments_icon_class,
'title' => $title,
'read_more_text' => $read_more_text,
'post_meta_separator' => $post_meta_separator,
'blog_type' => $blog_type,
'link' => $link,
'has_tags' => $has_tags,
'has_pagination' => $has_pagination,
'has_thumbnail' => $has_thumbnail,
'post_format' => $post_format,
'is_quote' => $is_quote,
'image_size' => $image_size,
'what_formats_show' => $what_formats_show,
'bootstrap_col_class' => $bootstrap_col_class
);
yit_get_template( 'blog/' . $blog_type . '/markup.php', $args );
开发者ID:jabue,项目名称:wordpress,代码行数:30,代码来源:blog.php
示例11: get_option
$template = get_option('template');
switch ($template) {
case 'twentyeleven':
echo '<div id="primary"><div id="content" role="main">';
break;
case 'twentytwelve':
echo '<div id="primary" class="site-content"><div id="content" role="main">';
break;
case 'twentythirteen':
echo '<div id="primary" class="site-content"><div id="content" role="main" class="entry-content twentythirteen">';
break;
case 'twentyfourteen':
echo '<div id="primary" class="content-area"><div id="content" role="main" class="site-content twentyfourteen"><div class="tfwc">';
break;
default:
yit_get_template('primary/start-primary.php');
$sidebar = YIT_Layout()->sidebars;
$sidebar = is_array($sidebar) ? $sidebar : array('layout' => $sidebar);
$content_cols = 12;
$content_order = '';
if ($sidebar['layout'] == 'sidebar-left') {
$content_cols -= 3;
$content_order = ' col-sm-push-3';
} elseif ($sidebar['layout'] == 'sidebar-right') {
$content_cols -= 3;
} elseif ($sidebar['layout'] == 'sidebar-double' && $sidebar['sidebar-left'] != '-1') {
$content_cols -= 6;
$content_order = ' col-sm-push-3';
}
?>
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:30,代码来源:wrapper-start.php
示例12: add_shortcode
/**
* Shortcode callback
*
* @param $atts array()
* @param $content mixed
* @param $shortcode string
*
* @return string
*/
public function add_shortcode($atts, $content = null, $shortcode)
{
$all_atts = $atts;
$all_atts['content'] = $content;
if (isset($this->shortcodes[$shortcode]['unlimited']) && $this->shortcodes[$shortcode]['unlimited']) {
$atts['content'] = $content;
} else {
//retrieves default atts
$default_atts = array();
if (!empty($this->shortcodes[$shortcode]['attributes'])) {
foreach ($this->shortcodes[$shortcode]['attributes'] as $name => $type) {
$default_atts[$name] = isset($type['std']) ? $type['std'] : '';
}
}
//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_get_template('shortcodes/' . $shortcode . '.php', array_merge($atts, array('other_atts' => $all_atts)));
$shortcode_html = ob_get_clean();
return apply_filters('yit_shortcode_' . $shortcode, $shortcode_html);
}
开发者ID:VitaliyProdan,项目名称:wp_shop,代码行数:36,代码来源:Shortcodes.php
示例13: yit_get_option
$span = $has_thumbnail ? ( yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ? 4 : 5 ) : ( yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ? 8 : 9 );
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'hentry-post group blog-small-ribbon row' ); ?>>
<?php if( yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ) : ?>
<div class="date-comments span1">
<?php if( yit_get_option( 'blog-show-date' ) ) : ?><p class="date"><span class="month"><?php echo get_the_date( 'M' ) ?></span><span class="day"><?php echo get_the_date( 'd' ) ?></span></p><?php endif; ?>
<?php if( yit_get_option( 'blog-show-comments' ) ) : ?><p class="comments"><i class="<?php echo yit_get_icon( 'blog-comments-icon' ) ?>"></i><span><?php comments_popup_link( '0', '1', '%' ); ?></span></p><?php endif ?>
</div>
<?php endif ?>
<!-- post featured & title -->
<?php
if( get_post_format() == 'quote' ) :
yit_get_template( 'blog/small-ribbon/post-formats/quote.php' );
else :
?>
<div class="<?php if ( ! $has_thumbnail ) echo 'without ' ?>thumbnail span4">
<?php if ( $has_thumbnail ) : ?>
<?php yit_image( 'size=blog_small_ribbon&image_scan=' . yit_get_option('blog-show-first-content-image') ); ?>
<?php endif ?>
<?php if( get_post_format() != '' ) : ?><span class="post-format <?php echo get_post_format() ?>"><?php _e( ucfirst( get_post_format() ), 'yit' ) ?></span><?php endif ?>
</div>
<!-- post title -->
<div class="span<?php echo $span ?>">
<?php
$link = get_permalink();
开发者ID:simonsays88,项目名称:costa,代码行数:30,代码来源:markup.php
示例14: if
<div class="col-sm-12">
<?php if( ! $is_quote ) : ?>
<?php yit_get_template( 'blog/post-formats/standard.php', array( 'show_thumbnail' => $show_thumbnail, 'show_date' => $show_date, 'post_format' => $post_format, 'show_post_format_icon' => $show_post_format_icon, 'blog_type' => $blog_type, 'link' => $link ) ) ?>
<?php endif; ?>
<div class="yit_post_content clearfix <?php echo $show_meta_box ? 'show-metabox' : 'hide-metabox' ?> ">
<?php if( $is_quote ) : ?>
<?php $quote_args = array( 'show_date' => $show_date,
'blog_type' => $blog_type,
'title' => $title,
'link' => $link,
'show_title' => $show_title,
'show_read_more' => $show_read_more,
'read_more_text' => $read_more_text,
'show_meta_box' => $show_meta_box ) ?>
<?php yit_get_template( 'blog/post-formats/' . $post_format . '.php', $quote_args ) ?>
<div class="yit_post_format_icon"><?php echo isset( $post_format ) ? $post_format : '' ?></div>
<?php else : ?>
<?php if( $show_meta_box ) : ?>
<div class="yit_post_meta">
<?php if( $show_author ) : ?>
<span class="author <?php echo $author_icon_class ?>">
<?php if( $author_icon_type == 'icon' ) echo $author_icon ?>
<?php echo __('by', 'yit') . ' '; the_author_posts_link(); ?>
</span>
<?php endif; ?>
<?php if( $show_categories ) : ?>
<span class="categories <?php echo $categories_icon_class ?>">
<?php if( $show_author ) echo $post_meta_separator; ?>
<?php if( $categories_icon_type == 'icon' ) echo $categories_icon ?>
开发者ID:jabue,项目名称:wordpress,代码行数:31,代码来源:markup.php
示例15: yit_blog_big_next_post
/**
* Get the next blog post with an ajax call
*
* @return void
* @since 2.0.0
* @author Antonio La Rocca <[email protected]>
* @author Andrea Grillo <[email protected]>
*/
function yit_blog_big_next_post()
{
global $post;
if (is_null($post) || empty($post)) {
return;
}
if (YIT_Request()->is_ajax && isset($_REQUEST['post_id'])) {
$post = get_post(intval($_REQUEST['post_id']));
}
if ((is_singular('post') || YIT_Request()->is_ajax && $post->post_type == 'post') && yit_get_option('blog-single-type') == 'big') {
$blog_type_options = array('blog_single_type' => yit_get_option('blog-single-type'), 'is_next_post' => true);
$image_size = YIT_Registry::get_instance()->image->get_size('blog_single_big');
$next_post = get_previous_post();
if ($next_post == '' || $next_post == null) {
$args = array('order' => 'DESC', 'order_by' => 'date');
$posts = get_posts($args);
if (!empty($posts)) {
$next_post = $posts[0];
}
}
$post = $next_post;
setup_postdata($post);
$has_post_thumbnail = has_post_thumbnail();
$placeholder = !$has_post_thumbnail ? 'class="placeholder no-featured" style="height: ' . $image_size['height'] . 'px;"' : 'class="placeholder" style="max-height: ' . $image_size['height'] . 'px;"';
?>
<div id="next" class='slide-tab next-post hidden-content' data-post_id="<?php
the_ID();
?>
">
<div class='big-image'>
<div <?php
echo $placeholder;
?>
>
<?php
if ($has_post_thumbnail) {
?>
<?php
yit_image(array('post_id' => get_the_ID(), 'size' => 'blog_single_big', 'class' => 'img-responsive'));
?>
<?php
}
?>
<div class="inner">
<div class="info-overlay">
<div class="read-more-label"><?php
_e('VIEW NEXT POST', 'yit');
?>
</div>
<div class="read-more-title"><?php
the_title();
?>
</div>
</div>
</div>
</div>
<?php
yit_blog_big_post_start('next-post');
?>
</div>
<div class='container'>
<?php
remove_action('yit_primary', 'yit_start_primary', 5);
remove_action('yit_primary', 'yit_end_primary', 90);
remove_action('yit_content_loop', 'yit_content_loop', 10);
add_action('yit_content_loop', 'yit_blog_single_loop');
yit_get_template('primary/loop/single.php', $blog_type_options);
if (!YIT_Request()->is_ajax) {
comments_template();
}
add_action('yit_primary', 'yit_end_primary', 90);
?>
</div>
</div>
<?php
if (defined('DOING_AJAX') && DOING_AJAX) {
die;
}
}
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:88,代码来源:functions-theme.php
示例16: update_plugins_page_callback
/**
* Print page with instructions for install bundled plugins
*
* @since 1.0.0
*/
public function update_plugins_page_callback()
{
yit_get_template("admin/plugins/instructions.php", false);
}
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:9,代码来源:Plugins.php
示例17: add_featurestab_field
/**
* Ajax call used to retrieve features tab form fields
*
* @since 1.0.0
*/
public function add_featurestab_field($args = array())
{
extract(wp_parse_args($args, array('index' => isset($_POST['action']) && $_POST['action'] == 'add_featurestab_field' && isset($_POST['index']) ? intval($_POST['index']) : 0, 'post_id' => isset($_POST['action']) && $_POST['action'] == 'add_featurestab_field' && isset($_POST['post_id']) ? intval($_POST['post_id']) : 0, 'field_name' => isset($_POST['action']) && $_POST['action'] == 'add_featurestab_field' && isset($_POST['field_name']) ? $_POST['field_name'] : 0, 'die' => true)));
$index++;
// evita di salvare in array un valore con chiave 0, perchè viene cancellato dal sistema, durante il salvataggio
$items = array_values(yit_get_model('cpt_unlimited')->get_items($post_id));
$value = wp_parse_args(isset($items[$index - 1]) ? $items[$index - 1] : array(), array('order' => 0, 'title' => '', 'content' => '', 'icon' => ''));
$args = array('name' => $field_name . '[items][' . $index . ']', 'id' => $field_name . '_items_' . $index, 'index' => $index, 'value' => $value);
yit_get_template('admin/post-type-unlimited/settings-featurestab-field.php', $args);
if ($die) {
die;
}
}
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:18,代码来源:Features_Tab.php
示例18: get_box
public function get_box($post_type)
{
$recent_posts = $this->_get_content();
$tabs = array();
$paginate = paginate_links(array('base' => admin_url('admin-ajax.php') . '%_%', 'format' => '?paged=%#%', 'total' => $this->pagination['total_pages'], 'current' => $this->pagination['paged'], 'mid_size' => 2, 'end_size' => 1, 'prev_next' => true, 'prev_text' => 'prev', 'next_text' => 'next', 'add_args' => array('item_object' => $post_type)));
if (!empty($recent_posts)) {
$tabs['view-all'] = array('title' => __('View all', 'yit'), 'content' => $recent_posts, 'paginate' => $paginate);
if ($this->serchable) {
$tabs['search'] = array('title' => __('Search', 'yit'), 'content' => '');
}
}
$data = array('model' => 'author', 'type' => 'author', 'tabs' => $tabs, 'label' => __('Authors', 'yit'), 'label_all' => __('All Authors', 'yit'));
yit_get_template('/admin/layout/accordion-item.php', $data);
}
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:14,代码来源:yit-layout-module-author.php
示例19: add_contactform_field
/**
* Ajax call used to retrieve contact form fields
*
* @since 1.0.0
*/
public function add_contactform_field($args = array())
{
extract(wp_parse_args($args, array('index' => isset($_POST['action']) && $_POST['action'] == 'add_contactform_field' && isset($_POST['index']) ? intval($_POST['index']) : 0, 'post_id' => isset($_POST['action']) && $_POST['action'] == 'add_contactform_field' && isset($_POST['post_id']) ? intval($_POST['post_id']) : 0, 'field_name' => isset($_POST['action']) && $_POST['action'] == 'add_contactform_field' && isset($_POST['field_name']) ? $_POST['field_name'] : 0, 'die' => true)));
$index++;
// evita di salvare in array un valore con chiave 0, perchè viene cancellato dal sistema, durante il salvataggio
$items = array_values(yit_get_model('cpt_unlimited')->get_items($post_id));
$value = wp_parse_args(isset($items[$index - 1]) ? $items[$index - 1] : array(), array('order' => 0, 'title' => '', 'data_name' => '', 'description' => '', 'type' => 'text', 'already_checked' => '', 'options' => array(), 'option_selected' => '', 'error' => '', 'required' => '', 'is_email' => '', 'reply_to' => '', 'class' => '', 'icon' => ''));
$args = array('name' => $field_name . '[items][' . $index . ']', 'id' => $field_name . '_items_' . $index, 'index' => $index, 'value' => $value);
yit_get_template('admin/post-type-unlimited/settings-contactform-field.php', $args);
if ($die) {
die;
}
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:18,代码来源:Contact_Form.php
示例20: yit_comment
/**
* Print comments
*
* @param object $comment
* @param array $args
* @param int $depth
* @return string
* @since 1.0.0
*/
function yit_comment($comment, $args, $depth)
{
yit_get_template('comments/comment.php', array('comment' => $comment, 'args' => $args, 'depth' => $depth));
}
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:13,代码来源:functions-template.php
注:本文中的yit_get_template函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论