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 | |
/* | |
Usage: | |
$frag = new CWS_Fragment_Cache( 'unique-key', 3600 ); // Second param is TTL | |
if ( !$frag->output() ) { // NOTE, testing for a return of false | |
functions_that_do_stuff_live(); | |
these_should_echo(); | |
// IMPORTANT | |
$frag->store(); | |
// YOU CANNOT FORGET THIS. If you do, the site will break. |
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
add_action( 'bp_setup_nav', 'add_videos_subnav_tab', 100 ); | |
function add_videos_subnav_tab() { | |
global $bp; | |
bp_core_new_subnav_item( array( | |
'name' => 'Videos', | |
'slug' => 'videos', | |
'parent_url' => trailingslashit( bp_loggedin_user_domain() . 'friends' ), |
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 # -*- coding: utf-8 -*- | |
/* | |
Plugin Name: All Actions List | |
Description: Lists all actions run during one request. | |
Version: 1.0 | |
Required: 3.1 | |
Author: Thomas Scholz | |
Author URI: http://toscho.de | |
License: GPL | |
*/ |
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
add_filter( 'tw_query_args', array( &$this, 'query_args' ), 10, 2 ); | |
public function query_args( $args, $atts ) { | |
global $wpdb; | |
$args['post_type'] = $atts['post_type']; | |
$no_cache = $atts['no_cache']; | |
if ( $no_cache ) { | |
$args['no_cache'] = 1; |
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
From b5818c205b382c001867a6ee5bd811cbe745f5cb Mon Sep 17 00:00:00 2001 | |
From: Subharanjan Mantri <subharanjan@axelerant.com> | |
Date: Thu, 28 May 2015 14:15:44 +0530 | |
Subject: [PATCH] Quick Fix for the LDAP id issue while authentication in | |
adLDAP. | |
--- | |
.../plugins/active-directory-integration/ad_ldap/adLDAP.php | 8 ++++++-- | |
1 file changed, 6 insertions(+), 2 deletions(-) |
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
/** | |
* Load different template for content as per conditions. | |
* | |
* @param $templates | |
* @param $slug | |
* @param $name | |
* | |
* @return mixed | |
*/ | |
function load_alternate_template( $templates, $slug, $name ) { |
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
if ( !function_exists( 'write_log' ) ) { | |
function write_log ( $log ) { | |
if ( true === WP_DEBUG ) { | |
error_log('---------------------------------'); | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} |
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
--- wp-content/plugins/testimonials-widget/templates/testimonial-cite.php (revision ) | |
+++ wp-content/plugins/testimonials-widget/templates/testimonial-cite.php (revision ) | |
@@ -62,6 +62,18 @@ | |
$cite = apply_filters( 'tw_cite_html', $cite, $testimonial, $atts ); | |
+$testimonial_category = ''; | |
+$terms = get_the_terms( $testimonial['post_id'], 'category' ); | |
+if ( $terms && ! is_wp_error( $terms ) ) { | |
+ $term_names = 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
GitHub.TreeSlider = function () { | |
if (window.history && window.history.pushState) { | |
function a() { | |
if (e.sliding) { | |
e.sliding = false; | |
$(".frame-right").hide(); | |
$(".frame-loading:visible").removeClass("frame-loading") | |
} | |
} | |
if (!($("#slider").length == 0 || !GitHub.shouldSlide)) if (!navigator.userAgent.match(/(iPod|iPhone|iPad)/)) { |
OlderNewer