XPressME Integration Kit

Trac

Changeset 225 for trunk


Ignore:
Timestamp:
May 22, 2009, 10:42:31 AM (15 years ago)
Author:
toemon
Message:

#126 トラックバック表示の日付が1970年1月1日になるバグの修正と、xpressカスタムテンプレート関数の引数デフォルト値の変更(基本は #show=true)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/plugins/xpressme/include/custom_functions.php

    r223 r225  
    11<?php 
    2 function xpress_the_title($show = false) 
     2function xpress_the_title($show = true) 
    33{ 
    44        $output = '<div class ="xpress-post-header">' . "\n"; 
     
    8686} 
    8787         
    88 function xpress_credit($show = false) 
     88function xpress_credit($show = true) 
    8989{ 
    9090        global $wp_version , $xoops_config; 
     
    111111} 
    112112 
    113 function xpress_convert_time($show = false) 
     113function xpress_convert_time($show = true) 
    114114{ 
    115115        $ret =  timer_stop(0) .'sec. '; 
     
    498498} 
    499499 
    500 function xpress_pings_list($show = false){ 
     500function xpress_pings_list($show = true){ 
    501501         
    502502        $trackbacks = xpress_get_pings(); 
     
    547547        /** @todo Use API instead of SELECTs. */ 
    548548        if ( $user_ID) { 
    549                 $trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $user_ID)); 
     549                $trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND (comment_approved = '1' OR ( user_id = %d AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $user_ID)); 
    550550        } else if ( empty($trackback_author) ) { 
    551                 $trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID)); 
    552         } else { 
    553                 $trackbacks = $wpdb->get_results(sprintf("SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $trackback_author, $trackback_author_email)); 
     551                $trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved = '1' AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID)); 
     552        } else { 
     553                $trackbacks = $wpdb->get_results(sprintf("SELECT * , UNIX_TIMESTAMP(comment_date) AS comment_timestamp ,UNIX_TIMESTAMP(comment_date_gmt) AS comment_timestamp_gmt FROM $wpdb->comments WHERE comment_post_ID = %d AND ( comment_approved = '1' OR ( comment_author = %s AND comment_author_email = %s AND comment_approved = '0' ) ) AND ( comment_type = 'trackback' OR comment_type = 'pingback' ) ORDER BY comment_date", $post->ID, $trackback_author, $trackback_author_email)); 
    554554        } 
    555555 
     
    573573                                'title' => $title , 
    574574                                'content' => $content , 
    575                                 'date'          => $trackback->comment_date , 
    576                                 'date_gmt'              => $trackback->comment_date_gmt , 
     575                                'date'          => $trackback->comment_timestamp , 
     576                                'date_gmt'              => $trackback->comment_timestamp_gmt , 
    577577                                'agent'         => $trackback->comment_agent , 
    578578                                'type'          => $trackback->comment_type , 
Note: See TracChangeset for help on using the changeset viewer.