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

PHP yit_string函数代码示例

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

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



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

示例1: if

            <div class="yit_post_content title clearfix">
                 <?php if( $show_date && $post_format != 'quote' ) : ?>
                    <div class="yit_post_meta_date">
                        <span class="day">
                            <?php echo get_the_date( 'd' ) ?>
                        </span>

                        <span class="month">
                            <?php echo get_the_date( 'M' ) ?>
                        </span>
                    </div>
                <?php endif; ?>
                <div class="title-meta-wrapper">
                    <?php if( $show_title && $post_format != 'quote' ) : ?>
                        <?php yit_string( "<h1 class='post-title'>", $title, "</h1>" ); ?>
                    <?php endif; ?>
                    <div class="yit_post_meta first_block">
                         <?php if( $show_author ) : ?>
                            <span class="author">
                                <?php echo  __('by', 'yit') . ' ';  the_author_posts_link(); ?>
                            </span>
                        <?php endif; ?>
                        <?php if( $show_comments ) : ?>
                            <span class="comments">
                                <?php if( $show_author ) echo $post_meta_separator; ?>
                                <a href="<?php comments_link() ?>"><?php comments_number( __( '0 Comment', 'yit' ), __( '1 Comment', 'yit' ), '% Comments'); ?></a>
                            </span>
                        <?php endif; ?>
                        <?php $edit_text = $show_author || $show_comments ? __( '/ Edit', 'yit' ) : __( 'Edit', 'yit' ); ?>
                        <?php yit_edit_post_link( $edit_text, '<span class="yit-edit-post">', '</span>' ); ?>
开发者ID:jabue,项目名称:wordpress,代码行数:30,代码来源:single.php


示例2: yit_string

    ?>
            <?php 
}
?>


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

                    <?php 
    if ($show_title) {
        ?>
                        <?php 
        yit_string("<h1 class='post-title'><a href='{$link}'>", $title, "</a></h1>");
        ?>
                    <?php 
    }
    ?>

                    <?php 
    the_content();
    ?>

                </div>
            <?php 
}
?>

                <?php 
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:single.php


