当前位置: 首页>>代码示例>>PHP>>正文


PHP the_modified_date函数代码示例

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


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

示例1: lp_thumbnail_metabox

function lp_thumbnail_metabox()
{
    global $post;
    $template = get_post_meta($post->ID, 'lp-selected-template', true);
    $template = apply_filters('lp_selected_template', $template);
    $permalink = get_permalink($post->ID);
    $datetime = the_modified_date('YmjH', null, null, false);
    $permalink = $permalink . '?dt=' . $datetime;
    if (in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1', '::1'))) {
        if (file_exists(LANDINGPAGES_UPLOADS_PATH . $template . '/thumbnail.png')) {
            $thumbnail = LANDINGPAGES_UPLOADS_URLPATH . $template . '/thumbnail.png';
        } else {
            $thumbnail = LANDINGPAGES_URLPATH . 'templates/' . $template . '/thumbnail.png';
        }
    } else {
        $thumbnail = 'http://s.wordpress.com/mshots/v1/' . urlencode(esc_url($permalink)) . '?w=250';
    }
    $permalink = apply_filters('lp_live_screenshot_url', $permalink);
    ?>
	<div >
		<div class="inside" style='margin-left:-8px;'>
			<table>
				<tr>
					<td>
						<?php 
    echo "<a href='{$permalink}' target='_blank' ><img src='{$thumbnail}' style='width:250px;height:250px;' title='" . __('Preview this theme', 'landing-pages') . " ,  ({$template})'></a>";
    ?>
					</td>
				</tr>
			</table>

		</div>
	</div>
	<?php 
}
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:35,代码来源:module.metaboxes.php

示例2: download_date_function

function download_date_function($atts)
{
    $atts = shortcode_atts(array('id' => '', 'format' => 'Y/m/d \\a\\t g:i A', 'type' => ''), $atts, 'download_date');
    if ($atts['id'] != '') {
        $id = $atts['id'];
    } else {
        $id = get_the_ID();
    }
    if ($atts['type'] == 'modified') {
        $date = the_modified_date($atts['format'], '', '', false);
    } else {
        $date = the_date($atts['format'], '', '', false);
    }
    return $date;
}
开发者ID:Bento4Extend,项目名称:EDD-Download-Shortcodes,代码行数:15,代码来源:download_date.php

示例3: page_cache_key

  public static function page_cache_key($date=null) {
    $url = parse_url(get_permalink());
    $path = $url['path'];
    $path =  rtrim(substr($path, 1), '/');
    // replace '/' with '-'
    $path = preg_replace('[\/]', '__', $path);

    if ($path == '') $path = 'home';

    if ($date) {
      $date = date('Ymd_His', strtotime($date));
    } else {
      $date = the_modified_date('Ymd_His', '', '', false);
    }

    $path .= '__'.$date;
    return $path;   
  }
开发者ID:buraksahin59,项目名称:WordPress-FragmentCache,代码行数:18,代码来源:fragment_cache.php

示例4: soliloquy_custom_columns

 /**
  * Add data to the custom columns added to the Soliloquy post type.
  *
  * @since 1.0.0
  *
  * @global object $post The current post object
  * @param string $column The name of the custom column
  * @param int $post_id The current post ID
  */
 public function soliloquy_custom_columns($column, $post_id)
 {
     global $post;
     $post_id = absint($post_id);
     switch ($column) {
         case 'shortcode':
             echo '<code>[soliloquy id="' . $post_id . '"]</code>';
             break;
         case 'template':
             echo '<code>if ( function_exists( \'soliloquy_slider\' ) ) soliloquy_slider( \'' . $post_id . '\' );</code>';
             break;
         case 'images':
             $attachments = get_children(array('post_parent' => $post_id));
             echo count($attachments);
             break;
         case 'modified':
             the_modified_date();
             break;
     }
 }
开发者ID:paarthd,项目名称:gslvpa,代码行数:29,代码来源:Posttype.php

示例5: envira_custom_columns

 /**
  * Add data to the custom columns added to the Envira post type.
  *
  * @since 1.0.0
  *
  * @global object $post  The current post object
  * @param string $column The name of the custom column
  * @param int $post_id   The current post ID
  */
 public function envira_custom_columns($column, $post_id)
 {
     global $post;
     $post_id = absint($post_id);
     switch ($column) {
         case 'shortcode':
             echo '<code>[envira-gallery id="' . $post_id . '"]</code>';
             break;
         case 'template':
             echo '<code>if ( function_exists( \'envira_gallery\' ) ) { envira_gallery( \'' . $post_id . '\' ); }</code>';
             break;
         case 'images':
             $gallery_data = get_post_meta($post_id, '_eg_gallery_data', true);
             echo !empty($gallery_data['gallery']) ? count($gallery_data['gallery']) : 0;
             break;
         case 'modified':
             the_modified_date();
             break;
     }
 }
