Hi! If you see an error or something is missing (like :focus-within
for few years :P) please let me know ❤️
Element -- selects all h2
elements on the page
h2 {
// Disable Order Processing Email For Virtual Products | |
add_action( 'woocommerce_checkout_process', 'virtual_products_that_dont_annoy_customers' ); | |
function virtual_products_that_dont_annoy_customers() { | |
// Check if the cart contains virtual products only | |
$virtual_products_only = true; | |
foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) { | |
if ( ! $cart_item['data']->is_virtual() ) { |
<?php | |
// Give Products extraordinary weight boost to ensure Products show up first. | |
// @link https://searchwp.com/documentation/knowledge-base/post-type-first-top/ | |
add_filter( 'searchwp\query\mods', function( $mods ) { | |
$post_type = 'product'; // Post type name. | |
$source = \SearchWP\Utils::get_post_type_source_name( $post_type ); |
<?php | |
/** | |
* USAGE: | |
* - Search and replace the `CUSTOM_SITEMAP` string with a lowercase identifier name: e.g., "vehicles", "customer_profiles" | |
* - The `your_alternate_data_source()` function does not exist; it's simply a placeholder for your own function that returns some sort of data array. | |
* - Uses heredocs for inline XML: https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc | |
*/ | |
/** |
<?php | |
function my_filter_acf_pro_license_option( $pre ) { | |
if ( ! defined( 'ACF_PRO_LICENSE' ) || empty( ACF_PRO_LICENSE ) ) { | |
return $pre; | |
} | |
$data = array( | |
'key' => ACF_PRO_LICENSE, | |
'url' => home_url(), |
{ | |
"use_https": "", | |
"purge_amazonS3_info": "" | |
} |
<?php | |
function url_exists( $url ) { | |
$headers = get_headers($url); | |
return stripos( $headers[0], "200 OK" ) ? true : false; | |
} | |
function get_youtube_id( $url ) { | |
$youtubeid = explode('v=', $url); | |
$youtubeid = explode('&', $youtubeid[1]); |
<?php | |
/* | |
Plugin Name: Square Candy ACF RGB color output | |
Plugin URI: http://squarecandydesign.com | |
Description: provides a function to output RGB values from ACF colorpicker fields | |
Author: Peter Wise | |
Version: 0.1 | |
Author URI: http://squarecandydesign.com | |
*/ |
/** | |
* List unique CSS properties for all DOM elements | |
* Initially created to list unique font stacks on a page | |
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer} | |
* | |
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file} | |
* | |
* @author AndrewRMinion Design (https://andrewrminion.com) | |
* @version 1.1 | |
* |
<div id="field1"> | |
<button type="button" id="sub" class="sub">-</button> | |
<input type="text" id="1" value="0" class="field" /> | |
<button type="button" id="add" class="add">+</button> | |
</div> | |
$('.add').click(function () { | |
$(this).prev().val(+$(this).prev().val() + 1); | |
}); | |
$('.sub').click(function () { |