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 | |
/** | |
* Redirect to forum on Group home page | |
* | |
* http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/changing-group-tab-display-defaults/?topic_page=2&num=15 | |
*/ | |
function sfire_redirect_to_forum() { | |
global $bp; | |
$path = clean_url( $_SERVER['REQUEST_URI'] ); |
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 | |
/* = Generate Custom Activity Stream | |
----------------------------------------------- | |
* Place this function anywhere you want to show your custom stream. | |
* Should accept any of these parameters: | |
* http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-activity-stream-loop/ | |
*/ |
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 | |
/** | |
Plugin Name: nrelate Related Content | |
Plugin URI: http://www.nrelate.com | |
Description: Easily display related content on your website. Click on <a href="admin.php?page=nrelate-related">nrelate → Related Content</a> to configure your settings. | |
Author: <a href="http://www.nrelate.com">nrelate</a> and <a href="http://www.slipfire.com">SlipFire</a> | |
Version: 0.51.1b | |
Author URI: http://nrelate.com/ | |
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 | |
/** | |
* Plugin Admin File | |
* | |
* Settings for this plugin | |
* | |
* @package nrelate | |
* @subpackage Functions | |
*/ |
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
public static function attachment_fields_to_edit($form_fields, $post) | |
{ | |
global $typenow; | |
if ($typenow =='attachment') | |
{ | |
if ($meta_boxes = self::meta_box($post)) | |
{ | |
$form_fields['_final'] = $meta_boxes . '<tr class="final"><td colspan="2">' . (isset($form_fields['_final']) ? $form_fields['_final'] : ''); | |
} | |
} |
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
public function get_meta_sql($meta_query, $queries, $type, $primary_table, $primary_id_column, $context) | |
{ | |
if (in_array($type, array('user'))) | |
{ | |
return $meta_query; | |
} | |
global $wpdb; | |
$where = array_filter(preg_split('/$\R?^/m', trim(substr($meta_query['where'], 6, strlen($meta_query['where']) - 8)))); |
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 | |
function parse_piklist_array($array) { | |
if ( empty($array) ) | |
return array(); | |
$keys = array_keys($array); | |
if ( empty($keys) ) | |
return array(); | |
$results = $values = array(); |
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 | |
// If you can edit pages, you can edit widgets | |
add_filter( 'user_has_cap', | |
function( $caps ) { | |
if ( ! empty( $caps['edit_pages'] ) ) | |
$caps['edit_theme_options'] = true; | |
return $caps; | |
} ); |
OlderNewer