_convert_date example

/** * Converts a WordPress GMT date string to an IXR_Date object. * * @param string $date_gmt WordPress GMT date string. * @param string $date Date string. * @return IXR_Date IXR_Date object. */
    protected function _convert_date_gmt( $date_gmt$date ) {
        if ( '0000-00-00 00:00:00' !== $date && '0000-00-00 00:00:00' === $date_gmt ) {
            return new IXR_Date( get_gmt_from_date( mysql2date( 'Y-m-d H:i:s', $date, false ), 'Ymd\TH:i:s' ) );
        }
        return $this->_convert_date( $date_gmt );
    }

    /** * Prepares post data for return in an XML-RPC object. * * @param array $post The unprepared post data. * @param array $fields The subset of post type fields to return. * @return array The prepared post data. */
    protected function _prepare_post( $post$fields ) {
        // Holds the data for this post. built up based on $fields.
Home | Imprint | This part of the site doesn't use cookies.