Created
November 19, 2014 16:31
-
-
Save n7studios/e20aa84f708f30849cbd to your computer and use it in GitHub Desktop.
Soliloquy - Change Image URL
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: 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