$52 GRAYBYTE WORDPRESS FILE MANAGER $51

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/home/bqrcodec/contact.malloca.com/wp-content/plugins/jet-engine/includes/classes/

HOME
Current File : /home/bqrcodec/contact.malloca.com/wp-content/plugins/jet-engine/includes/classes//datetime.php
<?php
/**
 * Datetime management class
 */

// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
	die;
}

/**
 * Define Datetime management class
 */
class Jet_Engine_Datetime {

	/**
	 * Check if wp_date used instead fo date to process data
	 * 
	 * @return [type] [description]
	 */
	public function use_wp_date() {
		return apply_filters( 'jet-engine/datetime/use-wp-date', false );
	}

	/**
	 * Return human-readable localized date from timestamp
	 * 
	 * @param  [type] $format [description]
	 * @param  [type] $time   [description]
	 * @return [type]         [description]
	 */
	public function date( $format = null, $time = null ) {
		if ( $this->use_wp_date() ) {
			return wp_date( $format, $time );
		} else {
			return date_i18n( $format, $time );
		}
	}

	/**
	 * Convert string to time according timezone settings
	 * 
	 * @param  [type] $timestring [description]
	 * @return [type]             [description]
	 */
	public function to_time( $timestring ) {
		if ( $this->use_wp_date() ) {
			$date = new DateTime( $timestring, wp_timezone() );
			return $date->format( 'U' );
		} else {
			return strtotime( $timestring );
		}
	}

	/**
	 * Convert meta value date to timestamp according timezone settings
	 * 
	 * @param  [type] $timestamp [description]
	 * @param  [type] $raw_time  [description]
	 * @return [type]            [description]
	 */
	public function meta_to_time( $timestamp, $raw_time ) {
		return $this->to_time( $raw_time );
	}

	/**
	 * Convert meta value date to formatted date according timezone settings
	 * 
	 * @param  [type] $timestamp [description]
	 * @param  [type] $raw_time  [description]
	 * @return [type]            [description]
	 */
	public function meta_to_date( $formatted_date, $timestamp, $format ) {
		return $this->date( $format, $timestamp );
	}

	/**
	 * Convert meta fileds timestamp dates on save or get field values
	 * @return [type] [description]
	 */
	public function convert_meta_fields_dates() {
		
		add_filter( 'cx_post_meta/strtotime', array( $this, 'meta_to_time' ), 10, 2 );
		add_filter( 'cx_post_meta/date', array( $this, 'meta_to_date' ), 10, 3 );

		add_filter( 'cx_term_meta/strtotime', array( $this, 'meta_to_time' ), 10, 2 );
		add_filter( 'cx_term_meta/date', array( $this, 'meta_to_date' ), 10, 3 );

		add_filter( 'cx_user_meta/strtotime', array( $this, 'meta_to_time' ), 10, 2 );
		add_filter( 'cx_user_meta/date', array( $this, 'meta_to_date' ), 10, 3 );

		add_filter( 'jet-engine/custom-content-types/strtotime', array( $this, 'meta_to_time' ), 10, 2 );
		add_filter( 'jet-engine/custom-content-types/date', array( $this, 'meta_to_date' ), 10, 3 );

	}

}

Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0755
datetime.php
2.595 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
gallery.php
7.54 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
help-video-popup.php
6.733 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
posts-search.php
2.744 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
repeater-item.php
0.686 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
shortcodes.php
5.932 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
tools.php
17.547 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644
url-shemes-manager.php
6.412 KB
29 Jan 2024 10.33 AM
bqrcodec / bqrcodec
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF