This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
# This is a template .gitignore file for git-managed WordPress projects. | |
# | |
# Fact: you don't want WordPress core files, or your server-specific | |
# configuration files etc., in your project's repository. You just don't. | |
# | |
# Solution: stick this file up your repository root (which it assumes is | |
# also the WordPress root directory) and add exceptions for any plugins, | |
# themes, and other directories that should be under version control. | |
# | |
# See the comments below for more info on how to add exceptions for your |
<?php | |
class RW_GF_Age_Calculation { | |
public function __construct() { | |
add_action( 'init', array( $this, 'init' ) ); | |
} | |
function init() { | |
if ( ! class_exists( 'GFForms' ) || ! property_exists( 'GFForms', 'version' ) && version_compare( GFForms::$version, '1.9', '>=' ) ) { |
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository | |
$ git ls-files | xargs wc -l |
/** | |
* Unhook the cart widget/icon | |
* | |
*/ | |
function checkout_remove_cart_icon() { | |
remove_filter( 'wp_nav_menu_items', 'checkout_add_cart_widget_to_menu', 10, 2 ); | |
add_filter( 'wp_nav_menu_items', 'checkout_add_revised_cart_widget_to_menu', 1, 2 ); | |
} | |
add_action( 'init', 'checkout_remove_cart_icon' ); |
<?php | |
// Code goes in theme functions.php or a custom plugin | |
add_filter( 'pre_option_woocommerce_enable_guest_checkout', 'conditional_guest_checkout_based_on_product' ); | |
function conditional_guest_checkout_based_on_product( $value ) { | |
$restrict_ids = array( 1, 2, 3 ); // Replace with product ids which cannot use guest checkout | |
if ( WC()->cart ) { | |
$cart = WC()->cart->get_cart(); |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
Let's say that you have created a project using @vue/cli or some other cli locally. Now you created a github repo. Also at the time of creating the repo you have set the LICENSE file from the web creation portal.
Now if you are using VS Cose, here are the following commands that you need to run for the first time
to ensure the remote repo gets properly connected with your project.
git remote add origin https://<AccountName>.github.com/somerepo.git
{ | |
"$schema": "http://schemas.wp.org/trunk/theme.json", | |
"version": 2, | |
"settings": { | |
"layout": { | |
"contentSize": "750px" | |
}, | |
"color": { | |
"background": false, | |
"custom": false, |