开发者ID:codeforpakistan,项目名称:PDMA-Emergency,代码行数:29,代码来源:posttype.php

示例6: post_class

post_class('list-item');
?>
>
	<a class="inner" href="<?php 
the_permalink();
?>
">
		<header class="list-item-header">
			<?php 
the_title('<h3 class="lit-item-title">', '</h3>');
?>
			<div cass="list-item-img" style="background-image:url(<?php 
echo $image_url[0];
?>
);"></div>
			<div class="list-item-meta">
				<span>
					<?php 
the_modified_date('d. M Y');
?>
				</span>
			</div>
		</header>
		<section class="list-item-excerpt">
			<?php 
the_excerpt();
?>
		</section>
	</a>
</li>
开发者ID:JeppeSigaard,项目名称:jeppe-wp-theme,代码行数:30,代码来源:list-item.php

示例7: wpdm_sitemap_xml

function wpdm_sitemap_xml()
{
    return;
    global $wpdb;
    $page = basename($_SERVER['REQUEST_URI']);
    if ($page == 'wpdmpro-sitemap.xml') {
        header('Content-type: text/xml');
        echo '<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="' . plugins_url('download-manager/css/sitemap-style.xml') . '"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
        $dls = get_posts("post_type=wpdmpro&posts_per_page=1000");
        foreach ($dls as $wpdm_package) {
            ?>
            <url>
                <loc><?php 
            echo get_permalink($wpdm_package->ID);
            ?>
</loc>
                <lastmod><?php 
            the_modified_date($wpdm_package->ID);
            ?>
</lastmod>
                <changefreq>weekly</changefreq>
                <priority>0.6</priority>
            </url>
        <?php 
        }
        ?>
        </urlset>

        <?php 
        die;
    }
}
开发者ID:jimrucinski,项目名称:Vine,代码行数:33,代码来源:functions.php

示例8: while

			<?php 
    /* Start the Loop */
    ?>
			<?php 
    while (have_posts()) {
        the_post();
        ?>
	<article>
		<header>
				<h1><?php 
        the_title();
        ?>
</h1>
				<p>Last Update: <?php 
        the_modified_date('F j, Y, h:i a T');
        ?>
</p>
		</header>
			<?php 
        hmc_featured_img($post->ID, 'alignleft');
        ?>
	
			<?php 
        the_content();
        ?>

	</article>
	
	<?php 
    }
开发者ID:hmcmathcomp,项目名称:wpdev-hmc-edu,代码行数:30,代码来源:content-single-emergency.php

示例9: bloginfo

<div id="footer-css">

<p><strong>&copy; <?php 
bloginfo('name');
?>
 &amp; its commenters</strong></p> 

<p><strong>Powered by</strong>: <a href="http://wordpress.org">WordPress</a> &#124; <strong>Theme</strong>: <a href="http://onethousandseas.org/scrumty/aabboo">Aabboo</a> &#124; <strong>Validation</strong>: <a href="http://wave.webaim.org/refer">Accessibility</a>, <a href="http://jigsaw.w3.org/css-validator/check?uri=referer">CSS</a>, <a href="http://validator.w3.org/check?uri=referer">XHTML</a></p>

<p><strong>Page last updated</strong>: <?php 
the_modified_date('j M Y');
?>
</p>

</div>

<?php 
wp_footer();
?>

</body>

</html>
开发者ID:jessim,项目名称:Aaron-Twackleworth,代码行数:23,代码来源:footer.php

示例10: recent_posts_list_block

