Skip to content

Instantly share code, notes, and snippets.

@n7studios
Created November 19, 2014 16:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n7studios/e20aa84f708f30849cbd to your computer and use it in GitHub Desktop.
Save n7studios/e20aa84f708f30849cbd to your computer and use it in GitHub Desktop.
Soliloquy - Change Image URL
<?php
/**
* Plugin Name: Soliloquy - Change Image URL
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Change the URL of each image in your slider to something else
*/
/**
* Start the slider based on the supplied index
*
* @param string $imageURL Image URL
* @param int $id Image ID
* @param array $item Slider Item
* @param array $data Slider Data
* @return string Image URL
*/
function soliloquy_change_image_url( $imageURL, $id, $item, $data ) {
return str_replace('http://www.rockbrookcamp.com', 'http://static.rockbrookcamp.com', $imageURL);
}
add_filter( 'soliloquy_image_src', 'soliloquy_change_image_url', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment