get_lastpostdate

Definition:
function get_lastpostdate($timezone = 'server') {}

Retrieve the date that the last post was published.
The server timezone is the default and is the difference between GMT and server time. The ‘blog’ value is the date when the last post was posted. The ‘gmt’ is when the last post was posted in GMT formatted date.

Parameters

  • string $timezone: The location to get the time. Can be ‘gmt’, ‘blog’, or ‘server’.

Return values

returns:The date of the last post.

Defined filters

  • get_lastpostdate
    apply_filters( 'get_lastpostdate', _get_last_post_time( $timezone, 'date' )

Source code

function get_lastpostdate($timezone = 'server') {

	return apply_filters( 'get_lastpostdate', _get_last_post_time( $timezone, 'date' ), $timezone );

}

1440

get_lastcommentmodified

Definition:
function get_lastcommentmodified($timezone = 'server') {}

The date the last comment was modified.

Parameters

  • string $timezone: Which timezone to use in reference to ‘gmt’, ‘blog’, or ‘server’ locations.

Return values

returns:Last comment modified date.

Source code

function get_lastcommentmodified($timezone = 'server') {

	global $cache_lastcommentmodified, $wpdb;



	if ( isset($cache_lastcommentmodified[$timezone]) )

		return $cache_lastcommentmodified[$timezone];



	$add_seconds_server = date('Z');



	switch ( strtolower($timezone)) {

		case 'gmt':

			$lastcommentmodified = $wpdb->get_var("SELECT comment_date_gmt FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");

			break;

		case 'blog':

			$lastcommentmodified = $wpdb->get_var("SELECT comment_date FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1");

			break;

		case 'server':

			$lastcommentmodified = $wpdb->get_var($wpdb->prepare("SELECT DATE_ADD(comment_date_gmt, INTERVAL %s SECOND) FROM $wpdb->comments WHERE comment_approved = '1' ORDER BY comment_date_gmt DESC LIMIT 1", $add_seconds_server));

			break;

	}



	$cache_lastcommentmodified[$timezone] = $lastcommentmodified;



	return $lastcommentmodified;

}

1438

get_intermediate_image_sizes

Definition:
function get_intermediate_image_sizes() {}

Get the available image sizes

Return values

returns:Returns a filtered array of image size strings

Defined filters

  • intermediate_image_sizes
    apply_filters( 'intermediate_image_sizes', $image_sizes )

Source code

function get_intermediate_image_sizes() {

	global $_wp_additional_image_sizes;

	$image_sizes = array('thumbnail', 'medium', 'large'); // Standard sizes

	if ( isset( $_wp_additional_image_sizes ) && count( $_wp_additional_image_sizes ) )

		$image_sizes = array_merge( $image_sizes, array_keys( $_wp_additional_image_sizes ) );



	return apply_filters( 'intermediate_image_sizes', $image_sizes );

}

1436

get_inline_data

Definition:
function get_inline_data($post) {}

Parameters

  • unknown_type $post

Defined filters

  • editable_slug
    apply_filters('editable_slug', $post->post_name)

Source code

function get_inline_data($post) {

	$post_type_object = get_post_type_object($post->post_type);

	if ( ! current_user_can($post_type_object->cap->edit_post, $post->ID) )

		return;



	$title = esc_textarea( trim( $post->post_title ) );



	echo '

<div class="hidden" id="inline_' . $post->ID . '">

	<div class="post_title">' . $title . '</div>

	<div class="post_name">' . apply_filters('editable_slug', $post->post_name) . '</div>

	<div class="post_author">' . $post->post_author . '</div>

	<div class="comment_status">' . esc_html( $post->comment_status ) . '</div>

	<div class="ping_status">' . esc_html( $post->ping_status ) . '</div>

	<div class="_status">' . esc_html( $post->post_status ) . '</div>

	<div class="jj">' . mysql2date( 'd', $post->post_date, false ) . '</div>

	<div class="mm">' . mysql2date( 'm', $post->post_date, false ) . '</div>

	<div class="aa">' . mysql2date( 'Y', $post->post_date, false ) . '</div>

	<div class="hh">' . mysql2date( 'H', $post->post_date, false ) . '</div>

	<div class="mn">' . mysql2date( 'i', $post->post_date, false ) . '</div>

	<div class="ss">' . mysql2date( 's', $post->post_date, false ) . '</div>

	<div class="post_password">' . esc_html( $post->post_password ) . '</div>';



	if ( $post_type_object->hierarchical )

		echo '<div class="post_parent">' . $post->post_parent . '</div>';



	if ( $post->post_type == 'page' )

		echo '<div class="page_template">' . esc_html( get_post_meta( $post->ID, '_wp_page_template', true ) ) . '</div>';



	if ( $post_type_object->hierarchical )

		echo '<div class="menu_order">' . $post->menu_order . '</div>';



	$taxonomy_names = get_object_taxonomies( $post->post_type );

	foreach ( $taxonomy_names as $taxonomy_name) {

		$taxonomy = get_taxonomy( $taxonomy_name );



		if ( $taxonomy->hierarchical && $taxonomy->show_ui )

				echo '<div class="post_category" id="'.$taxonomy_name.'_'.$post->ID.'">' . implode( ',', wp_get_object_terms( $post->ID, $taxonomy_name, array('fields'=>'ids')) ) . '</div>';

		elseif ( $taxonomy->show_ui )

			echo '<div class="tags_input" id="'.$taxonomy_name.'_'.$post->ID.'">' . esc_html( str_replace( ',', ', ', get_terms_to_edit($post->ID, $taxonomy_name) ) ) . '</div>';

	}



	if ( !$post_type_object->hierarchical )

		echo '<div class="sticky">' . (is_sticky($post->ID) ? 'sticky' : '') . '</div>';



	echo '</div>';

}

1434

get_index_template

Definition:
function get_index_template() {}

Retrieve path of index template in current or parent template.

Source code

function get_index_template() {

	return get_query_template('index');

}

1432