Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
<?php | |
/** | |
* Dont Update the Theme | |
* | |
* If there is a theme in the repo with the same name, this prevents WP from prompting an update. | |
* | |
* @since 1.0.0 | |
* @param array $r Existing request arguments | |
* @param string $url Request URL | |
* @return array Amended request arguments |
<?php | |
/** | |
* _s Theme Options | |
* | |
* @package _s | |
* @since _s 1.0 | |
*/ | |
/** | |
* Register the form setting for our _s_options array. |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
/* Customize Product Categories Labels */ | |
add_filter( 'woocommerce_taxonomy_args_product_cat', 'custom_wc_taxonomy_args_product_cat' ); | |
function custom_wc_taxonomy_args_product_cat( $args ) { | |
$args['label'] = __( 'Product Categories', 'woocommerce' ); | |
$args['labels'] = array( | |
'name' => __( 'Product Categories', 'woocommerce' ), | |
'singular_name' => __( 'Product Category', 'woocommerce' ), | |
'menu_name' => _x( 'Categories', 'Admin menu name', 'woocommerce' ), | |
'search_items' => __( 'Search Product Categories', 'woocommerce' ), | |
'all_items' => __( 'All Product Categories', 'woocommerce' ), |
// Use WC 2.0 variable price format, now include sale price strikeout | |
add_filter( 'woocommerce_variable_sale_price_html', 'wc_wc20_variation_price_format', 10, 2 ); | |
add_filter( 'woocommerce_variable_price_html', 'wc_wc20_variation_price_format', 10, 2 ); | |
function wc_wc20_variation_price_format( $price, $product ) { | |
// Main Price | |
$prices = array( $product->get_variation_price( 'min', true ), $product->get_variation_price( 'max', true ) ); | |
$price = $prices[0] !== $prices[1] ? sprintf( __( 'From: %1$s', 'woocommerce' ), wc_price( $prices[0] ) ) : wc_price( $prices[0] ); | |
// Sale Price | |
$prices = array( $product->get_variation_regular_price( 'min', true ), $product->get_variation_regular_price( 'max', true ) ); | |
sort( $prices ); |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
/* Default Font Size */ | |
body { | |
font-size: 14px; | |
} | |
/* Top Navigation Font Size */ | |
#topnav { | |
font-size: 12px; | |
} | |
/* Footer Widgets Font Size */ | |
#footer-widgets { |
<?php | |
/** | |
* Template Name: Page With Comments | |
* Description: The template for displaying comments on a page. | |
* | |
* @category PrimaShop | |
* @package Templates | |
* @author PrimaThemes | |
* @link http://www.primathemes.com | |
*/ |
add_action( 'woocommerce_single_product_summary', 'prima_custom_block_product_summary', 50 ); | |
function prima_custom_block_product_summary() { | |
?> | |
YOUR CUSTOM HTML CODE HERE | |
<?php | |
} |
<?php | |
/** | |
* Replace Sale Flash Content With Product Price | |
* | |
* @author PrimaThemes | |
* @package WooCommerce | |
* @version 1.0 | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |