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 | |
/** | |
* GeneratePress: Remove all Google Fonts loading and options. | |
* | |
* @link https://gist.github.com/cliffordp/640ff4586c9a7c9ffe6656ff65326a5e This snippet. | |
* @link https://share.getcloudapp.com/NQuDXKJm 1min demo that this code works. | |
* @link https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/?aid=5336&affiliate_key=Lsvk04DjJOhq I'm using Toolset to add custom snippets. | |
*/ | |
toolset_snippet_security_check() or die( 'Direct access is not allowed' ); |
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
/** | |
* @snippet WooCommerce Checkout date picker | |
* @author NCY Design https://wordpress.ncy.design | |
* @compatible WooCommerce 3.7.0 | |
*/ | |
// Register main datepicker jQuery plugin script | |
add_action( 'wp_enqueue_scripts', 'enabling_date_picker' ); | |
function enabling_date_picker() { | |
// Only on front-end and checkout page |
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
add_filter( 'generate_page_hero_background_image_url', function( $url ) { | |
if ( ! function_exists( 'get_woocommerce_term_meta' ) ) { | |
return $url; | |
} | |
global $wp_query; | |
$cat = $wp_query->get_queried_object(); | |
$thumbnail_id = get_woocommerce_term_meta( $cat->term_id, 'thumbnail_id', true ); | |
$background_image = wp_get_attachment_url( $thumbnail_id ); |
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 | |
/** | |
* AMP Gravity Forms Submission Shim plugin bootstrap. | |
* | |
* @package Google\AMP_Gravity_Forms_Submission_Shim | |
* @author Weston Ruter, Google | |
* @license GPL-2.0-or-later | |
* @copyright 2020 Google Inc. | |
* | |
* @wordpress-plugin |
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
#!/usr/bin/env bash | |
# for debug output, uncomment: | |
#set -x | |
function help { | |
echo "WordPress cleanup -v 0.5 2018-06-26 / [email protected] | |
Usage: |
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 | |
/* | |
################### READ ME ################################# | |
You must create a proxy file that retrieves your import file from FTP and then returns it. | |
You will then call that file with the 'Download from URL' option in WP All Import. | |
This is an example of such a proxy file. This is provided in the hopes it is useful, but without any support. | |
############################################################### | |
Instructions: | |
* Copy the code below to a new php file in the root of your WP site | |
* Update the FTP server details |
Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User →
- Make sure your
Local by FlyWheel
WordPress install is a custom install
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
var gulp = require('gulp'), | |
sass = require('gulp-sass'), | |
prefix = require('gulp-autoprefixer'), | |
sourcemaps = require('gulp-sourcemaps'), | |
livereload = require('gulp-livereload'), | |
input = { | |
'sass': [ | |
'sass/**/*.scss' | |
] |
This procedure is tested on Mac OS X 10.14.0 with Xcode Developer Tools installed (xCode).
PHP 5.6, 7.0, 7.1, and 7.2 installed with Homebrew following the instructions here.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
NewerOlder