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 | |
/** | |
* Remove query arguments from any enqueued scripts. | |
*/ | |
function remove_query_args( $src ) { | |
if ( strpos( $src, 'ver=' ) ) { | |
$src = remove_query_arg( 'ver', $src ); | |
} | |
return $src; | |
} |
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
# CREATE: On the root folder of a Git repository: | |
$ git submodule add git@bitbucket.org:nicethemes/<repo>.git location/of/submodule | |
# Cloning a repo that contains submodules: | |
$ git clone --recursive git@bitbucket.org:nicethemes/<repo>.git location/of/repo | |
# Or: | |
$ git clone git@bitbucket.org:nicethemes/<repo>.git location/of/repo | |
$ git submodule init | |
$ git submodule update |
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 | |
/** | |
* Obtain the path to the admin directory. | |
* | |
* @return string | |
*/ | |
function my_plugin_get_admin_path() { | |
// Replace the site base URL with the absolute path to its installation directory. | |
$admin_path = str_replace( get_bloginfo( 'url' ) . '/', ABSPATH, get_admin_url() ); | |
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 | |
// Prevent Airplane Mode from blocking Google Fonts. | |
add_filter( 'airplane_mode_parse_style', function( $value, $parsed ) { | |
if ( 'fonts.googleapis.com' === $parsed ) { | |
$value = false; | |
} | |
return $value; | |
}, 10, 2 ); |
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
body.nice-framework-page-demos .nice-toggle .nice-toggle-inner { | |
height: auto !important; | |
border: 2px solid transparent !important; | |
} |
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 // Ignore this line. | |
add_action( 'save_post', 'nice_fix_yoast_seo_loading', -999 ); | |
add_action( 'delete_post', 'nice_fix_yoast_seo_loading', -999 ); | |
function nice_fix_yoast_seo_loading() { | |
if ( ! class_exists( 'WPSEO_Link_Watcher' ) ) { | |
return; | |
} | |
nice_loader( 'includes/public/theming/' ); |
OlderNewer