Пример #1
0
 /**
  * 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 <*****@*****.**>
  * @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));
 }
Пример #2
0
 /**
  * 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;
 }
Пример #3
0
 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();
     }
 }
Пример #4
0
 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;
 }
Пример #5
0
 /**
  * Callback function
  *
  * @since 2.0.0
  * @author Simone D'Amico <*****@*****.**>
  */
 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));
 }
Пример #6
0
 /**
  * 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 <*****@*****.**>
  * @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));
 }
Пример #7
0
 /**
  * Render the HTML of the option
  *
  * @since  Version 2.0.0
  * @author Simone D'Amico <*****@*****.**>
  */
 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);
     }
 }
Пример #8
0
 /**
  * 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));
     }
 }
Пример #9
0
$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();
Пример #10
0
    '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 );
Пример #11
0
$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';
        }
        ?>
Пример #12
0
 /**
  * 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);
 }
Пример #13
0
    $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();
        
Пример #14
0
        <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 ?>
Пример #15
0
    /**
     * Get the next blog post with an ajax call
     *
     * @return void
     * @since 2.0.0
     * @author Antonio La Rocca <*****@*****.**>
     * @author Andrea Grillo    <*****@*****.**>
     */
    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;
            }
        }
    }
Пример #16
0
 /**
  * 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);
 }
Пример #17
0
 /**
  * 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;
     }
 }
 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);
 }
Пример #19
0
 /**
  * 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;
     }
 }
 /**
  * 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));
 }
Пример #21
0
    if ($enable_excerpt) {
        ?>
                            <div class="excerpt">
                                <?php 
        echo $excerpt;
        ?>
                            </div>
                        <?php 
    }
    ?>
                        <?php 
    if ($enable_extra_info) {
        ?>
                            <div class="extra_info">
                                <?php 
        yit_get_template('portfolios/common/extra_info.php', $extra_info_variables);
        ?>
                            </div>
                        <?php 
    }
    ?>
                    </div>
                </div>
            </li>
        <?php 
}
?>
    </ul>
</div>

<div class="clearfix"></div>
Пример #22
0
<?php
/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <*****@*****.**>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */

yit_get_template( 'blog/bazar/post-formats/standard.php' );

$span = yit_get_sidebar_layout() == 'sidebar-no' ? 12 : 9;

if( is_single() || yit_get_option( 'blog-post-formats-list' ) ) : ?>
<div class="soundcloud-frame span<?php echo $span ?>">
    <?php
    $url = yit_get_post_meta( get_the_ID(), '_format_audio' );
    $iframe = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_iframe' );
    $show_artwork = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_artwork' );
    $show_comments = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_comments' );
    $auto_play = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_autoplay' );
    $color = yit_get_post_meta( get_the_ID(), '_format_audio_color' );
    
    echo do_shortcode( '[soundcloud iframe="' . $iframe . '" url="' . $url . '" show_artwork="' . $show_artwork . '" show_comments="' . $show_comments . '" auto_play="' . $auto_play . '" color="' . $color . '"]' );
    ?>
</div>
Пример #23
0
            <?php 
if ($show_thumbnail && $post_format == 'standard') {
    ?>
                <?php 
    yit_get_template('blog/post-formats/' . $post_format . '.php', array('show_date' => $show_date, 'blog_type' => $blog_type));
    ?>
            <?php 
} else {
    ?>
                <?php 
    $args = array('post_format' => $post_format, 'image_size' => $image_size, 'show_date' => $show_date, 'title' => $title, 'link' => $link, 'show_read_more' => $show_read_more, 'blog_type' => $blog_type);
    ?>
                <?php 
    if ($post_format != 'standard') {
        yit_get_template('blog/post-formats/' . $post_format . '.php', $args);
    }
    ?>
            <?php 
}
?>


            <?php 
