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 
}
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;
}
  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;   
  }
Example #4
0
 /**
  * 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;
     }
 }
 /**
  * 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;
     }
 }
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>
Example #7
0
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;
    }
}
			<?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 
    }
Example #9
0
<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>
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();
            $elapse = time() - $check_time;
            $new_mark = '';
            if ($elapse < $red_sec) {
                $new_mark = '<em style="color: red; font-size: small;">New! </em>';
            } else {
                if ($elapse < $green_sec) {
                    $new_mark = '<em style="color: green; font-size: small;">New! </em>';
                }
            }
            $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, 'new_mark' => $new_mark, '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++;
        }
        $block['data_count'] = $item_no;
        //xml unserialise error
    }
    return $block;
}
function popular_posts_block($options)
{
    $mydirname = empty($options[0]) ? 'xpress' : $options[0];
    $this_template = empty($options[1]) ? 'db:' . $mydirname . '_block_popular.html' : trim($options[1]);
    $disp_count = empty($options[2]) ? '10' : $options[2];
    $show_month_range = empty($options[3]) ? '0' : $options[3];
    $date_format = empty($options[4]) ? '' : $options[4];
    $time_format = empty($options[5]) ? '' : $options[5];
    $tag_select = $options[6];
    $cat_select = empty($options[7]) ? '0' : $options[7];
    $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 (array_search(0, $selected) === 0) {
        $cat_select = 0;
    }
    $cat_select;
    $block = array();
    $item_no = 0;
    $selected_author_id = xpress_selected_author_id('echo=0');
    global $wpdb, $wp_query, $xoops_db;
    $db_prefix = get_wp_prefix();
    $post_tb = $wpdb->posts;
    $view_tb = $db_prefix . 'views';
    $user_tb = $db_prefix . 'users';
    $term_relationships_tb = $wpdb->term_relationships;
    // upper 2.3
    $term_taxonomy = $wpdb->term_taxonomy;
    // upper 2.3
    $terms_tb = $wpdb->terms;
    // upper 2.3
    $post2cat_tb = $wpdb->post2cat;
    //under 2.3
    $categories_tb = $wpdb->categories;
    //under 2.3
    include $mydirpath . '/wp-includes/version.php';
    $select = "SELECT {$view_tb}.post_views, {$post_tb}.ID, {$post_tb}.post_title, {$post_tb}.post_date";
    if ($wp_db_version >= 6124) {
        $from = " FROM (((";
        $from .= " {$post_tb} LEFT JOIN {$view_tb} ON {$post_tb}.ID = {$view_tb}.post_id)";
        $from .= " INNER JOIN {$term_relationships_tb} ON {$post_tb}.ID = {$term_relationships_tb}.object_id)";
        $from .= " INNER JOIN {$term_taxonomy} ON {$term_relationships_tb}.term_taxonomy_id = {$term_taxonomy}.term_taxonomy_id)";
        $from .= " INNER JOIN {$terms_tb} ON {$term_taxonomy}.term_id = {$terms_tb}.term_id ";
        $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;
}
<?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 
Example #13
0
        }
        ?>
				-->

				<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');
        ?>
 <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 
    }
    ?>
Example #15
0
		<?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();
        ?>
Example #16
0
 /**
  * This method outputs the item scope for SINGLE templates. If you are looking for the modules @see td_module::get_item_scope_meta()
  * @updated 23 july 2015
  *  - if the module that uses this class is not on a single page, we use the @see td_module::get_item_scope_meta() this allows
  * us to output normal module item scope insted of no item scope like it was before this update
  * @updated 16 december 2015
  * - removed structured data from modules, now it displays only on single and it returns the current post data
  * - no more interference with the itemprop's coming from modules
  * - all single structured data is now gathered here
  * @return string
  */
 function get_item_scope_meta()
 {
     // don't display meta on pages
     if (!is_single()) {
         return '';
     }
     // determine publisher name - use author name if there's no blog name
     $td_publisher_name = get_bloginfo('name');
     if (empty($td_publisher_name)) {
         $td_publisher_name = esc_attr(get_the_author_meta('display_name', $this->post->post_author));
     }
     // determine publisher logo
     $td_publisher_logo = td_util::get_option('tds_logo_upload');
     $buffy = '';
     //the vampire slayer
     // author
     $buffy .= '<span style="display: none;" itemprop="author" itemscope itemtype="https://schema.org/Person">';
     $buffy .= '<meta itemprop="name" content="' . esc_attr(get_the_author_meta('display_name', $this->post->post_author)) . '">';
     $buffy .= '</span>';
     // datePublished
     $td_article_date_unix = get_the_time('U', $this->post->ID);
     $buffy .= '<meta itemprop="datePublished" content="' . date(DATE_W3C, $td_article_date_unix) . '">';
     // dateModified
     $buffy .= '<meta itemprop="dateModified" content="' . the_modified_date('c', '', '', false) . '">';
     // mainEntityOfPage
     $buffy .= '<meta itemscope itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" itemid="' . get_permalink($this->post->ID) . '"/>';
     // publisher
     $buffy .= '<span style="display: none;" itemprop="publisher" itemscope itemtype="https://schema.org/Organization">';
     $buffy .= '<span style="display: none;" itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">';
     $buffy .= '<meta itemprop="url" content="' . $td_publisher_logo . '">';
     $buffy .= '</span>';
     $buffy .= '<meta itemprop="name" content="' . $td_publisher_name . '">';
     $buffy .= '</span>';
     // headline @todo we may improve this one to use the subtitle or excerpt? - We could not find specs about what it should be.
     $buffy .= '<meta itemprop="headline " content="' . esc_attr($this->post->post_title) . '">';
     // featured image
     $td_image = array();
     if (!is_null($this->post_thumb_id)) {
         /**
          * from google documentation:
          * A URL, or list of URLs pointing to the representative image file(s). Images must be
          * at least 160x90 pixels and at most 1920x1080 pixels.
          * We recommend images in .jpg, .png, or. gif formats.
          * https://developers.google.com/structured-data/rich-snippets/articles
          */
         $td_image = wp_get_attachment_image_src($this->post_thumb_id, 'full');
     } else {
         // when the post has no image use the placeholder
         $td_image[0] = get_template_directory_uri() . '/images/no-thumb/td_meta_replacement.png';
         $td_image[1] = '1068';
         $td_image[2] = '580';
     }
     // ImageObject meta
     if (!empty($td_image[0])) {
         $buffy .= '<span style="display: none;" itemprop="image" itemscope itemtype="https://schema.org/ImageObject">';
         $buffy .= '<meta itemprop="url" content="' . $td_image[0] . '">';
         $buffy .= '<meta itemprop="width" content="' . $td_image[1] . '">';
         $buffy .= '<meta itemprop="height" content="' . $td_image[2] . '">';
         $buffy .= '</span>';
     }
     // if we have a review, we must add additional stuff
     if ($this->is_review) {
         // the item that is reviewd
         $buffy .= '<span style="display: none;" itemprop="itemReviewed" itemscope itemtype="https://schema.org/Thing">';
         $buffy .= '<meta itemprop="name " content = "' . $this->title_attribute . '">';
         $buffy .= '</span>';
         if (!empty($this->td_review['review'])) {
             $buffy .= '<meta itemprop="reviewBody" content = "' . esc_attr($this->td_review['review']) . '">';
         } else {
             //we have no review text :| get a excerpt for the about meta thing
             if ($this->post->post_excerpt != '') {
                 $td_post_excerpt = $this->post->post_excerpt;
             } else {
                 $td_post_excerpt = td_util::excerpt($this->post->post_content, 45);
             }
             $buffy .= '<meta itemprop="reviewBody" content = "' . esc_attr($td_post_excerpt) . '">';
         }
         // review rating
         $buffy .= '<span style="display: none;" class="td-page-meta" itemprop="reviewRating" itemscope itemtype="' . td_global::$http_or_https . '://schema.org/Rating">';
         $buffy .= '<meta itemprop="worstRating" content = "1">';
         $buffy .= '<meta itemprop="bestRating" content = "5">';
         $buffy .= '<meta itemprop="ratingValue" content = "' . td_review::calculate_total_stars($this->td_review) . '">';
         $buffy .= ' </span>';
     }
     return $buffy;
 }
