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 | |
/* | |
* dl-file.php | |
* | |
* Protect uploaded files with login. | |
* | |
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in | |
* | |
* @author hakre <http://hakre.wordpress.com/> | |
* @license GPL-3.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
<?php | |
function add_query_vars($aVars) { | |
$aVars[] = "locname"; // query slug | |
return $aVars; | |
} | |
function add_rewrite_rules2($aRules) { | |
$aNewRules = array('location/([^/]+)/?$' => 'index.php?pagename=location&locname=$matches[1]'); | |
$aRules = $aNewRules + $aRules; |
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: Paulund WP List Table Example | |
* Description: An example of how to use the WP_List_Table class to display data in your WordPress Admin area | |
* Plugin URI: http://www.paulund.co.uk | |
* Author: Paul Underwood | |
* Author URI: http://www.paulund.co.uk | |
* Version: 1.0 | |
* License: GPL2 | |
*/ |
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
select distinct | |
# uncomment these rows for debugging | |
# p.ID, | |
# v.ID, | |
if( isnull(vm_sku.meta_value), pm_sku.meta_value, vm_sku.meta_value ) as 'sku', | |
p.post_title, | |
# need to cast prices to decimal because the datatype is not enforced otherwise |
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 "start" | |
user=root | |
pass=root | |
database=centent_db_dev | |
o_user=OR_AD | |
o_pass=or_ad | |
o_database=or | |
o_user_upper=OR_AD | |
path="$(pwd)/mod_bk.sql" |