Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

ArnoutPullen ArnoutPullen

🎯
Focusing
View GitHub Profile
@ArnoutPullen
ArnoutPullen / functions.php
Last active Nov 3, 2020
Integrate your Toolset views slider with hammer.js
View functions.php
<?php
/**
* Register child theme assets
* Put this in your my-child-theme/functions.php
*/
function my_child_theme_scripts()
{
wp_enqueue_script('hammer', get_stylesheet_directory_uri() . '/assets/js/hammer.min.js', array(), '2.0.8', true);
// wp_enqueue_script('hammer-min', 'https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js', array(), '2.0.8');
@ArnoutPullen
ArnoutPullen / woocommerce-procedures.sql
Last active Jul 9, 2020
WooCommerce SQL Procedures
View woocommerce-procedures.sql
-- https://www.w3schools.com/sql/sql_stored_procedures.asp
-- https://codex.wordpress.org/Database_Description
-- https://github.com/woocommerce/woocommerce/wiki/Database-Description
CREATE PROCEDURE DeleteProduct @ProductID bigint(20)
AS
DELETE FROM wp_posts WHERE ID = @ProductID;
DELETE FROM wp_postmeta WHERE post_id = @ProductID;
DELETE c, cm
@ArnoutPullen
ArnoutPullen / woo-product-attributes-bulk-modifier.php
Created Jun 18, 2020 — forked from birgire/woo-product-attributes-bulk-modifier.php
WordPress: Woocommerce Product Attributes - Bulk Modifier ( from custom to taxonomy attributes)
View woo-product-attributes-bulk-modifier.php
<?php
/**
* Plugin Name: Product Attributes - Bulk Modifier
* Description: Bulk update 'custom product attributes' to 'taxonomy product attributes'. Supports the GET variables, like: wpq_mode=run&wpq_from=colour&wpq_to=pa_colour&wpq_ppp=10&wpq_offset=0&wpq_post_type=product&wpq_post_status=any. WARNING: Backup DB first!!!
* Plugin Author: birgire
* Plugin URI: https://gist.github.com/birgire/0ed300ae4436fcaf508c
* Version: 0.0.2
*/
/**
@ArnoutPullen
ArnoutPullen / elasticpress-toolset-integration.php
Created Oct 23, 2019
Integrate Toolset Views with ElasticPress
View elasticpress-toolset-integration.php
<?php
/**
* Integrate Toolset Views with ElasticPress
* https://github.com/10up/ElasticPress#supported-wp_query-parameters
* https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query
*/
function ep_toolset_integration( $query, $view_settings, $view_id ) {
$query['ep_integrate'] = true;