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 | |
/* | |
replacing the default "Enter title here" placeholder text in the title input box | |
with something more descriptive can be helpful for custom post types | |
place this code in your theme's functions.php or relevant file | |
source: http://flashingcursor.com/wordpress/change-the-enter-title-here-text-in-wordpress-963 | |
*/ |
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
function get_administrative_name($lat, $lng, $level = 'administrative_area_level_2', $expire = null) { | |
if(!$expire) | |
$expire = 60 * 60 * 24 * 7 * 4; // keep for a month | |
$transient = 'cached_administrative_name_'. str_replace('.' , '', $lat) .''. str_replace('.' , '', $lng); | |
if( false === ($place = get_transient( $transient ) ) ) { | |
$city = 'https://maps.googleapis.com/maps/api/geocode/json?latlng='.$lat.','.$lng.'&sensor=false'; |
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
/** | |
* An improved version for loading template parts. | |
* | |
* Load a template part into a template | |
* | |
* Makes it easy for a theme to reuse sections of code in a easy to overload way | |
* for child themes. | |
* | |
* Includes the named template part for a theme or if a name is specified then a | |
* specialised part will be included. If the theme contains no {slug}.php file |