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
<?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'); |
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
-- 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 |
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
<?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 | |
*/ | |
/** |
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
<?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; |