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
HIRE Me For Your Project Support :) | |
Telegram: https://t.me/LinuxGun | |
#!/bin/bash | |
# Completely Remove Apache Ubuntu | |
service apache2 stop | |
apt purge apache2 apache2-utils apache2.2-bin | |
apt remove apache2.* | |
apt autoremove | |
whereis apache2 |
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
disposable_emails = [ | |
"yopmail.com", | |
"0-mail.com", | |
"0815.ru", | |
"0clickemail.com", | |
"0wnd.net", | |
"0wnd.org", | |
"10minutemail.com", | |
"20minutemail.com", | |
"2prong.com", |
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_action( 'woocommerce_cart_loaded_from_session', 'wpm_cart_order_items_by_price' ); | |
function wpm_cart_order_items_by_price( $cart ) { | |
//if the cart is empty do nothing | |
if ( empty( $cart->cart_contents ) ) { | |
return; | |
} | |
//this is an array to collect cart items |
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_filter( 'pre_get_posts', 'add_cpt_to_loop_and_feed' ); | |
/** | |
* @author Brad Dalton | |
* @example http://wpsites.net/wordpress-tips/add-custom-post-type-to-rss-feed/ | |
* @copyright 2014 WP Sites | |
*/ | |
function add_cpt_to_loop_and_feed( $query ) { | |
if ( is_home() && $query->is_main_query() || is_feed() ) | |
$query->set( 'post_type', array( 'post', 'your-cpt' ) ); |
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 | |
add_action( 'woocommerce_cart_loaded_from_session', function() { | |
global $woocommerce; | |
$products_in_cart = array(); | |
foreach ( $woocommerce->cart->cart_contents as $key => $item ) { | |
$products_in_cart[ $key ] = $item['data']->get_title(); | |
} |
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 | |
/* | |
* Outputs a color (#000000) based Text input | |
* | |
* @param $text String of text | |
* @param $min_brightness Integer between 0 and 100 | |
* @param $spec Integer between 2-10, determines how unique each color will be | |
*/ | |
function genColorCodeFromText($text,$min_brightness=100,$spec=10) |