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 | |
// Desired IP address | |
$ip = '172.217.10.78'; | |
// With Error Reporting: file_get_content(); | |
// Without Error Reporting: @file_get_content(); | |
$content = @file_get_contents('http://freegeoip.net/json/'.$ip); | |
// Result as an Array: json_decode($var, true); | |
// Result as an Object: json_decode($var); | |
$result = json_decode($content, true); | |
// For Array: $result['key']; |
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
/** | |
* Remove update notification | |
* Applies to WordPress Core, Plugins, Themes | |
*/ | |
// disable for core | |
add_filter('pre_site_transient_update_core','remove_wp_update_notification'); | |
// disable for plugins | |
add_filter('pre_site_transient_update_plugins','remove_wp_update_notification'); |