function recent_posts_list_block($options)
{
    $mydirname = empty($options[0]) ? 'xpress' : $options[0];
    $this_template = empty($options[1]) ? 'db:' . $mydirname . '_recent_posts_list_block.html' : trim($options[1]);
    $disp_count = empty($options[2]) ? '10' : $options[2];
    $disp_red = empty($options[3]) ? '1' : $options[3];
    $disp_green = empty($options[4]) ? '7' : $options[4];
    $date_format = empty($options[5]) ? '' : $options[5];
    $time_format = empty($options[6]) ? '' : $options[6];
    $tag_select = $options[7];
    $cat_select = empty($options[8]) ? '0' : $options[8];
    $selected = explode(',', $cat_select);
    $mydirpath = get_xpress_dir_path();
    if (empty($date_format)) {
        $date_format = get_settings('date_format');
    }
    if (empty($time_format)) {
        $time_format = get_settings('time_format');
    }
    if (empty($tag_select)) {
        $tag_where = '';
    } else {
        $tag_where = "tag='{$tag_select}'&";
    }
    if (array_search(0, $selected) === 0) {
        $cat_select = 0;
    }
    $selected_author_id = xpress_selected_author_id('echo=0');
    if (!empty($selected_author_id)) {
        $author_where = "author={$selected_author_id}&";
    } else {
        $author_where = '';
    }
    global $wpdb, $wp_query;
    $block = array();
    $item_no = 0;
    if (!is_null($wpdb)) {
        $wp_query->in_the_loop = true;
        //for use the_tags() in multi lopp
        if ($cat_select) {
            $r = new WP_Query($author_where . $tag_where . "cat={$cat_select}&showposts={$disp_count}&what_to_show=posts&nopaging=0&post_status=publish");
        } else {
            $r = new WP_Query($author_where . $tag_where . "showposts={$disp_count}&what_to_show=posts&nopaging=0&post_status=publish");
        }
        while ($r->have_posts()) {
            $r->the_post();
            ob_start();
            the_ID();
            $post_id = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_title();
            $title = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_permalink();
            $permalink = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_author_posts_link();
            $author = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_category(' &bull; ');
            $category = ob_get_contents();
            ob_end_clean();
            if (function_exists('the_tags')) {
                ob_start();
                the_tags(__('Tags:', 'xpress') . ' ', ' &bull; ', '');
                $tags = ob_get_contents();
                ob_end_clean();
            } else {
                $tags = '';
            }
            ob_start();
            the_modified_date($date_format);
            $post_modified_date = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_modified_date($time_format);
            $post_modified_time = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_time($date_format);
            $post_date = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_time($time_format);
            $post_time = ob_get_contents();
            ob_end_clean();
            ob_start();
            comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'));
            $comments_popup_link = ob_get_contents();
            ob_end_clean();
            $red_sec = $disp_red * 60 * 60 * 24;
            $green_sec = $disp_green * 60 * 60 * 24;
            ob_start();
            the_time('U');
            $check_time = ob_get_contents();
            ob_end_clean();
//.........这里部分代码省略.........
开发者ID:nouphet,项目名称:rata,代码行数:101,代码来源:recent_posts_list_block_theme.php

示例11: popular_posts_block


//.........这里部分代码省略.........
        $where = " WHERE {$post_tb}.post_type = 'post' AND {$post_tb}.post_status = 'publish'";
        //		if (!empty($selected_author_id)){
        //			$where  .= " AND ($post_tb.post_author = $selected_author_id) ";
        //			$where  .= " AND ($post_tb.post_author = 2) ";
        //		}
        if ($cat_select) {
            $where .= " AND ({$term_taxonomy}.term_id IN ({$cat_select}))";
        }
        if (!empty($tag_select)) {
            $tag_id_list = get_tag_id($tag_select);
            if (!empty($tag_id_list)) {
                $where .= " AND ({$term_taxonomy}.term_id IN ({$tag_id_list}))";
            }
        }
    } else {
        $from = " FROM ((";
        $from .= " {$post_tb} LEFT JOIN {$view_tb} ON {$post_tb}.ID = {$view_tb}.post_id)";
        $from .= " LEFT JOIN {$post2cat_tb} ON {$post_tb}.ID = {$post2cat_tb}.post_id)";
        $from .= " INNER JOIN {$user_tb} ON {$post_tb}.post_author = {$user_tb}.ID";
        $where = " WHERE ({$post_tb}.post_status = 'publish') AND  (UNIX_TIMESTAMP({$post_tb}.post_date) <= UNIX_TIMESTAMP())";
        if ($cat_select) {
            $where .= " AND ({$post2cat_tb}.category_id IN ({$cat_select}))";
        }
    }
    if ($show_month_range > 0) {
        $where .= " AND (UNIX_TIMESTAMP({$post_tb}.post_date) >= UNIX_TIMESTAMP(DATE_ADD(CURRENT_DATE, INTERVAL -{$show_month_range} month)))";
    }
    $order_limmit = " GROUP BY {$post_tb}.ID ORDER BY {$view_tb}.post_views DESC LIMIT 0, {$disp_count}";
    $sql = $select . $from . $where . $order_limmit;
    $populars = $wpdb->get_results($sql);
    foreach ($populars as $popular) {
        $wp_query->in_the_loop = true;
        //for use the_tags() in multi lopp
        $r = new WP_Query("p={$popular->ID}");
        if ($r->have_posts()) {
            $r->the_post();
            ob_start();
            the_ID();
            $post_id = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_title();
            $title = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_permalink();
            $permalink = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_author_posts_link();
            $author = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_category(' &bull; ');
            $category = ob_get_contents();
            ob_end_clean();
            if (function_exists('the_tags')) {
                ob_start();
                the_tags(__('Tags:', 'xpress') . ' ', ' &bull; ', '');
                $tags = ob_get_contents();
                ob_end_clean();
            } else {
                $tags = '';
            }
            ob_start();
            the_modified_date($date_format);
            $post_modified_date = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_modified_date($time_format);
            $post_modified_time = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_time($date_format);
            $post_date = ob_get_contents();
            ob_end_clean();
            ob_start();
            the_time($time_format);
            $post_time = ob_get_contents();
            ob_end_clean();
            ob_start();
            comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'));
            $comments_popup_link = ob_get_contents();
            ob_end_clean();
            $post_title = '<a href="' . $permalink . '">' . $title . '</a>';
            $post_date_time = $post_date . ' ' . $post_time;
            $post_modified_date_time = $post_modified_date . ' ' . $post_modified_time;
            $trackback_url = trackback_url(false);
            $post_viwes = xpress_post_views_count('post_id=' . $post_id . '&format=' . __('Views :%d', 'xpress') . '&echo=0');
            //			if (empty($tags)) $tags = __('Not Tag');
            $row_data = array('post_id' => $post_id, 'post_title' => $post_title, 'post_date' => $post_date, 'post_time' => $post_time, 'post_date_time' => $post_date_time, 'post_modified_date' => $post_modified_date, 'post_modified_time' => $post_modified_time, 'post_modified_date_time' => $post_modified_date_time, 'post_author' => $author, 'post_category' => $category, 'post_tags' => $tags, 'post_views' => $post_viwes, 'comment_link' => $comments_popup_link, 'trackback_url' => $trackback_url);
            $block['contents']['item' . $item_no] = $row_data;
            $item_no++;
        }
    }
    // end of foreach
    $block['data_count'] = $item_no;
    //xml unserialise error
    return $block;
}
开发者ID:nouphet,项目名称:rata,代码行数:101,代码来源:popular_posts_block_theme.php

示例12: get_header

<?php

get_header();
?>

	<div class="guide pagecontainer">
		<div id="navbaranchor"></div>
		<section class="guidehead">
			<div class="guideheadcontent">
				<h1><?php 
the_title();
?>
</h1>
				<h5>Updated: <?php 
the_modified_date('F Y');
?>
</h5>
				<a href="<?php 
echo get_permalink($post->post_parent);
?>
">Back to Cache</a>
			</div>
		</section>

		<?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
	  
	      <?php 
开发者ID:shipinggs,项目名称:sutd-student-govt-website,代码行数:31,代码来源:page-parking-information.php

示例13: the_modified_date

        }
        ?>
				-->

				<header class="entry-header">
					<div class="bigDate">
						<div class="day"><?php 
        the_modified_date('j\\<\\s\\u\\p\\>S\\<\\/\\s\\u\\p\\>');
        ?>
