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 | |
//get the review type based on page custom meta field | |
function oswc_get_review_meta($postid) { | |
//try every reasonble conceivable variation that the user my enter to make this as user friendly as possible | |
$possible = array( | |
'Review Type', | |
'review type', | |
'reviewtype', | |
'Reviewtype', |
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
// http://www.evanmiller.org/how-not-to-sort-by-average-rating.html | |
// http://gist.github.com/raw/63002/b53853727856bad494dcbb7ffed4fc17f289af92/gistfile1.rb | |
// $z is the pnormaldist with power = 0.05. I.e., pnormaldist(1-power/2) | |
function score($pos, $n) { | |
if ($n == 0) { return 0; } | |
$z = 1.95996397158435; | |
$phat = 1.0*$pos/$n; | |
return ($phat + $z*$z/(2*$n) - $z * sqrt(($phat*(1-$phat)+$z*$z/(4*$n))/$n))/(1+$z*$z/$n); | |
} |
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 | |
/** | |
* Find unset PHP variables | |
* | |
* Deals with scope fairly correctly. | |
* | |
* Known bugs: | |
* - Does not yet support `if: ... endif;` (etc) | |
* - Does not yet support {$a}/${a} (coming soon) | |
*/ |
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 | |
/***** | |
All new versions will be posted at | |
https://github.com/rmccue/Rotor_WPPlugin | |
Please use that repository instead of this Gist. | |
******/ |
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: Taxononmy Navigation Dropdown | |
Version: 0.1 | |
Plugin URI: http://anthonycole.me/wordpress/taxonomy-nav-dropdown/ | |
Description: This plugin allows you to add a simple widget linking all of your taxonomies together. | |
Author: Anthony Cole | |
Author URI: http://anthonycole.me/ | |
Copyright 2010 Anthony Cole ( email: [email protected] ) |
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 | |
/* Merge multiple RSS feeds with SimplePie | |
* | |
* Just modify the path to SimplePie and | |
* modify the $feeds array with the feeds you want | |
* | |
* You should probably also change the channel title, link and description, | |
* plus I added a CC license you may not want | |
* | |
* Help from: http://www.webmaster-source.com/2007/08/06/merging-rss-feeds-with-simplepie/ |