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 | |
global $wpdb; | |
$query = $wpdb->prepare("SELECT post_id, table1.meta_value as sku, table2.meta_value as price ". | |
"FROM {$wpdb->postmeta} as table1 ". | |
"JOIN {$wpdb->postmeta} as table2 USING (post_id) ". | |
"WHERE ". | |
"table1.meta_key = '_sku' AND ". | |
"table2.meta_key = '_price' ". |
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 | |
$args = [ | |
'post_type' => 'product', | |
'posts_per_page' => 24, | |
'post_status' => 'publish', | |
'tax_query' => [ | |
'relation' => 'AND', | |
[ | |
'taxonomy' => 'pa_brand', |
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 | |
/** | |
* copyrights andrew killen 2017 | |
* | |
* Attribution-ShareAlike 4.0 International. | |
**/ | |
/** | |
* This will get the contents from the db about the current values, optionally if you have setup |
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: New User Roles | |
Plugin URI: https://github.com/andykillen | |
Description: Adds additional role(s) | |
Version: 1.0 | |
Author: Andrew Killen | |
*/ | |
function new_user_roles_plugin_activation() { |
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 | |
/** | |
* PSR-0 style class with static methods to delete the SWIFT caches on comment approval. | |
* | |
* To make this PSR-4 add a namespace, and prefix Swift_Performance_Cache with a \ | |
* I think its much better that way and saves the much larger Class name. | |
* | |
* I've included the init at the bottom, but normally I would have that in a place with all | |
* other calls so that they are easily visible, like the functions.php | |
* |
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
externalauth | |
ctools | |
cleantalk | |
contribute | |
config_filter | |
action | |
automated_cron | |
block | |
breakpoint | |
ckeditor |
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 | |
/** | |
* Template Name: Facebook sees the image | |
* | |
**/ | |
/** | |
* Force no caching, just in case you have some fancy varnish, load balancer | |
* or other things | |
**/ |
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 | |
/** | |
* Template Name: Facebook quiz redirect | |
* | |
**/ | |
function check_if_facebook(){ | |
/** | |
* this function checks if the current thing accessing the site is a facebook | |
* bot or not. |
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
/* ignore netbeans */ | |
/nbproject/private/ | |
/nbproject/ | |
/* ignore WP core and misc for wordpress on */ | |
wp-content/blogs.dir/ | |
wp-content/upgrade/ | |
wp-content/backup-db/ | |
wp-content/advanced-cache.php | |
wp-content/wp-cache-config.php |
NewerOlder