-
-
Save billerickson/82ac2a970c1eaf5358c363c06cbee72f to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Mark current page in wp_link_pages() | |
* @see https://core.trac.wordpress.org/ticket/24705 | |
*/ | |
function be_mark_current_page( $link, $i ) { | |
if( $i == $link ) { | |
$link = '<span class="current-page-link">' . $i . '</span>'; | |
} | |
return $link; | |
} | |
add_filter( 'wp_link_pages_link', 'be_mark_current_page', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment