First, make sure you have Composer installed in your system.
In order to use the WPCS you'll need the PHP_CodeSniffer (PHPCS) and the WPCS rules (sniffs) installed.
You can install PHP_CodeSniffer globally using Composer by running this command:
First, make sure you have Composer installed in your system.
In order to use the WPCS you'll need the PHP_CodeSniffer (PHPCS) and the WPCS rules (sniffs) installed.
You can install PHP_CodeSniffer globally using Composer by running this command:
| <?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' ); |
| /** | |
| * @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 |
| 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 ); |
| <?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 |
| #!/usr/bin/env bash | |
| # for debug output, uncomment: | |
| #set -x | |
| function help { | |
| echo "WordPress cleanup -v 0.5 2018-06-26 / [email protected] | |
| Usage: |
| <?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 →
Local by FlyWheel WordPress install is a custom install| var gulp = require('gulp'), | |
| sass = require('gulp-sass'), | |
| prefix = require('gulp-autoprefixer'), | |
| sourcemaps = require('gulp-sourcemaps'), | |
| livereload = require('gulp-livereload'), | |
| input = { | |
| 'sass': [ | |
| 'sass/**/*.scss' | |
| ] |