Skip to content

Instantly share code, notes, and snippets.

@billerickson

billerickson/functions.php Secret

Created Dec 9, 2018
Embed
What would you like to do?
<?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