날짜를 표시하려면 최근 변경 사항 WordPress 플러그인을 수정합니다. 날짜를 표시 할 수는 있지만 형식을 지정할 수는 없습니다. 예 : mm/dd/yyyy.WordPress 플러그인에서 날짜 서식 지정
post_modified 날짜를 mm/dd/yyyy로 지정하고 싶습니다.
나는
echo '<li>'.$RecentChange->post_modified('m/d/Y').
을 tried-- 한 -하지만 플러그인이 게시물을 표시 중지 원인, 일반적으로 사이트를 끊었다.
이 다음은 PHP의 날짜 또는 시간 post_modified RecentChanges-을 가정하고 plugin--
/* define full SQL request */
$rc_sql = "SELECT post_date, post_modified, post_title, ID FROM wp_posts WHERE ".$rc_content_sql." ORDER BY post_modified DESC LIMIT ".$rc_number;
global $wpdb;
echo $before_widget;
echo $before_title.$rc_title.$after_title.'<ul>';
$RecentChanges = $wpdb->get_results($rc_sql);
if ($RecentChanges)
foreach ($RecentChanges as $RecentChange) :
$rc_url = get_page_link($RecentChange->ID);
echo '<li>'.$RecentChange->post_modified.' <a href='.$rc_url.'>'.$RecentChange->post_title.'</a></li>';
endforeach;
echo '</ul>'.$after_widget;
$wpdb->flush();
}
저는 WordPress 2.8.4를 사용하고 있습니다. PHP 버전은 4.3.9입니다. – smackaysmith