/**
 * Output the posts microdata in the source code.
 *
 * This micordata is used by things like Google as a standard way of declaring things like telephone numbers etc.
 *
 * @global bool $preview True of on a preview page. False if not.
 * @global object $post The current post object.
 * @since 1.0.0
 * @package GeoDirectory
 */
function geodir_action_details_micordata()
{
    global $post, $preview;
    if (!$preview) {
        $c_url = geodir_curPageURL();
        $c_url = strtok($c_url, "#");
        $c_url = strtok($c_url, "?");
        ?>
        <span style="display:none;" class="url"><?php 
        echo $c_url;
        ?>
</span>
        <span class="updated" style="display:none;"><?php 
        the_modified_date('c');
        ?>
</span>
        <span class="vcard author" style="display:none;">
	<span class="fn"><?php 
        echo get_the_author();
        ?>
</span>
    <span class="org"><?php 
        the_title();
        ?>
</span>
    <span class="role"><?php 
        _e('Admin', GEODIRECTORY_TEXTDOMAIN);
        ?>
</span>
</span>
        <meta itemprop="name" content="<?php 
        the_title_attribute();
        ?>
"/>

        <meta itemprop="url" content="<?php 
        echo $c_url;
        ?>
"/>
        <?php 
        if ($post->geodir_contact) {
            echo '<meta itemprop="telephone" content="' . $post->geodir_contact . '" />';
        }
    }
}
Example #18
0
    ?>
