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
#!/bin/bash | |
# Input and output file paths | |
input_file="input_slugs.txt" | |
output_file="output_slugs.txt" | |
# Check if input file exists | |
if [ ! -f "$input_file" ]; then | |
echo "Input file '$input_file' not found." | |
exit 1 |
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
-- Delete order products | |
DELETE FROM oc_order_product | |
WHERE order_id IN ( | |
SELECT order_id | |
FROM oc_order | |
WHERE date_added < DATE_SUB(NOW(), INTERVAL 1 WEEK) | |
); | |
-- Delete order options | |
DELETE FROM oc_order_option |
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
// Fully Disable Gutenberg editor. | |
add_filter('use_block_editor_for_post_type', '__return_false', 10); | |
// Don't load Gutenberg-related stylesheets. | |
add_action( 'wp_enqueue_scripts', 'remove_block_css', 100 ); | |
function remove_block_css() { | |
wp_dequeue_style( 'wp-block-library' ); // Wordpress core | |
wp_dequeue_style( 'wp-block-library-theme' ); // Wordpress core | |
wp_dequeue_style( 'wc-block-style' ); // WooCommerce | |
wp_dequeue_style( 'storefront-gutenberg-blocks' ); // Storefront theme | |
} |
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
languages: [ | |
{ | |
label: "English", | |
code: "en", | |
}, | |
{ | |
label: "Deutsch", | |
code: "de", | |
}, | |
{ |
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
# lsapi configuration for alt-php72 | |
<IfModule lsapi_module> | |
lsapi_engine On | |
AddHandler application/x-httpd-alt-php72___lsphp .php .php7 .phtml | |
</IfModule> | |
# lsapi configuration for alt-php73 | |
<IfModule lsapi_module> | |
lsapi_engine On | |
AddHandler application/x-httpd-alt-php73___lsphp .php .php7 .phtml |
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
INSERT INTO `2p_product_to_category` | |
SELECT p.product_id, c.parent_id | |
FROM `2p_product_to_category` p | |
LEFT JOIN `2p_category` c on p.category_id = c.category_id | |
WHERE NOT EXISTS (SELECT * FROM `2p_product_to_category` pc WHERE pc.product_id = p.product_id and | |
pc.category_id = c.parent_id ) AND c.parent_id !=0 |
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
/** | |
* WooCommerce Display Stock Availablity | |
*/ | |
add_filter( 'woocommerce_get_availability', 'mg_display_stock_availability', 1, 2); | |
function mg_display_stock_availability( $availability, $_product ) { | |
global $product; | |
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
<? | |
header('Content-Type: text/plain'); | |
/** | |
* Changes permissions on files and directories within $dir and dives recursively | |
* into found subdirectories. | |
*/ | |
function chmod_r($dir, $dirPermissions, $filePermissions) { | |
$dp = opendir($dir); | |
while($file = readdir($dp)) { |
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
//add home to breadcrumps | |
document.body.onload = addbrElement; | |
function addbrElement () { | |
const newSpan = document.createElement("span"); | |
// and give it some content | |
const newContent = document.createTextNode("Home!"); | |
// add the text node to the newly created div |
NewerOlder