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
/* -------------------------------------------------------------------------- */ | |
// All Bootstrap 5 Sass Mixins [ Cheat sheet ] | |
// Updated to Bootstrap v5.1.x | |
// @author https://anschaef.de | |
// @see https://github.com/twbs/bootstrap/tree/main/scss/mixins | |
// @see https://github.com/twbs/bootstrap/blob/main/scss/_variables.scss | |
/* -------------------------------------------------------------------------- */ | |
// Options | |
// @see https://getbootstrap.com/docs/5.1/customize/options/ |
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 | |
/* | |
* Custom filter to remove default image sizes from WordPress. | |
*/ | |
/* Add the following code in the theme's functions.php and disable any unset function as required */ | |
function remove_default_image_sizes( $sizes ) { | |
/* Default WordPress */ | |
unset( $sizes[ 'thumbnail' ]); // Remove Thumbnail (150 x 150 hard cropped) |
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
/** | |
* Allow to remove method for an hook when, it's a class method used and class don't have variable, but you know the class name :) | |
* source: https://github.com/herewithme/wp-filters-extras | |
* More: http://wordpress.stackexchange.com/questions/57079/how-to-remove-a-filter-that-is-an-anonymous-object | |
*/ | |
function remove_filters_for_anonymous_class( $hook_name = '', $class_name ='', $method_name = '', $priority = 0 ) { | |
global $wp_filter; | |
// Take only filters on right hook name and priority | |
if ( !isset($wp_filter[$hook_name][$priority]) || !is_array($wp_filter[$hook_name][$priority]) ) |
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 | |
/** | |
* Custom API REST path class | |
* | |
* @package MyPlugin | |
* @author Skatox | |
*/ | |
class WC_API_Custom extends WC_API_Resource | |
{ |
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
/* | |
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod | |
May contain errors where latitude and longitude are off. Use at own non-validated risk. | |
*/ | |
SET NAMES utf8; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS postcodes_geo; |