</a><a href="#" onclick="copy_code('<?php 
    the_permalink();
    ?>
'); return false;"> +复制链接</a></li>
	<?php 
} else {
    ?>
	<li><strong>版权声明:</strong>本站原创文章,由<?php 
    the_author_posts_link('namefl');
    ?>
发表在<?php 
    the_category(', ');
    ?>
分类下,于<?php 
    the_modified_date('Y年m月d日');
    ?>
最后更新</li>
	<li><strong>转载请注明:</strong><a href="<?php 
    the_permalink();
    ?>
" rel="bookmark" title="本文固定链接 <?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
 | <?php 
    bloginfo('name');
    ?>
</a><a href="#" onclick="copy_code('<?php 
 /**
  * Display column data
  * @param $columns
  * @return array
  */
 public static function display_columns($column)
 {
     global $post;
     if ($post->post_type != 'landing-page') {
         return;
     }
     switch ($column) {
         case 'ID':
             echo $post->ID;
             break;
         case 'thumbnail-lander':
             $template = get_post_meta($post->ID, 'lp-selected-template', true);
             $permalink = get_permalink($post->ID);
             $datetime = the_modified_date('YmjH', null, null, false);
             $permalink = $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 {
                     if (file_exists(LANDINGPAGES_UPLOADS_PATH . $template . '/thumbnail.jpg')) {
                         $thumbnail = LANDINGPAGES_UPLOADS_URLPATH . $template . '/thumbnail.jpg';
                     } else {
                         $thumbnail = LANDINGPAGES_URLPATH . 'templates/' . $template . '/thumbnail.png';
                     }
                 }
             } else {
                 $thumbnail = 'http://s.wordpress.com/mshots/v1/' . urlencode(esc_url($permalink)) . '?w=140';
             }
             echo "<a title='" . __('Click to Preview this variation', 'landing-pages') . "' class='thickbox' href='" . $permalink . "?lp-variation-id=0&iframe_window=on&post_id=" . $post->ID . "&TB_iframe=true&width=640&height=703' target='_blank'><img src='" . $thumbnail . "' style='width:155px;height:110px;' title='Click to Preview'></a>";
             break;
         case "stats":
             self::show_stats();
             break;
         case "impressions":
             echo self::show_aggregated_stats("impressions");
             break;
         case "actions":
             echo self::show_aggregated_stats("actions");
             break;
         case "cr":
             echo self::show_aggregated_stats("cr") . "%";
             break;
         case "template":
             $template_used = Landing_Pages_Variations::get_current_template($post->ID);
             echo $template_used;
             break;
     }
 }
