本文整理汇总了PHP中yit_string函数的典型用法代码示例。如果您正苦于以下问题:PHP yit_string函数的具体用法?PHP yit_string怎么用?PHP yit_string使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了yit_string函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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>' ); ?>
示例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
示例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">
示例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;
}
示例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');
?>
示例6: yit_get_sidebar_layout
<?php
/**
* Your Inspiration Themes
*
* @package WordPress
* @subpackage Your Inspiration Themes
* @author Your Inspiration Themes Team <info@yithemes.com>
*
* 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>
示例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>";
//.........这里部分代码省略.........
示例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";
示例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>
示例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>');
}
示例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;
示例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>
示例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
示例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
示例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; ?>