コード例 #1
0
ファイル: header.php プロジェクト: anhtuan912/webpro4u.com
<?php

$mh_elegance_lite_options = mh_elegance_lite_theme_options();
?>
<!DOCTYPE html>
<html class="no-js" <?php 
language_attributes();
?>
>
<head>
<meta charset="<?php 
bloginfo('charset');
?>
">
<title><?php 
wp_title('|', true, 'right');
?>
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />
<?php 
wp_head();
?>
</head>
<body <?php 
body_class();
?>
コード例 #2
0
 function mh_elegance_lite_trim_excerpt($text = '')
 {
     $raw_excerpt = $text;
     if ('' == $text) {
         $mh_elegance_lite_options = mh_elegance_lite_theme_options();
         $text = get_the_content('');
         $text = do_shortcode($text);
         $text = apply_filters('the_content', $text);
         $text = str_replace(']]>', ']]&gt;', $text);
         $excerpt_length = apply_filters('excerpt_length', esc_attr($mh_elegance_lite_options['excerpt_length']));
         $excerpt_more = apply_filters('excerpt_more', '...');
         $text = wp_trim_words($text, $excerpt_length, $excerpt_more);
     }
     return apply_filters('wp_trim_excerpt', $text, $raw_excerpt);
 }