</div>
						<div class="month"><?php 
        the_modified_date('F');
        ?>
</div>
						<div class="year"><?php 
        the_modified_date('Y');
        ?>
</div>
					</div>

					<h1 class="entry-title"><?php 
        the_title();
        ?>
</h1>
					<div class="meta">
						<!--
						<time datetime="<?php 
        echo date(DATE_W3C);
        ?>
" pubdate class="updated"><?php 
        the_time('F jS, Y');
开发者ID:adeka,项目名称:BraftonTheme,代码行数:31,代码来源:single.php

示例14: _e

        ?>
 <time class="published" datetime="<?php 
        echo $published_date;
        ?>
"><?php 
        echo $published_date;
        ?>
</time>
              &middot; <?php 
        _e('Updated', 'hueman');
        ?>
 <time class="updated" datetime="<?php 
        the_modified_date(get_option('date_format'));
        ?>
"><?php 
        the_modified_date(get_option('date_format'));
        ?>
</time>
          <?php 
    } else {
        ?>
              <time class="published" datetime="<?php 
        echo $published_date;
        ?>
"><?php 
        echo $published_date;
        ?>
</time>
          <?php 
    }
    ?>
开发者ID:giorgioriccardi,项目名称:hueman,代码行数:31,代码来源:single-author-date.php

示例15: while

		<?php 
    while (have_posts()) {
        the_post();
        ?>

			<?php 
        get_template_part('content', 'single');
        ?>
</div>

	<div id="content" class="site-content" role="main">
<div class="last-edit">Dernière modification : <?php 
        the_modified_author();
        ?>
 le <?php 
        the_modified_date('d/m/Y\\ à G\\hi');
        ?>
</div>
<footer>
<div class="entry-meta entry-footer">
</div>

	<!-- .entry-meta --></footer>

			<div class="share-links">
			<a style="margin-right:15px" target="_blank" title="Envoyer par mail" href="mailto:?subject=<?php 
        the_title_attribute();
        ?>
&body=<?php 
        the_permalink();
        ?>
开发者ID:Jocker666z,项目名称:hepouf,代码行数:31,代码来源:single.php


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