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
<?php | |
/** | |
* @package Custom_queries | |
* @version 1.0 | |
*/ | |
/* | |
Plugin Name: Custom queries | |
Plugin URI: http://wordpress.org/extend/plugins/# | |
Description: This is an example plugin | |
Author: Carlo Daniele |
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
<?php | |
function wp_date_localised($format, $timestamp = null) { | |
// This function behaves a bit like PHP's Date() function, but taking into account the Wordpress site's timezone | |
// CAUTION: It will throw an exception when it receives invalid input - please catch it accordingly | |
// From https://mediarealm.com.au/ | |
$tz_string = get_option('timezone_string'); | |
$tz_offset = get_option('gmt_offset', 0); | |
OlderNewer