This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove CSS from WooCommerce Dynamic Pricing & Discounts plugin, see https://gist.github.com/Willem-Siebe/c323a9d71597d7128f24. | |
function wsis_remove_woocommerce_dynamic_pricing_discounts_assets() { | |
wp_dequeue_style('rp-wcdpd-frontend-styles'); | |
} | |
add_action('wp_enqueue_scripts','wsis_remove_woocommerce_dynamic_pricing_discounts_assets',999); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assign user to other role then in used in settings of Formdable Registration plugin, see https://gist.github.com/Willem-Siebe/a14c4ec86eddd7073f67. | |
function frmreg_new_role($user_role, $atts){ | |
extract($atts); | |
if($form->id == 7){ // WSIS: change this to your form ID | |
if($_POST['item_meta'][103] == 'professional') //change 125 to the ID of your field and 'Author' to the value of your radio button WSIS: or single checkbox | |
$user_role = 'ignite_level_5367f4bc4171a'; // WSIS: rolename | |
} | |
return $user_role; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove table CSS from WooCommerce Dynamic Discounts & Pricing plugin, see https://gist.github.com/Willem-Siebe/037d1d5d8b6ec2d92db9 | |
function wsis_remove_wcdpd_assets() { | |
wp_dequeue_style('rp-wcdpd-frontend-styles'); | |
} | |
add_action('wp_enqueue_scripts','wsis_remove_wcdpd_assets',999); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Change upload location media folder WordPress, see https://gist.github.com/ff6fb2a82e2ed3e788e4.git. */ | |
define( 'UPLOADS', ''.'media' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove CSS and JS from Jetpack plugin, see https://gist.github.com/Willem-Siebe/3f6bff80b01973a21467. | |
function wsis_remove_jetpack_assets() { | |
// devicepx-jetpack.js, used to optionally load retina/HiDPI versions of files (Gravatars etc) which are known to support it, for devices that run at a higher resolution. | |
wp_dequeue_script( 'devicepx' ); | |
} | |
add_action( 'wp_enqueue_scripts', 'wsis_remove_jetpack_assets', 20 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove CSS and JS from Views plugin, only when it's not needed! See https://gist.github.com/Willem-Siebe/9520464d0b6b763bf1de. | |
add_action('wp_enqueue_scripts', 'wsis_prefix_remove_views_assets', 20); | |
function wsis_prefix_remove_views_assets() { | |
// Scripts | |
// views_front_end_utils.js (not used anymore from -for sure- version 1.6.4) | |
// used in Views parametric searches |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// js wijzigen bekijk winkelwagen | |
add_action( 'wp_enqueue_scripts', 'wsis_remove_woocommerce_add_to_cart_js' ); | |
function wsis_remove_woocommerce_add_to_cart_js() { | |
wp_dequeue_script('wc-add-to-cart'); | |
} | |
add_action( 'wp_enqueue_scripts', 'wsis_add_changed_woocommerce_add_to_cart_js', 9 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Change sidebar widget values 'before' and 'after', see https://gist.github.com/Willem-Siebe/90654e8fdf5513c13771. | |
function wsis_modify_before_widget_after_widget($params) { | |
if ($params[0]['id']=='header-widgets-search') { | |
if (strpos($params[0]['before_widget'],'nav_menu-14')) { | |
//Supposing you want to change the HTML to <ul> instead of <div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Replace the 'x' in WooCommerce cart.php with text because 'x' is not helpfull at all for screenreader users, see https://gist.github.com/Willem-Siebe/dc34719917e77fcecbc6. | |
function wsis_woocommerce_remove_item( $wsis_html, $cart_item_key ) { | |
$cart_item_key = $cart_item_key; | |
$wsis_html = sprintf( '<a href="%s" class="remove" title="%s"><span class="wsis-remove-item">%s</span></a>', esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), __( 'Remove this item', 'woocommerce' ), __( 'Remove this item', 'woocommerce' )); | |
return $wsis_html; | |
} | |
add_filter ( 'woocommerce_cart_item_remove_link', 'wsis_woocommerce_remove_item', 10, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Display WooCommerce shop, category and tag description also on next pages, see https://gist.github.com/Willem-Siebe/c883eeb2eefb5eea82ab. | |
function woocommerce_product_archive_description() { | |
if ( is_post_type_archive( 'product' ) && get_query_var( 'paged' ) >= 0 ) { | |
$shop_page = get_post( wc_get_page_id( 'shop' ) ); | |
if ( $shop_page ) { | |
$description = apply_filters( 'the_content', $shop_page->post_content ); | |
if ( $description ) { | |
echo '<div class="page-description">' . $description . '</div>'; | |
} |