示例3: the_content

                    the_content($readmore_text);
                } else {
                    echo yit_content('content', $excerpt_length);
                }
            }
            ?>
            </div>
        
        </div>
        <div class="clear"></div>
        <?php 
            $i++;
            continue;
        }
        if ($i == 1 && $sticked) {
            yit_string('<h4 class="other-articles">', $other_posts_label, '</h4>');
        }
        if ($i != 0 || !$sticked) {
            if ($i == 0) {
                echo '<div id="section-blog-not-sticky">';
            }
            ?>
        
		<?php 
            $post_classes = $post_number % 3 ? 'hentry-post' : 'hentry-post first';
            ?>
        <div <?php 
            post_class($post_classes);
            ?>
>
            <div class="meta group">
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:section-blog.php


示例4: remove_action

 * http://www.gnu.org/licenses/gpl-3.0.txt
 */

global $more;

remove_action( 'the_content_more_link', 'yit_simple_read_more_classes' );

$sticky_shown = false;
$sidebar_layout = yit_get_sidebar_layout() ?>
<div class="row">
    <!-- START SECTION BLOG -->
    <div class="section blog margin-bottom span<?php echo $sidebar_layout == 'sidebar-no' ? 12 : 9 ?>">
        <?php
        //Separated code for a better organization of the code
        if( !empty( $title ) ) { yit_string( '<h2 class="title">', yit_decode_title( $title ), '</h2>' ); }
	    if( !empty( $description ) ) { yit_string( '<p class="description">', $description, '</p>' ); }
        ?>
            
        <div class="row">
            <?php
            //Sticky posts loop args
            if( $show_featured == '1' || $show_featured == 'yes' ) {
                $args_sticky = array(
                    'post_type' => 'post',
                    'post__in' => get_option( 'sticky_posts' ),
                    'posts_per_page' => 1
                );
                
                if( isset( $category ) && !empty( $category ) ) {
                	$args_sticky['category_name'] = $category;
                }
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:section-blog.php


示例5: yit_slide_the

    ?>
>
                    <?php 
    yit_slide_the('featured-content', array('container' => false));
    ?>
 
                    <?php 
    if (yit_slide_get('title') != '' || yit_slide_get('subtitle') != '') {
        ?>
                    <div class="ei-title">
                        <?php 
        yit_string('<h2>', yit_slide_get('title'), '</h2>');
        ?>
   
                        <?php 
        yit_string('<h3>', yit_slide_get('subtitle'), '</h3>');
        ?>
                    </div>
                    <?php 
    }
    ?>
                </li>
                <?php 
}
?>
 
            </ul><!-- ei-slider-large -->
            <ul class="ei-slider-thumbs">
                <li class="ei-slider-element"><?php 
_e('Current', 'yit');
?>
开发者ID:zgomotos,项目名称:Bazar,代码行数:31,代码来源:slider.php


示例6: yit_get_sidebar_layout

<?php
/**
 * Your Inspiration Themes
 * 
 * @package WordPress
 * @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <[email protected]>
 *
 * 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
 */

$class = yit_get_sidebar_layout() == 'sidebar-no' ? yit_get_option( 'blog-show-date' ) || yit_get_option( 'blog-show-comments' ) || yit_get_option( 'blog-show-author' ) ? ' width11' : ' width12' : ' width8';
?>
<div class="thumbnail<?php echo $class ?>">    
    <!-- post meta -->
    <div>
        <?php yit_string( "<blockquote class=\"post-title\"><a href=\"" . get_permalink() . "\">", get_the_content(), "</a><cite>" . get_the_title() . "</cite></blockquote>" ) ?>
    </div>
</div>

<div class="clear"></div>      
开发者ID:simonsays88,项目名称:costa,代码行数:24,代码来源:quote.php


示例7: module

 /**
  * Generate the module
  *
  * @since 1.0.0
  */
 public function module($name_or_id, $echo = true)
 {
     global $is_footer;
     $this->current_form = is_int($name_or_id) ? $name_or_id : yit_post_id_from_slug($name_or_id, 'contactform');
     $form_name = yit_post_slug_from_id($this->current_form);
     $fields = $this->get('fields');
     if (!is_array($fields) or empty($fields)) {
         return null;
     }
     $max_width = '';
     foreach ($fields as $id => $field) {
         preg_match('/[\\d]+/', $field['width'], $matches);
         if ($max_width < (int) $matches[0]) {
             $max_width = $matches[0];
         }
     }
     $html = '<form id="contact-form-' . $form_name . '" class="contact-form' . (!$is_footer ? ' row' : '') . '" method="post" action="" enctype="multipart/form-data">' . "\n\n";
     // div message feedback
     $html .= "\t<div class=\"usermessagea\">" . $this->_generalMessage($this->current_form, false) . "</div>\n";
     $html .= "\t<fieldset>\n\n";
     $html .= "\t\t<ul>\n\n";
     // array with all messages for js validate
     $js_messages = array();
     foreach ($fields as $id => $field) {
         // classes
         $input_class = array();
         // array for print input's classes
         $li_class = array($field['type'] . '-field');
         // array for print li's classes
         // errors
         $error_msg = '';
         $error = false;
         $js_messages[$field['data_name']] = $field['error'];
         if (isset($field['data_name'])) {
             $error_msg = $this->_getMessage($field['data_name']);
             if (!empty($error_msg)) {
                 $error = TRUE;
             }
         }
         // li class
         if ($field['class'] != '') {
             $li_class[] = " {$field['class']}";
         }
         if (isset($field['icon']) && $field['icon'] != '') {
             array_push($li_class, 'with-icon');
         }
         if ($error) {
             array_push($input_class, 'icon', 'error');
         }
         if (isset($field['icon']) && $field['icon'] != '') {
             array_push($input_class, 'with-icon');
         }
         $html .= "\t\t\t<li class=\"" . implode($li_class, ' ') . ' ' . $field['width'] . "\">\n";
         //Label
         if ($field['type'] != 'select') {
             if ($field['type'] != 'radio') {
                 $html .= "\t\t\t\t<label for=\"{$field['data_name']}-{$form_name}\">\n";
             } else {
                 $html .= "\t\t\t\t<label>\n";
             }
             $html .= yit_string("\t\t\t\t\t" . '<span class="mainlabel">', stripslashes_deep($field['title'], 'highlight-text'), '</span>' . "\n", false);
             $html .= yit_string("\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep($field['description']), '</span>' . "\n", false);
             $html .= "\t\t\t\t</label>\n";
         } else {
             if (isset($field['description']) || $field['description'] != '') {
                 $html .= "\t\t\t\t<label>\n";
                 $html .= yit_string("\t\t\t\t\t" . '<span class="sublabel">', stripslashes_deep($field['description']), '</span>' . "\n", false);
                 $html .= "\t\t\t\t</label>\n";
             }
             $field['options'] = array('the-form-label' => $field['title']) + $field['options'];
         }
         // if required
         if (isset($field['required']) and intval($field['required'])) {
             $input_class[] = 'required';
         }
         if (isset($field['is_email']) and intval($field['is_email'])) {
             $input_class[] = 'email-validate';
         }
         // retrive value
         if (isset($field['data_name']) && $error) {
             $value = $this->_postValue($field['data_name']);
         } else {
             if (isset($_GET[$field['data_name']])) {
                 $value = $_GET[$field['data_name']];
             } else {
                 $value = '';
             }
         }
         // only for clean code
         $html .= "\t\t\t\t";
         // Icon
         $html .= "<div class=\"input-prepend\">";
         if (isset($field['icon']) && $field['icon'] != '') {
             if (filter_var($field['icon'], FILTER_VALIDATE_URL)) {
                 $html .= "<span class=\"add-on\"><img src=\"" . $field['icon'] . "\" alt=\"\" title=\"\" /></span>";
//.........这里部分代码省略.........
开发者ID:shahadat014,项目名称:geleyi,代码行数:101,代码来源:Contact_Form.php


示例8: get_flash_configuration

		'TooltipMarginRight' => 7,  
		'TooltipTextSharpness' => 50,
		'TooltipTextThickness' => -100,  
		'InfoWidth' => 400,
		'InfoBackground' => "0xFFFFFF",
		'InfoBackgroundAlpha' => 0.95,
		'InfoMargin' => 400,
		'InfoSharpness' => 0,
		'InfoThickness' => 0,
		'Autoplay' => 10,
		'FieldOfView' => 45
	);
	
	$fields = get_flash_configuration( $settings );
	
	yit_string( '  <Settings ', implode( ' ', $fields ), '></Settings>' );
	
	$transitions = array(
		'Pieces' => 9,
		'Time' => 1.2,
		'Transition' => 'easeInOutBack',
		'Delay' => 0.1,
		'DepthOffset' => 300,
		'CubeDistance' => 30
	);                  
	
	$fields = get_flash_configuration( $transitions );
             
  echo "\n  <Transitions>\n";
  echo "    <Transition " . implode( ' ', $fields ) . "></Transition>\n";
  echo "  </Transitions>\n";
开发者ID:simonsays88,项目名称:costa,代码行数:31,代码来源:piecemaker.php


示例9: get_permalink

                <!-- post title -->
                <?php 
$link = get_permalink();
$title = get_the_title() == '' ? __('(this post does not have a title)', 'yit') : get_the_title();
if ($post_format != 'quote') {
    yit_string("<h2 class=\"post-title{$upper}\"><a href=\"{$link}\">", $title, "</a></h2>");
}
if (!is_single() && $post_format != 'quote') {
    if (yit_get_option('blog-show-read-more') && !yit_get_option('blog-show-featured')) {
        the_content(yit_get_option('blog-read-more-text'));
    } else {
        the_excerpt();
    }
} elseif ($post_format == 'quote') {
    yit_string("<blockquote><p><a href=\"{$link}\">", get_the_content(), "</a></p><cite>" . $title . "</cite></blockquote>");
}
if (is_single() && $post_format != 'quote') {
    the_content();
}
?>
                <?php 
edit_post_link(__('Edit', 'yit'), '<p class="edit-link"><i class="icon-pencil"></i>', '</p>');
?>
                <?php 
wp_link_pages();
?>
            </div>


开发者ID:gloomyghost,项目名称:Tip-Top-Art,代码行数:27,代码来源:markup.php


示例10: bloginfo

    ?>
" title="<?php 
    bloginfo('name');
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" />
</a>
<?php 
} else {
    ?>
<a id="textual" href="<?php 
    echo home_url();
    ?>
" title="<?php 
    echo str_replace(array('[', ']'), '', bloginfo('name'));
    ?>
">
    <?php 
    echo str_replace(array('[', ']'), array('<span>', '</span>'), get_bloginfo('name'));
    ?>
</a>
<?php 
}
?>

<?php 
if (yit_get_option('logo-tagline')) {
    yit_string('<p id="tagline">', get_bloginfo('description'), '</p>');
}
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:logo.php


示例11: _e

	
	<div class="contactform_item closed">
		<h3>
			<button type="button" class="remove_item button" rel=""><?php 
_e('Remove', 'yit');
?>
</button>
			<div class="handlediv" title="<?php 
_e('Click to toggle', 'yit');
?>
"></div>
			<strong><?php 
echo $value['title'];
?>
 <?php 
yit_string('(', $types[$value['type']], ')');
?>
</strong>
			<input type="hidden" class="contactform_menu_order" name="<?php 
echo $name;
?>
[order]" value="<?php 
echo $index;
?>
" />
		</h3>
		<div class="inside">
			
			<div class="the-metabox text clearfix">
				<label for="<?php 
echo $id;
开发者ID:jayeshnair,项目名称:ctp,代码行数:30,代码来源:settings-contactform-field.php


示例12: substr

        $left = $left == 0 ? 'zero' : $left;
        $right = substr($number, 1, 1);
        $right = $right == 0 ? 'zero' : $right;
    }
} else {
    $left = $right = 'zero';
}
$last_class = isset($last) && $last == 'yes' ? ' last' : '';
?>

<div class="box-sections numbers-sections margin-bottom <?php 
echo $last_class;
?>
">
	<div class="number number-left number-<?php 
echo $left;
?>
"></div>
	<div class="number number-right number-<?php 
echo $right;
?>
"></div>
	<?php 
if (!empty($title)) {
    yit_string('<h4>', yit_decode_title($title), '</h4>');
}
?>
	<?php 
echo yit_addp($content);
?>
</div>
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:numbers_sections.php


示例13: is_null

$title = is_null(get_the_title()) ? __('(this post has no title)', 'yit') : the_title('<h2>', '</h2>', false);
?>
                <div id="post-<?php 
the_ID();
?>
" <?php 
post_class('hentry-post group blog-big');
?>
>     
                    <?php 
if (get_the_title() == '') {
    $title = __('(this post does not have a title)', 'yit');
} else {
    $title = get_the_title();
}
yit_string("<h1 class=\"post-title\">", $title, "</h1>");
?>
                    
                    <!-- post content -->
                    <div class="the-content<?php 
if (is_single()) {
    echo ' single';
}
?>
 group">
                        <?php 
the_content();
?>
                    </div>
                    
                    <?php 
开发者ID:eugenehiggins,项目名称:wellnessrx,代码行数:31,代码来源:service.php


示例14: esc_attr

echo esc_attr($value);
?>
" <?php 
if (isset($std)) {
    ?>
data-std="<?php 
    echo $std;
    ?>
"<?php 
}
?>
 />
                    </div> 
                </div>      
                <?php 
yit_string('<span class="desc">', $desc, '</span>');
?>
            </span>
        </div>            

        <script type="text/javascript">
        jQuery(document).ready(function($){
            $('#<?php 
echo $id;
?>
-option .ui-slider .ui-slider').each(function(e){
                var val = <?php 
echo $value;
?>
; 
                var minValue = <?php 
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:slider.php


示例15: is_singular

/*
 * This file belongs to the YIT Framework.
 *
 * 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
 */

$blog_type = is_singular( 'post' ) ? 'single_' . $blog_type : $blog_type;
?>

<?php if ( $show_date && is_singular( 'post' ) ) : ?>
    <div class="yit_post_meta_date">
        <span class="day">
            <?php echo get_the_date( 'd' ) ?>
        </span>

        <span class="month">
            <?php echo get_the_date( 'M' ) ?>
        </span>
    </div>
<?php endif; ?>

<div class="yit_the_content">
    <?php  ( true == $show_read_more ) ? the_content( $read_more_text ) : the_excerpt(); ?>
</div>

<?php if ( $show_title ) : ?>
    <?php yit_string( "<h3 class='post-title'><a href='{$link}'>", $title, "</a></h3>" ); ?>
<?php endif; ?>
开发者ID:jabue,项目名称:wordpress,代码行数:31,代码来源:quote.php


示例16: __

if (get_the_title() == '') {
    $title = __('(this post does not have a title)', 'yit');
} else {
    $title = get_the_title();
}
?>
							
	                    <!-- post content -->
	                    <div class="the-content<?php 
if (is_single()) {
    echo ' single';
}
?>
 group">
	                        <?php 
yit_string("<h1 class=\"post-title\">", yit_decode_title($title), "</h1>");
?>
	                        <?php 
the_content();
?>
	                    </div>
		                
	                    <?php 
wp_link_pages();
?>
	                    
	                    <div class="clear"></div>
	                    
	                	<?php 
if (is_paged() && is_single()) {
    previous_post_link();
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:31,代码来源:service.php


示例17: esc_attr

?>
 value="<?php 
echo esc_attr($value);
?>
" <?php 
if (isset($std)) {
    ?>
data-std="<?php 
    echo $std;
    ?>
"<?php 
}
?>
" />
                <?php 
yit_string('<span class="description">', $desc, '</span>');
?>
            </span>
        </div>            
            
        <script type="text/javascript" charset="utf-8">
            jQuery(document).ready( function( $ ) {
            	$('#<?php 
echo $id;
?>
').spinner({
            		<?php 
if (isset($min)) {
    ?>
min: <?php 
    echo $min;
开发者ID:lieison,项目名称:IndustriasFenix,代码行数:31,代码来源:number.php


示例18: yit_post_id

 * 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
 */
global $post;
$post_id = yit_post_id();
$slogan = yit_get_post_meta($post_id, '_slogan');
$sub_slogan = yit_get_post_meta($post_id, '_sub-slogan');
if ($slogan) {
    $tag_slogan = apply_filters('yit_page_slogan_tag', 'h2');
    $tag_sub_slogan = apply_filters('yit_page_sub_slogan_tag', 'h3');
    ?>
    <!-- SLOGAN -->
    <div class="slogan">
    <?php 
    do_action('yit_before_slogan');
    yit_string('<' . $tag_slogan . '>', yit_decode_title($slogan), '</' . $tag_slogan . '>');
    if ($sub_slogan) {
        do_action('yit_before_sub_slogan');
        yit_string('<' . $tag_sub_slogan . '>', yit_decode_title($sub_slogan), '</' . $tag_sub_slogan . '>');
    }
    ?>
    	<div class="border margin-top"></div>
    	<div class="border"></div>
    	<div class="border"></div> 
    </div>
<?php 
}
?>
  
开发者ID:zgomotos,项目名称:Bazar,代码行数:30,代码来源:slogan.php


示例19: array

?>
        					<div style="display:none;">
        						<?php 
$count = 0;
$containers = array();
yit_set_slider_loop($this->shortcode_atts['name']);
$i = 1;
while (yit_have_slide()) {
    $containers[$i][] = yit_slide_get('featured-content', array('container' => false));
    if ($i == $nslides) {
        $i = 0;
    }
    $i++;
}
foreach ($containers as $i => $img) {
    yit_string('<div id="rm_container_' . $i . '">', "\n    " . implode("\n    ", $img) . "\n", '</div>');
}
?>
        					</div>
        				</div>
        				
        				<!--<div class="rm_controls">
        					<a id="rm_small_next" href="#" class="rm_small_next"></a>
        					<a id="rm_small_prev" href="#" class="rm_small_prev"></a>
        				
        					<a id="rm_play" href="#" class="rm_play"><?php 
_e('Play', 'yit');
?>
</a>
        					<a id="rm_pause" href="#" class="rm_pause"><?php 
_e('Pause', 'yit');
开发者ID:jayeshnair,项目名称:ctp,代码行数:31,代码来源:slider.php


示例20: yit_ajax_portfolio_thumbs

 /**
  * Return JSON well formatted portfolio work
  * 
  * @param array $work
  * @return string
  * @since 1.0.0
  */
 function yit_ajax_portfolio_thumbs()
 {
     $work = $_POST['work'];
     $type = $_POST['type'];
     //thumb
     $thumb_output = '';
     $lightbox = $_POST['overlay'];
     if (isset($work['video_url']) && $work['video_url']) {
         list($video_type, $video_id) = explode(':', yit_video_type_by_url($work['video_url']));
         if ($video_type == 'youtube') {
             $video_url = 'http://www.youtube.com/embed/' . $video_id . '?width=640&height=480&iframe=true';
         } else {
             if ($video_type == 'vimeo') {
                 $video_url = 'http://player.vimeo.com/video/' . $video_id;
             }
         }
         $thumb_output = do_shortcode("[{$video_type} video_id=\"{$video_id}\" width=\"100%\" height=\"100%\"]");
     } elseif (!empty($work['extra-images'])) {
         $thumb_output = '<div class="extra-images-slider"><ul class="slides">';
         $thumb_size = $type == 'portfolio' ? 'thumb_medium_portfolio_thumbs' : 'section_portfolio';
         array_unshift($work['extra-images'], $work['item_id']);
         foreach ($work['extra-images'] as $image_id) {
             $thumb_output .= '<li><div class="picture_overlay">';
             $thumb_output .= yit_image("id={$image_id}&size={$thumb_size}", false);
             //wp_get_attachment_image( $image_id, $thumb_size );
             if ($lightbox) {
                 $thumb = yit_image("id={$image_id}&output=url", false);
                 $thumb_output .= '<div class="overlay"><div><p>';
                 $thumb_output .= '<a href="' . $thumb . '" rel="lightbox_thumbs"><img src="' . get_template_directory_uri() . '/images/icons/zoom.png" alt="' . __('Open Lightbox', 'yit') . '" /></a>';
                 $thumb_output .= '</p></div></div>';
             }
             $thumb_output .= '</div></li>';
         }
         $thumb_output .= '</ul></div>';
     } else {
         $thumb_size = $type == 'portfolio' ? 'thumb_medium_portfolio_thumbs' : 'section_portfolio';
         $thumb_output = '<div class="picture_overlay">';
         $thumb_output .= yit_image("id={$work['item_id']}&size={$thumb_size}", false);
         //wp_get_attachment_image( $work['item_id'], $thumb_size );
         if ($lightbox) {
             $thumb_output .= '<div class="overlay"><div><p>';
             $thumb_output .= '<a href="' . $work['image'] . '" rel="lightbox_thumbs"><img src="' . get_template_directory_uri() . '/images/icons/zoom.png" alt="' . __('Open Lightbox', 'yit') . '" /></a>';
             $thumb_output .= '</p></div></div>';
         }
         $thumb_output .= '</div>';
     }
     //content
     $thumb_content = '';
     if ($type != 'portfolio') {
         $thumb_content = '<h3 class="title">' . yit_decode_title($work['title']) . '</h3>';
         if (isset($work['subtitle']) && $work['subtitle']) {
             $thumb_content .= '<h4 class="subtitle">' . yit_decode_title($work['subtitle']) . '</h4>';
         }
     }
     $thumb_content .= yit_clean_text($work['text']);
     //meta
     $meta_content = '';
     $customer = $work['customer'];
     $skills = $work['skills'];
     $skills_label = empty($work['skills_label']) ? yit_string('<strong>', __('Skills: ', 'yit'), '</strong>', 0) : yit_string('<strong>', $work['skills_label'], '</strong>', 0) . ': ';
     $website = $work['website_name'] ? $work['website_name'] : $work['website_url'];
     $website_url = $work['website_url'];
     $year = $work['year'];
     $terms = isset($work['terms']) ? $work['terms'] : '';
     $meta_content = '<ul>';
     if ($terms) {
         $terms_plain = '';
         $categories = $work['categories'];
         foreach ($terms as $term) {
             $terms_plain .= $categories[$term] . ', ';
         }
         $terms_plain = substr($terms_plain, 0, strlen($terms_plain) - 2);
         $icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/categories.png" alt="categories" /></span>';
         $meta_content .= '<li class="categories">' . $icon . yit_string('<strong>', __('Categories: ', 'yit'), '</strong>', 0) . $terms_plain . '</li>';
     }
     if ($customer) {
         $icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/customer.png" alt="customer" /></span>';
         $meta_content .= '<li class="customer">' . $icon . yit_string('<strong>', __('Customer: ', 'yit'), '</strong>', 0) . $customer;
         if ($website_url) {
             $meta_content .= ' - <a href="' . $website_url . '">' . $website . '</a>';
         }
         $meta_content .= '</li>';
     }
     if ($skills) {
         $icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/project.png" alt="skills" /></span>';
         $meta_content .= '<li class="skills">' . $icon . $skills_label . $skills . '</li>';
     }
     if ($year) {
         $icon = '<span><img src="' . YIT_THEME_ASSETS_URL . '/images/year.png" alt="year" /></span>';
         $meta_content .= '<li class="year">' . $icon . yit_string('<strong>', __('Year: ', 'yit'), '</strong>', 0) . $year . '</li>';
     }
     echo json_encode(array('thumb' => $thumb_output, 'content' => $thumb_content, 'meta' => $meta_content, 'title' => yit_decode_title($work['title'])));
     die;
//.........这里部分代码省略.........
开发者ID:allyeastman,项目名称:studio-sapphire,代码行数:101,代码来源:functions-template.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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