' . $dg_options['css']['text'] . '' . PHP_EOL; } // need AJAX URL variable in frontend ?> $sv ) { $valid = array_key_exists( $sk, $o ); if ( is_array( $sv ) && ! empty( $sv ) ) { $valid = $valid && self::isValidOptionsStructure( $o[ $sk ], $sv ); } if ( ! $valid ) { break; } } } return $valid; } /** * Function takes a GMT timestamp and returns a date/time string in the * current timezone and WP format. * * @param int $timestamp The GMT timestamp to translate. * * @return string The local time in the WP date/time format. */ public static function localDateTimeFromTimestamp( $timestamp ) { static $gmt_offset = null; static $wp_date_format = null; static $wp_time_format = null; if ( is_null( $gmt_offset ) ) { $gmt_offset = get_option( 'gmt_offset' ); $wp_date_format = get_option( 'date_format' ); $wp_time_format = get_option( 'time_format' ); } return '' . date_i18n( $wp_date_format, $timestamp + $gmt_offset * 3600 ) . ' ' . '' . date_i18n( $wp_time_format, $timestamp + $gmt_offset * 3600 ) . ''; } /** * Blocks instantiation. All functions are static. */ private function __construct() { } }