Skip to content

Instantly share code, notes, and snippets.

View surefirewebserv's full-sized avatar

Jonathan Perez surefirewebserv

View GitHub Profile
@thomasgriffin
thomasgriffin / gist:9219422
Created February 25, 2014 22:35
Add the image title as a caption below the image in the gallery display.
<?php
add_filter( 'envira_gallery_output_after_link', 'tgm_envira_gallery_caption', 10, 5 );
/**
* Adds a caption below each image in the gallery.
*
* @since 1.0.0
*
* @param string $output String of gallery output.
* @param mixed $id The ID of the gallery.
* @param array $item Array of data about the image.
@markjaquith
markjaquith / fix-twitter-https.php
Created January 21, 2014 02:14
Fix Twitter embeds in WordPress < 3.8.1
<?php
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 );
function oembed_fix_twitter( $providers ) {
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true );
return $providers;
}
@thomasgriffin
thomasgriffin / gist:7308584
Created November 4, 2013 20:17
Blank canvas for styling a Soliloquy slider.
<?php
add_action( 'tgmsp_before_slider_output', 'tgm_custom_slider_theme' );
function tgm_custom_slider_of_madness( $id ) {
// If not the proper slider ID, do nothing. Change to match your slider ID.
if ( '324' !== $id ) return;
// Dequeue the default styles.
wp_dequeue_style( 'soliloquy-style' );