Example #20
0
				
					<?php 
    /* <a href="<?php echo get_the_permalink(); ?>"><img src="<?php echo $image_attributes[0]; ?>" width="100%" /></a> */
    ?>
				</div>
				<!--/.image-video-->
				<div class="content">
					<h3><a href="<?php 
    echo get_the_permalink();
    ?>
"><?php 
    echo get_title(25);
    ?>
</a></h3>
					<p class="updated"><?php 
    the_modified_date('M j, Y');
    ?>
</p>
					<p><?php 
    echo get_excerpt(80);
    ?>
</p>
				</div>
				<!--/.content-->
			</article>
			<?php 
    //endwhile; wp_reset_postdata();
}
wp_reset_postdata();
?>
			<a href="#" id="btn-show-more">Show More</a>
Example #21
0
 /**
  * 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) {
         /**
          * Image
          */
         case 'image':
             // Get Gallery Images.
             $slider_data = get_post_meta($post_id, '_sol_slider_data', true);
             if (!empty($slider_data['slider']) && is_array($slider_data['slider'])) {
                 $image = reset($slider_data['slider']);
                 switch ($image['type']) {
                     case 'image':
                         echo '<img src="' . $image['src'] . '" width="75" /><br />';
                         break;
                     case 'video':
                         echo '<img src="' . plugins_url('assets/images/video.png', $this->base->file) . '" width="75" /><br />';
                         break;
                     case 'html':
                         echo '<img src="' . plugins_url('assets/images/html.png', $this->base->file) . '" width="75" /><br />';
                         break;
                 }
                 printf(_n('%d Image', '%d Slides', count($slider_data['slider']), 'soliloquy'), count($slider_data['slider']));
             }
             break;
             /**
              * Shortcode
              */
         /**
          * Shortcode
          */
         case 'shortcode':
             echo '<code id="soliloquy-shortcode-' . $post_id . '">[soliloquy id="' . $post_id . '"]</code>';
             echo '<a class="soliloquy-clipboard" href="#" data-clipboard-target="#soliloquy-shortcode-' . $post_id . '"">' . __('Copy to clipboard', 'soliloquy') . '</a>';
             // Hidden fields are for Quick Edit
             // class is used by assets/js/admin.js to remove these fields when a search is about to be submitted, so we dont' get long URLs
             echo '
             <input class="soliloquy-quick-edit" type="hidden" name="_soliloquy_' . $post_id . '[slider_theme]" value="' . $this->metabox->get_config('slider_theme') . '" />
             <input class="soliloquy-quick-edit" type="hidden" name="_soliloquy_' . $post_id . '[transition]" value="' . $this->metabox->get_config('transition') . '" />';
             break;
             /**
              * Template
              */
         /**
          * Template
          */
         case 'template':
             echo '<code id="soliloquy-code-' . $post_id . '">if ( function_exists( \'Soliloquy\' ) ) { Soliloquy( \'' . $post_id . '\' ); }</code>';
             echo '<a class="soliloquy-clipboard" href="#" data-clipboard-target="#soliloquy-code-' . $post_id . '"">' . __('Copy to clipboard', 'soliloquy') . '</a>';
             break;
             /**
              * Posts
              */
         /**
          * Posts
          */
         case 'slides':
             $slider_data = get_post_meta($post_id, '_sol_slider_data', true);
             if (!empty($slider_data['slider']) && is_array($slider_data['slider'])) {
                 printf(_n('%d Slide', '%d Slides', count($slider_data['slider']), 'soliloquy'), count($slider_data['slider']));
             }
             $posts = get_post_meta($post_id, '_eg_in_posts', true);
             if (is_array($posts)) {
                 foreach ($posts as $in_post_id) {
                     echo '<a href="' . get_permalink($in_post_id) . '" target="_blank">' . get_the_title($in_post_id) . '</a><br />';
                 }
             }
             break;
             /**
              * Last Modified
              */
         /**
          * Last Modified
          */
         case 'modified':
             the_modified_date();
             break;
     }
 }
	</nav><!-- #nav-single -->
