Created
February 11, 2015 18:58
-
-
Save n7studios/8abf716cbf413daaecdc to your computer and use it in GitHub Desktop.
Soliloquy - Inject Slides
This file contains hidden or 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 - Inject Slides | |
* Plugin URI: http://soliloquywp.com | |
* Version: 1.0 | |
* Author: Tim Carr | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Disable touchswipe on mobile | |
*/ | |
/** | |
* Inject slides to a specific slider | |
*/ | |
function soliloquy_inject_slides( $data, $slider_id ) { | |
// Only apply to slider ID 467 | |
if ( $slider_id != 467) { | |
return $data; | |
} | |
// Inject Image Slide | |
$data['slider']['custom-1000'] = array( | |
'id' => 'custom-1000', | |
'status'=> 'active', | |
'src' => 'http://placehold.it/900x900', | |
'title' => 'Custom Image Slide', | |
'link' => 'http://soliloquywp.com', | |
'alt' => 'Placehold Image', | |
'caption'=> 'Placehold Caption', | |
); | |
return $data; | |
} | |
add_filter( 'soliloquy_pre_data', 'soliloquy_inject_slides', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment