View gist:3028827
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
Index: plugin/class-facet-taxonomy.php | |
=================================================================== | |
--- plugin/class-facet-taxonomy.php (revision 566010) | |
+++ plugin/class-facet-taxonomy.php (working copy) | |
@@ -89,7 +89,7 @@ | |
$cache_key = md5( serialize( $matching_post_ids )); | |
- if( ! $this->facets->_matching_tax_facets = wp_cache_get( $cache_key , 'scrib-facet-taxonomy' )) | |
+ if( ! empty( $matching_post_ids ) && ! $this->facets->_matching_tax_facets = wp_cache_get( $cache_key , 'scrib-facet-taxonomy' )) |
View gist:3090584
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
$recTitle = $record['title']; | |
$encoding = mb_detect_encoding( $recTitle, 'UTF-8', true ); | |
if ( empty( $encoding ) ) { | |
$recTitle = mb_convert_encoding( $recTitle, 'UTF-8' ); | |
} |
View realurl.php
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 | |
$TYPO3_CONF_VARS['FE']['addRootLineFields'] .= ',tx_realurl_pathsegment,tx_realurl_exclude,tx_realurl_pathoverride,alias,nav_title,title'; | |
// @ref http://www.slideshare.net/jweiland/why-realurl-sucks-and-how-to-fix-it | |
$realurlConfig = array( | |
'init' => array( | |
'adminJumpToBackend' => true, | |
'appendMissingSlash' => 'ifNotFile,redirect[301]', | |
'emptyUrlReturnValue' => '/', |
View constants.txt
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
config { | |
# cat=basic/links; type=string; label=Absolute Reference Prefix: Used to convert relative paths to absolute paths. Use absolute URL like "http://www.example.com" to set. If empty, config.baseURL is used. If 0, config.absRefPrefix is unset. | |
absRefPrefix = | |
} |
View gist:4025107
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 | |
function add_attachment_caption( $meta, $attachment_id ) { | |
if ( ! empty( $meta['image_meta']['caption'] ) ) { | |
$data = array( | |
'ID' => $attachment_id, | |
// remove wrongly imported caption as description field | |
'post_content' => '', | |
'post_excerpt' => $meta['image_meta']['caption'], | |
); |
View gist:4025132
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
function register_attachment_taxonomy() { | |
add_post_type_support('attachment', 'post_tag'); | |
register_taxonomy_for_object_type('post_tag', 'attachment'); | |
} | |
add_action('admin_init', 'register_attachment_taxonomy'); | |
// add_filter('wp_read_image_metadata', 'read_all_image_metadata', '', 3); | |
function add_attachment_post_tags( $meta, $attachment_id ) { |
View debug.php
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 | |
/** | |
* WordPress debug helpers | |
* | |
* @author Michael Cannon <mc@aihr.us> | |
*/ | |
function wtfami( $uk = null ) { | |
if ( ! is_null( $uk ) ) echo $uk . " is…\n<br />"; |
View filter.php
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_filter( 'testimonials_widget_testimonial_html', 'my_testimonials_widget_testimonial_html', 10, 6 ); | |
// this function is a copy of Testimonials_Widget::get_testimonial_html and completely ignores what's in $content | |
function my_testimonials_widget_testimonial_html( $content, $testimonial, $atts, $is_list = true, $is_first = false, $widget_number = null ) { | |
$atts = wp_parse_args( $atts, Testimonials_Widget::get_defaults( true ) ); | |
$atts = Testimonials_Widget_Settings::validate_settings( $atts ); | |
// display attributes |
View purge-wp-transients.php
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: Purge Transients | |
Description: Purge old transients | |
Version: 0.1 | |
Author: Seebz | |
*/ | |
View testimonials-widget.css
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
.testimonialswidget_testimonials { | |
/* testimonials wrapper */ | |
} | |
.testimonialswidget_testimonials .testimonialswidget_active { | |
/* active testimonials */ | |
display: block; | |
} | |
.testimonialswidget_testimonials .testimonialswidget_display_none { |
OlderNewer