</div>
<!--右侧-->
<div class="cta2">
	<div class="nav_rt border_top"><span class="spn1"><a href="./?cat=9">སྲོལ་རྒྱུན་རིག་གནས།</a></span><span class="spn2"><a href="./?cat=7">དགེ་ལས་ཁོར་སྲུང་།</a></span></div>
	<!--分栏3-->
	<div class="column coln4 cat_title">
		<!--本分类的内容列表-->
		<h1>གསར་འགྱུར་གནས་ཚུལ།</h1>
		<?php 
global $post;
$myposts = get_posts('numberposts=10&offset=0&category=' . $cat);
foreach ($myposts as $post) {
    ?>
		<p><?php 
    the_modified_date('m-j');
    ?>
 <a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
		<?php 
    if (get_field('mid') != "0") {
        echo "  ཕབ་ལེན།\t";
    }
    ?>
</a>
		</p>
		<?php 
Example #23
0
global $lightning_theme_options;
?>

<?php 
// Post update
$meta_hidden_update = isset($lightning_theme_options['postUpdate_hidden']) && $lightning_theme_options['postUpdate_hidden'] ? ' entry-meta_hidden' : '';
?>

<span class="entry-meta_items entry-meta_updated<?php 
echo $meta_hidden_update;
?>
">/ <?php 
_e('Last updated', 'lightning');
?>
 : <span class="updated"><?php 
the_modified_date('');
?>
</span></span>

<?php 
// Post author
$meta_hidden_author = isset($lightning_theme_options['postAuthor_hidden']) && $lightning_theme_options['postAuthor_hidden'] ? ' entry-meta_hidden' : '';
?>

<span class="vcard author entry-meta_items entry-meta_items_author<?php 
echo $meta_hidden_author;
?>
"><span class="fn"><?php 
the_author();
?>
</span></span>
Example #24
0
    /** End Date & Time **/
    ?>

						<?php 
    /** Begin Modified Date **/
    ?>

						<?php 
    if ($gantry->get('page-meta-modified-enabled', '0')) {
        ?>

							<dd class="modified"> <?php 
        if ($gantry->get('page-meta-modified-prefix') != '') {
            echo $gantry->get('page-meta-modified-prefix') . ' ';
        }
        the_modified_date($gantry->get('page-meta-modified-format', 'd F Y'));
        ?>
</dd>

						<?php 
    }
    ?>

						<?php 
    /** End Modified Date **/
    ?>

						<?php 
    /** Begin Author **/
    ?>
					
Example #25
0
                ?>
"><?php 
                echo ts_get_the_category('portfolio-category', 'text');
                ?>
</p></div>
                                    <?php 
            } elseif ($post_type == 'page') {
                ?>
                                    <div class="entry-info page-entry-info"><p class="small-size <?php 
                echo esc_attr($text_align);
                ?>
"><?php 
                _e('Page last modified:', 'ThemeStockyard');
                ?>
 <?php 
                the_modified_date();
                ?>
</p></div>
                                    <?php 
            } elseif ($post_type == 'post') {
                ?>
                                    <div class="entry-info post-entry-info"><p class="small-size <?php 
                echo esc_attr($text_align);
                ?>
 clearfix"><?php 
                // author link
                echo '<span class="meta-item meta-item-author subtle-text-color stylized-meta">';
                echo __('By', 'ThemeStockyard') . ' ';
                echo '<a href="' . esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '" class="author vcard">';
                if (isset($atts['show_author_avatar']) && $atts['show_author_avatar']) {
                    echo get_avatar(get_the_author_meta('user_email'), 24);
Example #26
0
"><?php 
        echo ts_truncate_trim($content, $excerpt_length);
        ?>
</p>
                                    <p class="time color-white hidden"><span class="meta-item meta-item-date published" title="<?php 
        echo get_the_date('Y-m-d\\TH:i:s');
        ?>
"><?php 
        echo get_the_date('F j');
        ?>
</span></p>
                                    <p class="hidden"><span class="meta-item meta-item-date updated" title="<?php 
        echo get_the_modified_date('Y-m-d\\TH:i:s');
        ?>
"><?php 
        the_modified_date('F j, Y');
        ?>
</span></p>
                                    <p class="small-size subtle-text-color stylized-meta <?php 
        echo esc_attr($text_align);
        ?>
"><?php 
        _e('By', 'ThemeStockyard');
        ?>
 <?php 
        echo '<span class="meta-item meta-item-author author vcard">';
        echo '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '" class="color-white fn">';
        echo get_the_author_meta('display_name') . '</a></span>';
        ?>
</p>
                                    <div><a href="<?php 
Example #27
0
    /**
     * Display template preview metabox
     */
    public static function display_template_preview_metabox()
    {
        global $post;
        $template = Landing_Pages_Variations::get_current_template($post->ID);
        $permalink = Landing_Pages_Variations::get_variation_permalink($post->ID);
        $datetime = the_modified_date('YmjH', null, null, false);
        $permalink = add_query_arg(array('dt' => $datetime, 'dont_save' => true), $permalink);
        ?>

        <style type="text/css">
            <?php 
        /* hide featured image slot if not default template */
        if ($template != 'default') {
            echo '#postimagediv {display:none;}';
        }
        ?>
            #lp-thumbnail-sidebar-preview {
                background: transparent !important;
            }
            #lp-thumbnail-sidebar-preview .handlediv, #lp-thumbnail-sidebar-preview .hndle {
                display: none !important;
            }
            #lp-thumbnail-sidebar-preview .inside {
                padding: 0px !important;

                border: none !important;
                margin-top: -33px !important;
                margin-bottom: -10px;
                overflow:hidden;
            }
            #lp-thumbnail-sidebar-preview  .zoomer-wrapper {
                vertical-align: top;
                margin-top:33px !important;
            }
            #lp-thumbnail-sidebar-preview iframe#zoomer {
                margin-top: -30px;
            }
        </style>
        <?php 
        if (isset($_GET['new-variation'])) {
            return;
        }
        if (isset($_GET['inbound-editor']) && $_GET['inbound-editor'] !== true) {
            return;
        }
        // default
        echo "<iframe src='{$permalink}' id='zoomer'></iframe>";
    }
