Пример #1
0
<?php

$options = get_seo_options();
if ($options['seo_date'] == 'update' && get_mtime('c')) {
    //かつ更新日がある場合
    ?>
    <span class="post-date"><i class="fa fa-clock-o fa-fw"></i><?php 
    the_time('Y/n/j');
    ?>
</span>
    <span class="post-update"><i class="fa fa-history fa-fw"></i><time class="entry-date date updated" datetime="<?php 
    the_time('c');
    ?>
"><?php 
    if ($mtime = get_mtime('Y/n/j')) {
        echo $mtime;
    }
    ?>
</time></span>
<?php 
} else {
    ?>
  <span class="post-date"><i class="fa fa-clock-o fa-fw"></i><time class="entry-date date updated" datetime="<?php 
    the_time('c');
    ?>
"><?php 
    the_time('Y/n/j');
    ?>
</time></span>
  <?php 
    if (get_mtime('c') != null) {
Пример #2
0
function is_seo_date_update()
{
    $options = get_seo_options();
    return $options['seo_date'] == 'update';
}