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
| <?php | |
| /** | |
| * Reorder EU VAT field on checkout page | |
| * | |
| * @param $fields array The original array with the checkout fields | |
| * @return $fields array The updated array with the checkout fields | |
| * @see https://woocommerce.com/products/eu-vat-number/ | |
| */ | |
| function smntcs_reorder_eu_vat_field( $fields ) { | |
| $fields['billing']['billing_vat_number']['priority'] = 35; |
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
| <?php | |
| // Check enqueued scripts | |
| add_action( 'wp_enqueue_scripts', 'nl_check_enqueued_scripts', 99999 ); | |
| function nl_check_enqueued_scripts() { | |
| global $wp_scripts; | |
| var_dump( $wp_scripts ); | |
| } | |
| // Check enqueued styles |
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
| let url = 'https://api.wordpress.org/themes/info/1.2/?action=query_themes&request[search]=%20&request[fields][downloaded]=true&request[fields][active_installs]=true&request[per_page]=-1'; | |
| let results = await fetch( url ) | |
| .then( response => response.json() ) | |
| .then( data => data.info.results ) | |
| .catch(err => console.log( err ) ); | |
| console.log(results); | |
| let max = 1000; | |
| let pages = Math.ceil(results / max); |
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
| <?php | |
| function find_uniq($a) { | |
| sort($a); | |
| return ($a[0] === $a[1]) ? end($a) : current($a); | |
| } |
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
| <?php | |
| function find_uniq(array $array): int { | |
| sort($array); | |
| if ( $array[0] === $array[1] ) rsort($array); | |
| return $array[0]; | |
| } |
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
| # Set maximum character length of function GROUP_CONCAT() to 10000. | |
| SET SESSION group_concat_max_len = 10000; |
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
| /* Replace site logo based on language | NL-***-hc */ | |
| html[lang="en-US"] .custom-logo-link { | |
| background: url(IMAGE-URL); | |
| height: 150px; | |
| width: 300px; | |
| display: block; | |
| margin: auto; | |
| } | |
| html[lang="en-US"] .custom-logo-link img.custom-logo { | |
| display: none; |
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
| let url = 'https://api.wordpress.org/plugins/info/1.2/?action=query_plugins&request[fields][banners]=true&request[search]=SMNTCS'; | |
| let downloads = 0; | |
| let installs = 0; | |
| let plugins; | |
| let plugin; | |
| fetch( url ) | |
| .then( response => { | |
| return response.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
| /* Adjust post title visibility */ | |
| .headline { | |
| display: none; | |
| } |
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
| /* Adjust post title font color */ | |
| .headline { | |
| color: #fff; | |
| } |