Created
December 17, 2015 21:10
-
-
Save imath/74cf4c901608c2097902 to your computer and use it in GitHub Desktop.
More link for WP Idea Stream < 2.3.0
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 | |
/** | |
* Build a custom more link for Ideas | |
* | |
* This is to be used with WP Idea Stream < 2.3.0 | |
* | |
* @param string $more | |
* @return string the more link | |
*/ | |
function to_use_till_you_upgraded_to_WP_4_4_and_WP_Idea_Stream_2_3( $more = '' ) { | |
if ( ! wp_idea_stream_is_idea_archive() ) { | |
return $more; | |
} | |
return '… <a href="' . wp_idea_stream_ideas_get_permalink() . '" class="more-link">Continue reading →</a>'; | |
} | |
add_filter( 'excerpt_more', 'to_use_till_you_upgraded_to_WP_4_4_and_WP_Idea_Stream_2_3', 20, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment