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_filter('add_to_cart_redirect', 'themeprefix_add_to_cart_redirect'); | |
function themeprefix_add_to_cart_redirect() { | |
global $woocommerce; | |
$checkout_url = $woocommerce->cart->get_checkout_url(); | |
return $checkout_url; | |
} | |
//Add New Pay Button Text |
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
#!/usr/bin/python | |
import time | |
import os | |
username="db_username" | |
password="db_pass" | |
hostname="db_host" | |
filestamp=time.strftime('%Y%m%d-%H%M') | |
rootfolder="/var/www/www.pixellarylabs.com/public_html/clients/" |
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 | |
/** | |
* PXHelper by Javier Otero | |
* | |
* GNU General Public License, version 2 | |
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html | |
* | |
*/ | |
// --------------------------------------------------- |
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 | |
echo $* | |
CURRENT_DATE=`date '+%Y%m%d-%Hh%M'` | |
WP_DATABASE=database_name | |
WP_FOLDER=wpfolder | |
WP_THEME=themefoldername | |
WP_CONTENT_PATH=/var/www/"$WP_FOLDER"/ | |
WP_THEME_PATH=/var/www/"$WP_FOLDER"/wp-content/themes/ | |
#Backup database |
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
<snippet> | |
<content><![CDATA[ | |
add_action( 'init', 'register_cpt_${1:test}' ); | |
function register_cpt_${1:test}() { | |
\$labels = array( | |
'name' => _x( '${2:Tests}', '${1:test}' ), | |
'singular_name' => _x( '${3:Test}', '${1:test}' ), |
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
class PageTemplater { | |
/** | |
* A Unique Identifier | |
*/ | |
protected $plugin_slug; | |
/** | |
* A reference to an instance of this class. | |
*/ |
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 | |
// Query Arguments | |
$args = array( | |
'post_type' => 'review', | |
'posts_per_page' => 10, | |
'paged' => get_query_var( 'paged', false ), | |
'meta_query' => array( | |
'relation' => 'AND', | |
'be_top_pick' => array( | |
'key' => 'be_top_pick', |
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
/* Column Classes | |
------------------------------------------------------------ */ | |
.five-sixths, | |
.four-fifths, | |
.four-sixths, | |
.one-fifth, | |
.one-fourth, | |
.one-half, | |
.one-sixth, |
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
CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'password'; | |
CREATE DATABASE demo; | |
GRANT ALL PRIVILEGES ON *.* TO 'wpuser'@'localhost'; | |
FLUSH PRIVILEGES; |
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 | |
WP_DBUSER=root | |
WP_DBPASS=password | |
BCK_FILE_DB=/path/to/backups/ | |
DBS=`mysql -u$WP_DBUSER -h localhost -p$WP_DBPASS -Bse 'show databases'` | |
for db in $DBS | |
do | |
echo 'database:' $db | |
mysqldump --add-drop-table -h localhost -u $WP_DBUSER -p $db --password=$WP_DBPASS | gzip > $BCK_FILE_DB$db.tar.gz |