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 | |
add_filter('get_terms', 'sort_terms_naturally', 20, 3); | |
function sort_terms_naturally ( $terms, $taxonomies, $args ) { | |
if ( isset($args['orderby']) && $args['orderby'] == 'natural' ) { | |
$sort_terms = array(); | |
foreach($terms as $term) { | |
$sort_terms[$term->name] = $term; | |
} |
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 | |
add_filter( 'language_attributes', 'add_no_js_class_to_html_tag', 10, 2 ); | |
/** | |
* Add 'no-js' class to <html> tag in order to work with Modernizr. | |
* | |
* (Modernizr will change class to 'js' if JavaScript is supported). | |
* | |
* @since 1.0.0 | |
* |
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 my_filter_acf_pro_license_option( $pre ) { | |
if ( ! defined( 'ACF_PRO_LICENSE' ) || empty( ACF_PRO_LICENSE ) ) { | |
return $pre; | |
} | |
$data = array( | |
'key' => ACF_PRO_LICENSE, | |
'url' => home_url(), |