This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get last posted or modified date | |
function acme_mod_date( $postId ) { | |
$posted = get_the_time( 'U', $postId ); | |
$modified = get_the_modified_time( 'U', $postId ); | |
if ( $modified >= ( $posted + 7890000 ) ) { // 3 months | |
return '<time class="updated" datetime="' . get_the_modified_time( 'Y-m-d', $postId ) . '"> Updated on ' . get_the_modified_time( get_option( 'date_format' ), $postId ) . '</time>'; | |
} | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function scriptCheck() { | |
global $wpdb; | |
$wnumber = $this->getWNumber(); | |
$booking_status = $wpdb->get_results("SELECT completed FROM " . $wpdb->prefix . "ch_bookings WHERE booking = " . $wnumber, ARRAY_A); | |
if (is_array($booking_status)) { | |
if ($booking_status[0]["completed"] == 1) { |