Example #28
0
function xpress_grobal_recent_posts($num = 10,$exclusion_blog = 0, $shown_for_each_blog = false)
{
	global $wpdb, $wp_rewrite , $switched , $blog_id;
	if (empty($date_format)) $date_format = get_settings('date_format');
	if (empty($time_format)) $time_format = get_settings('time_format');
	$exclusion = explode(',' , $exclusion_blog);


	$first_blogid = $blog_id;
	$num = (int)$num;
//	$wp_query->in_the_loop = true;		//for use the_tags() in multi lopp 
	$data_array = array();
	if (xpress_is_multiblog()){
		$blogs = get_blog_list(0,'all');
		foreach ($blogs AS $blog) {
			if (!in_array(0, $exclusion) && in_array($blog['blog_id'], $exclusion)) continue;
			switch_to_blog($blog['blog_id']);
			$wp_rewrite->init();  // http://core.trac.wordpress.org/ticket/12040 is solved, it is unnecessary.

				if (empty($num)){
					query_posts("post_status=publish");
				} else {
					query_posts("showposts=$num&post_status=publish");
				}
				if (have_posts()){
					while(have_posts()){
						$data = new stdClass();
						
						the_post();
						ob_start();
							the_ID();
							$data->post_id = ob_get_contents();
						ob_end_clean();
						
						$data->blog_id = $blog['blog_id'];
						$data->blog_name = get_bloginfo('name');
						$data->blog_url = get_bloginfo('url');
						$data->blog_link = '<a href="' . $data->blog_url . '">' . $data->blog_name . '</a>' ;


						ob_start();
							the_title();
							$data->title = ob_get_contents();
						ob_end_clean();
						$data->post_permalink = get_blog_permalink($data->brog_id, $data->post_id);
						$data->title_link = '<a href="' . $data->post_permalink . '">' . $data->title . '</a>' ;

						ob_start();
							the_author_posts_link();
							$data->post_author = ob_get_contents();
						ob_end_clean();

						ob_start();
							the_category(' &bull; ');
							$data->post_category = ob_get_contents();
						ob_end_clean();	
						
						if (function_exists('the_tags')){
							ob_start();
								the_tags(__('Tags:', 'xpress') . ' ',' &bull; ','');
								$data->post_tags = ob_get_contents();
							ob_end_clean();	
						} else {
							$data->tags = '';
						}

						$data->the_content = xpress_the_content('echo=0');
						
						ob_start();
							the_content();
							$data->the_full_content = ob_get_contents();
						ob_end_clean();
						
						ob_start();
							the_modified_date($date_format);
							$data->post_modified_date = ob_get_contents();
						ob_end_clean();
							
						ob_start();
							the_modified_date($time_format);
							$data->post_modified_time = ob_get_contents();
						ob_end_clean();
						$data->post_modified_date_time = $data->post_modified_date . ' ' . $data->post_modified_time;
						
						ob_start();
							the_time('U');
							$data->post_unix_time = ob_get_contents();
						ob_end_clean();
						
						ob_start();
							the_time($date_format);
							$data->post_date = ob_get_contents();
						ob_end_clean();
						
						ob_start();
							the_time($time_format);
							$data->post_time = ob_get_contents();
						ob_end_clean();
						
						$data->post_date_time = $data->post_date . ' ' . $data->post_time;

						ob_start();
							comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'));
							$data->comments_link = ob_get_contents();
						ob_end_clean();
						
						$data->post_views = xpress_post_views_count('post_id=' . $data->post_id . '&blogid=' . $data->brog_id . '&format=' . __('Views :%d', 'xpress'). '&echo=0');
						if (function_exists('the_qf_get_thumb_one')){
							$data->post_thumbnail = the_qf_get_thumb_one("num=0&width=120&tag=1","",$data->the_full_content);
						} else {
							$data->post_thumbnail = get_the_post_thumbnail(null,'thumbnail');
						}
						$data->author_avatar =get_avatar(get_the_author_meta('ID'),$size = '32');

						$data_array[] = $data;
	        		}  // end whilwe
				} // end if
			restore_current_blog();
//			$wp_rewrite->init();
		} // end foreach
//		switch_to_blog($first_blogid);
		$wp_rewrite->init(); // http://core.trac.wordpress.org/ticket/12040 is solved, it is unnecessary.

		restore_current_blog();
	}
	if (!$shown_for_each_blog){
		usort($data_array, "the_time_cmp");
		if (!empty($num)){
			$data_array = array_slice($data_array,0,$num);
		}
	}
	return $data_array;
}
Example #29
0
    ?>
						<div class="clearfix"></div>
					</div>
					<div class="post-information" style="display: none;">
						<time class="published" datetime="<?php 
    echo get_the_date('Y-d-m H:i:s');
    ?>
