/ Published in: PHP
Expand |
Embed | Plain Text
add_filter('the_content_more_link', 'jorbin_the_content_more_link_filter', 10, 2); function jorbin_the_content_more_link_filter($original, $more_link_text){ global $post; if( is_user_logged_in() ) { global $current_user; get_currentuserinfo(); $more_link_text = "Hey {$current_user->display_name}, why don't you read more"; } return '<a href="' . get_permalink() . "#more-{$post->ID}\" class='more-link'>$more_link_text</a>"; }
You need to login to post a comment.
