Site / Home URLs
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
Update content Guid
<?php | |
add_filter( 'init', 'wc_tax_exempt_user_roles' ); | |
function wc_tax_exempt_user_roles() { | |
if ( ! is_admin() ) { | |
global $woocommerce; | |
if ( current_user_can('wholesaler') || current_user_can('distributor') ) { | |
$woocommerce->customer->set_is_vat_exempt(true); | |
} else { | |
$woocommerce->customer->set_is_vat_exempt(false); | |
} |
// Replace 7 with the ID of your form and 13 with the ID of the field you want to force "all required" | |
// http://www.gravityhelp.com/documentation/page/Gform_field_validation | |
add_filter("gform_field_validation_7_13", 'validate_tcs', 10, 4); | |
function validate_tcs($result, $value, $form, $field) { | |
// Convert the checkbox input name value (returned as part of "field") | |
// into the "underscored" ID version which is found in the $_POST | |
foreach ($field['inputs'] as $input) { | |
$input_post_value = 'input_' . str_replace('.', '_', $input['id']); | |
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
__ | |
_e | |
__ngettext:1,2 | |
_n:1,2 | |
__ngettext_noop:1,2 | |
_n_noop:1,2 | |
_c, | |
_nc:4c,1,2 | |
_x:1,2c | |
_ex:1,2c |
const SCROLL_UP = "up"; | |
const SCROLL_DOWN = "down"; | |
const useScrollDirection = ({ | |
initialDirection, | |
thresholdPixels, | |
off | |
} = {}) => { | |
const [scrollDir, setScrollDir] = useState(initialDirection); |
<?php | |
/** | |
* Because WP does not allow us to set minimum image dimensions on upload we often | |
* use an ACF image. However this means within the dashboard we lack a thumbnail | |
* Here we set the ACF image to be the WP thumbnail. | |
*/ | |
function image_to_thumbnail( $post_id ) { | |
if( get_post_type($post_id) != 'talent' ) { | |
return; // Stop if post-type is not talent | |
} |