Forked from n7studios/soliloquy-inject-slides.php
Last active
August 29, 2015 14:15
-
-
Save ericakfranz/32ad2f8ccea42946d5b7 to your computer and use it in GitHub Desktop.
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