Skip to content

Instantly share code, notes, and snippets.

@rad73
rad73 / 2018_chrome_snippet_gui_import_export.js
Created September 20, 2020 18:57 — forked from soundyogi/2018_chrome_snippet_gui_import_export.js
A snippet to export and import your chrome snippets
void function() { "use strict"
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WIP DO NOT USE WIP !!!!!!!!!!!!!!!!!!!!!
DO NOT USE THIS YET.
USE THE 2016 VERSION BELOW PLEASE.
WWWWWWWW WWWWWWWWIIIIIIIIIIPPPPPPPPPPPPPPPPP
W::::::W W::::::WI::::::::IP::::::::::::::::P
W::::::W W::::::WI::::::::IP::::::PPPPPP:::::P
@rad73
rad73 / statusCodes
Created February 22, 2019 23:03 — forked from IngmarBoddington/statusCodes
HTTP Status Codes / Verbs List
CONNECT
DELETE
GET
HEAD
OPTIONS
PATCH
POST
PUT
TRACE
@rad73
rad73 / css-selectors.md
Created February 6, 2019 22:30 — forked from magicznyleszek/css-selectors.md
CSS Selectors Cheatsheet

CSS Selectors Cheatsheet

Element selectors

Element -- selects all h2 elements on the page

h2 {
    foo: bar;
@rad73
rad73 / gist:b6a5ee0233ce29d4f9b5e002f73960c2
Created December 2, 2018 17:52 — forked from mannieschumpert/gist:6105315
Remove user fields for specific user role in WordPress
<?php
// Hook into the admin footer
add_action( 'admin_footer-user-edit.php', 'remove_user_fields' );
function remove_user_fields(){
// Set desired user role to target
$role = 'subscriber';
// Check for user ID query string
@rad73
rad73 / Wooocommerce - add description field to product variations
Created November 6, 2018 14:23 — forked from simonlk/Wooocommerce - add description field to product variations
Add a description input field for each product variation that saves to post_content
<?php
/**
* Variable Product Type
*
* Functions specific to variable products (for the write panels).
*
* @author WooThemes
* @category Admin
* @package WooCommerce/Admin/WritePanels
* @version 1.6.4
@rad73
rad73 / functions.php
Created November 6, 2018 14:22 — forked from MarkoSh/functions.php
Woocommerce all js params
add_action( 'wp_head', 'woo_js_params', 99 );
function woo_js_params() {
?>
<script>
<?php
$vars = array(
'woocommerce' => array(
'ajax_url' => WC()->ajax_url() ,
'wc_ajax_url' => WC_AJAX::get_endpoint("%%endpoint%%") ,
) ,
<?php
/**
* Plugin Name: Product Enquiry for WooCommerce
* Description: Allows prospective customers or visitors to make enquiry about a product, right from within the product page.
* Version: 2.6.1
* Author: WisdmLabs
* Author URI: https://wisdmlabs.com
* Plugin URI: https://wordpress.org/plugins/product-enquiry-for-woocommerce
* License: GPL2
* Text Domain: product-enquiry-for-woocommerce
/*
* Hide "Products" in WooCommerce breadcrumb
*/
function woo_custom_filter_breadcrumbs_trail ( $trail ) {
foreach ( $trail as $k => $v ) {
if ( strtolower( strip_tags( $v ) ) == 'products' ) {
unset( $trail[$k] );
break;
}
}
@rad73
rad73 / woo-adding-new-fields
Created November 6, 2018 14:18 — forked from maxsherlock/woo-adding-new-fields
Simple, elegant code for how to add new custom fields to any WooCommerce product!
// Display Fields
add_action( 'woocommerce_product_options_general_product_data', 'woo_add_custom_general_fields' );
// Save Fields
add_action( 'woocommerce_process_product_meta', 'woo_add_custom_general_fields_save' );
function woo_add_custom_general_fields() {
global $woocommerce, $post;
@rad73
rad73 / woocommerce-bulk-discount.php
Created November 6, 2018 14:17 — forked from lukecav/woocommerce-bulk-discount.php
WooCommerce Bulk Discount Fixed
<?php
/*
Plugin Name: WooCommerce Bulk Discount
Plugin URI: http://wordpress.org/plugins/woocommerce-bulk-discount/
Description: Apply fine-grained bulk discounts to items in the shopping cart.
Author: Rene Puchinger
Version: 2.4.6
Author URI: https://profiles.wordpress.org/rene-puchinger/
License: GPL3