WordPress Snippet

ワードプレスをカスタマイズしよう

メディアの日付の取得

image.php

	//wp_update_attachment_metadata( $post_id, $data );
	$meta_data= wp_get_attachment_metadata( $post->ID );
	$timestamp= $meta_data['image_meta']['created_timestamp'];
	$date_format	= get_option( 'date_format' ) . ' ' . get_option( 'time_format' );
	$date= date( $raindrops_date_format, $timestamp );

[emulsion_relate_posts]