Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of how to customize unfiltered string content using PHP instruction str_replace
add_filter( 'wp_link_pages_args', 'change_link_pages_args' );
* Change the Link Pages Arguments - a demonstration of how to change
* "unfiltered" (meaning not passed through apply_filters())
* string data using PHP instruction str_replace().
* @since 1.0.0
* @param array $args
* @return array
function change_link_pages_args( array $args ) {
$args['before'] = str_replace( 'Pages:', 'Read More:', $args['before'] );
return $args;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment