Last active
August 29, 2015 14:08
-
-
Save n7studios/facef239b21e56a452ed to your computer and use it in GitHub Desktop.
Soliloquy - Featured Content Addon - Change "Continue Reading" Link
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 - Featured Content Addon - Change Link | |
* Plugin URI: http://soliloquywp.com | |
* Version: 1.0 | |
* Author: Tim Carr | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Change the "Continue Reading" link for Featured Content slides | |
*/ | |
/** | |
* Change the "Continue Reading" link | |
* | |
* @param string $content HTML Anchor | |
* @param WP_Post $post Featured Content Post | |
* @param array $data Soliloquy Slider Configuration Data | |
* @return string HTML Anchor | |
*/ | |
function soliloquy_fc_change_link( $content, $post, $data ) { | |
// Start Config | |
$sliderID = '1625'; // The slider you want to change the Continue Reading link on | |
$link = 'http://google.com'; // The link for the 'Continue Reading' text | |
// End Config | |
// Check slider ID is the one we want to amend | |
if ( $data['id'] != $sliderID ) { | |
return $content; | |
} | |
// Return amended link | |
return '<a href="http://google.com" class="soliloquy-fc-read-more soliloquy-fc-content-above" title="'.__( 'Continue Reading', 'soliloquy-featured-content' ).'">'.__( 'Continue Reading', 'soliloquy-featured-content' ).'</a>'; | |
} | |
add_filter( 'soliloquy_fc_read_more', 'soliloquy_fc_change_link', 1, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment