This file contains hidden or 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
| add_filter( 'wpjmel_ip_location_string', function( $string, $data ) { | |
| return $data['city'] . ', ' . $data['region']; | |
| }, 1, 2 ); | |
| // http://ip-api.com/json |
This file contains hidden or 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
| $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; | |
| if (strpos($url,'car') !== false) { | |
| echo 'Car exists.'; | |
| } else { | |
| echo 'No cars.'; | |
| } |
This file contains hidden or 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
| // Typekit | |
| function themexxx_typekit() { | |
| wp_enqueue_script( 'typekit', '//use.typekit.net/xxxxxx.js'); | |
| } | |
| add_action( 'wp_enqueue_scripts', 'themexxx_typekit' ); | |
| function themexxx_typekit_inline() { | |
| if ( wp_script_is( 'typekit', 'done' ) ) { ?> | |
| <script type="text/javascript">try{Typekit.load({ async: true });}catch(e){}</script> | |
| <?php } | |
| } |
This file contains hidden or 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
| UPDATE audio_files set mp3_path = CONCAT(audio_files.path, audio_files.filename); |
This file contains hidden or 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
| // First, create a function that includes the path to your favicon | |
| function add_favicon() { | |
| $favicon_url = get_stylesheet_directory_uri() . '/images/icons/admin-favicon.ico'; | |
| echo '<link rel="shortcut icon" href="' . $favicon_url . '" />'; | |
| } | |
| // Now, just make sure that function runs when you're on the login page and admin pages | |
| add_action('login_head', 'add_favicon'); | |
| add_action('admin_head', 'add_favicon'); |
NewerOlder