"><?php 
    echo get_the_date('Y-d-m H:i:s');
    ?>
</time>
						<time class="updated" datetime="<?php 
    the_modified_date('Y-d-m H:i:s', '', '', true);
    ?>
"><?php 
    the_modified_date('Y-d-m H:i:s', '', '', true);
    ?>
</time>
					</div>
					<div class="clearfix"></div>
				</div>
			<?php 
}
?>
		</div><!-- .entry-meta -->
	</header><!-- .entry-header -->
	<?php 
if (is_search()) {
    ?>
	<div class="entry-summary">
		<?php 
 public function av8_manage_cart_columns($column, $post_id = '')
 {
     global $post;
     $cart = new AV8_Cart_Receipt();
     $cart->load_receipt($post->ID);
     $cart->set_guest_details();
     $title = '';
     switch ($column) {
         /* If displaying the 'duration' column. */
         case 'cartname':
             $suffix = "'s Cart";
             if ($cart->is_guest_order() && $cart->has_guest_details()) {
                 $fullname = ucwords($cart->get_guest_details('billing_first_name')) . ' ' . ucwords($cart->get_guest_details('billing_last_name'));
                 if ($fullname != ' ') {
                     $title .= $fullname;
                 } else {
                     $title .= "Guest";
                 }
                 $title .= $suffix . " (Guest)";
             } elseif ($cart->is_guest_order() && $cart->status() == "Converted" && isset($cart->order)) {
                 $title = ucwords($cart->order->billing_first_name) . ' ' . ucwords($cart->order->billing_last_name) . $suffix . " (Guest)";
             } elseif ($cart->is_guest_order()) {
                 $title = "Guest" . $suffix;
             } elseif ($cart->full_name() != false) {
                 $title = ucwords($cart->full_name()) . $suffix;
             }
             $post_url = admin_url('post.php?post=' . $post->ID . '&action=edit');
             echo __("<a href='{$post_url}'>" . $title . "</a>");
             break;
         case 'post__in':
             /* Get the post meta. */
             $show_custom_state = $cart->status();
             $filter_link = admin_url('edit.php?post_type=carts&status=' . $show_custom_state);
             echo __('<div class="index_status"><mark class="' . strtolower($show_custom_state) . '_index">' . $show_custom_state . '</mark></div>');
             break;
             /* If displaying the 'genre' column. */
         /* If displaying the 'genre' column. */
         case 'updated':
             /* Get the genres for the post. */
             the_modified_date('F j, Y');
             echo " at ";
             the_modified_date('g:i a');
             break;
             /* Just break out of the switch statement for everything else. */
         /* Just break out of the switch statement for everything else. */
         case 'products':
             //$products = $this->extract_cart_products();
             global $woocommerce;
             $cartitems = get_post_meta($post->ID, 'av8_cartitems', true);
             $items_arr = str_replace(array('O:17:"WC_Product_Simple"', 'O:10:"WC_Product"'), 'O:8:"stdClass"', $cartitems);
             if (isset($cartitems) && $cartitems != false) {
                 $order_items = (array) maybe_unserialize($items_arr);
             } else {
                 break;
             }
             $loop = 0;
             if (sizeof($order_items) > 0 && $order_items != false) {
                 foreach ($order_items as $item) {
                     if (function_exists('get_product')) {
                         if (isset($item['variation_id']) && $item['variation_id'] > 0) {
                             $_product = get_product($item['variation_id']);
                         } else {
                             $_product = get_product($item['product_id']);
                         }
                     } else {
                         if (isset($item['variation_id']) && $item['variation_id'] > 0) {
                             $_product = new WC_Product_Variation($item['variation_id']);
                         } else {
                             $_product = new WC_Product($item['product_id']);
                         }
                     }
                     if (isset($_product) && $_product != false) {
                         echo "<a href='" . get_admin_url('', 'post.php?post=' . $_product->id . '&action=edit') . "'>" . $_product->get_title() . "</a>";
                         if (isset($_product->variation_data)) {
                             echo ' (' . woocommerce_get_formatted_variation($_product->variation_data, true) . ')';
                         }
                         if ($item['quantity'] > 1) {
                             echo " x" . $item['quantity'];
                         }
                     }
                     if ($loop < sizeof($order_items) - 1) {
                         echo ", ";
                     }
                     $loop++;
                 }
             } else {
                 echo "<span style='color:lightgray;'>" . __("No Products", "woocommerce_cart_reports") . "</span>";
             }
             break;
         case 'actions':
             $cart->print_cart_actions($cart->status(), $cart->is_guest_order());
             break;
         default:
             break;
     }
 }