This file contains hidden or 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
RewriteEngine On | |
# add-ons rewrite rule. Note absence of slash in "rewrite to" (second portion of rewriterule) | |
# this makes the rewrite relative to the directroy of the .htaccess file unless RewriteBase is defined | |
RewriteRule ^add-ons/apps/([a-zA-Z0-9-/]+)$ add-ons/apps.php?s=$1 [L] | |
# The "most generic" rule comes last, as "more specific" rules should match first. | |
# Added a check to see if we've already got .php in the URL. | |
RewriteCond %{REQUEST_URI} !.php$ | |
RewriteRule ^(.+)$ $1.php [L,QSA] |
This file contains hidden or 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
function add_all_integers(i) { | |
// i is an array that might contain arrrays, integers, strings, add all integers within it | |
var total = 0; | |
function add_iterate(item) { | |
for(var counter=0;counter<item.length;counter++) { | |
if(typeof item[counter] == 'object') { | |
add_iterate(item[counter]); | |
} else if(typeof item[counter] == 'number') { |
This file contains hidden or 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 | |
class ValidatableModelTest extends TestCase { | |
public $validatable_model; | |
public function setUp() { | |
$this->validatable_model = new ValidatableModel; | |
} | |
/** |
This file contains hidden or 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 | |
// OLD QUERY, 0.525s: | |
$finalSQL = "SELECT * FROM {$wpdb->prefix}postmeta as `m1` WHERE {$whereSQL} m1.post_id IN ( SELECT post_id FROM {$wpdb->prefix}postmeta as `m` WHERE 1 = 1 AND m.meta_key ='_pprredirect_active' AND m.meta_value = '1');"; | |
// NEW query, 0.0007s: | |
$finalSQL = "SELECT m1.* FROM {$wpdb->prefix}postmeta as `m1` INNER JOIN {$wpdb->prefix}postmeta as `m` WHERE 1 = 1 AND m.meta_key ='_pprredirect_active' AND m.meta_value = '1' AND m.post_id = m1.post_id"; |