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 | |
/** | |
* Turn email-style quotes into blockquotes | |
* | |
* For example: | |
* | |
* My friend said: | |
* | |
* > You are handsome and also |
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 | |
# cd into the directory | |
cd ~/gitsync/github-wordpress-sync/; | |
# Make sure we are not already running | |
if [ -f .sync-running ];then | |
if test ! `find ".sync-running" -mmin +10`;then | |
# Currently running, but not stuck | |
exit 1; | |
fi | |
fi; |
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 | |
/** | |
* This is a quick and dirty class to work around the fact that bp_has_groups() does not have a | |
* meta_query parameter (or even an 'in' parameter). Usage: | |
* | |
* 1) Just before you fire up your bp_has_groups() loop, instantiate the BP_Groups_Meta_Filter | |
* class, with parameters $key and $value | |
* 2) Do your groups loop as normal | |
* 3) When you've closed the bp_has_groups() loop (endif;), call the method remove_filters() just |
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 | |
/** | |
* Updates Woo Framework in all WooThemes on a WP installation | |
* | |
* To use: | |
* | |
* - Get the latest copy of the framework | |
* - Unzip to /wp-content/framework/ | |
* - Visit wp-admin?cac_update_woo=1 as super admin |
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 an 'Other' type to xprofile fields | |
* | |
* @link https://buddypress.trac.wordpress.org/ticket/3775 | |
* @link http://redmine.gc.cuny.edu/issues/1199 | |
*/ | |
class CAC_Xprofile_Other { | |
function __construct() { | |
add_action( 'xprofile_field_additional_options', array( &$this, 'render_admin' ) ); |
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 | |
$categories = get_the_category(); | |
// Assemble a tree of category relationships | |
// Also re-key the category array for easier | |
// reference | |
$category_tree = array(); | |
$keyed_categories = array(); |
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 | |
/** | |
* Does the grunt work | |
*/ | |
function bbg_test_groupblog_idea2() { | |
global $wpdb, $bp, $current_blog; | |
// Never do this on the root blog | |
if ( bp_is_root_blog() ) |
NewerOlder