if (!$is_quote) {
    ?>
                <div class="yit_post_content clearfix">

                    <?php 
    if ($show_title) {
        ?>
Пример #24
0
<?php

/**
 * @package WordPress
 * @subpackage Your Inspiration Themes
 */
$thumbs = '';
$portfolio_type = yit_work_get('portfolio_type');
$item_selected = null;
?>
<script>
jQuery(document).ready(function($){
	$('.sidebar').remove();
	
	if( !$('#primary').hasClass('sidebar-no') ) {
		$('#primary').removeClass().addClass('sidebar-no');
		$('.content').removeClass('span9').addClass('span12');
	}
	
});
</script>

<?php 
if (yit_have_works()) {
    yit_get_template('portfolios/full-description/loop.php');
}
?>
        

<div class="clear"></div>
Пример #25
0
 function yit_quick_view()
 {
     do_action('yit_load_quick_view');
     yit_get_template('quick-view/quick-view.php');
 }
Пример #26
0
    printf(__('Search Results for: %s', 'yit'), get_search_query());
    ?>
</h2>
<?php 
}
if (is_page_template('blog.php')) {
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
    query_posts('cat=' . yit_get_excluded_categories() . '&posts_per_page=' . yit_get_option('posts_per_page') . '&paged=' . $paged);
}
if (have_posts()) {
    while (have_posts()) {
        the_post();
        if ($is_blog) {
            yit_get_template('primary/loop/blog.php', $blog_type_options);
        } elseif (is_singular('post')) {
            yit_get_template('primary/loop/single.php', $blog_type_options);
        } elseif (is_page()) {
            the_content();
        } else {
            ob_start();
            do_action('yit_loop');
            $yit_loop = ob_get_clean();
            if (!empty($yit_loop)) {
                echo $yit_loop;
            } else {
                the_content();
            }
        }
        wp_link_pages();
    }
} else {
Пример #27
0
 /**
  * Print the update page
  * 
  * @return void
  * @since 1.0.0
  */
 public function display_page()
 {
     $config = YIT_Config::load();
     $name = $config['theme']['name'];
     yit_get_template('admin/panel/notifier.php', $config['theme']);
 }
Пример #28
0
 /**
  * Print metaboxes tab
  * 
  * @param object $post
  * @param string $metabox_id
  * @return void
  * @since 1.0.0
  */
 public function metaboxes_html($post, $metabox)
 {
     $metabox_id = $metabox['args']['metabox_id'];
     $this->_options = apply_filters('yit_add_options_metabox', $this->_options);
     $this->_options = apply_filters('yit_remove_options_metabox', $this->_options);
     yit_get_template('admin/metaboxes/tab.php', array('tabs' => $this->_tabs[$metabox_id], 'options' => $this->_options[$metabox_id]));
 }
Пример #29
0
<?php
/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <*****@*****.**>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */

yit_get_template( 'blog/big-ribbon/post-formats/standard.php' );

$span = yit_get_sidebar_layout() == 'sidebar-no' ? yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) ? 11 : 12 : 8;

if( is_single() || yit_get_option( 'blog-post-formats-list' ) ) : ?>
<div class="soundcloud-frame span<?php echo $span ?>">
    <?php
    $url = yit_get_post_meta( get_the_ID(), '_format_audio' );
    $iframe = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_iframe' );
    $show_artwork = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_artwork' );
    $show_comments = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_comments' );
    $auto_play = ( bool ) yit_get_post_meta( get_the_ID(), '_format_audio_autoplay' );
    $color = yit_get_post_meta( get_the_ID(), '_format_audio_color' );
    
    echo do_shortcode( '[soundcloud iframe="' . $iframe . '" url="' . $url . '" show_artwork="' . $show_artwork . '" show_comments="' . $show_comments . '" auto_play="' . $auto_play . '" color="' . $color . '"]' );
    ?>
</div>
Пример #30
0
<?php

/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <*****@*****.**>
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt
 */
if (!is_single() && !yit_get_option('blog-post-formats-list')) {
    yit_get_template('blog/elegant/post-formats/standard.php');
    return;
}
$has_thumbnail = !has_post_thumbnail() || !is_single() && !yit_get_option('blog-show-featured') || is_single() && !yit_get_option('blog-show-featured-single') ? false : true;
?>
<div class="<?php 
if (!$has_thumbnail) {
    echo 'without ';
}
?>
thumbnail">
        <div class="row">                
            <!-- post meta -->
            <?php 
if (get_post_type() == 'post') {
    ?>