the_content_more_link

Filters the Read More link text.

Description

apply_filters( 'the_content_more_link', (string) $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a, (string) $more_link_text ); 

Parameters (2)

0. $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a — Optional. (string) => ' ID}\" class=\"more-link\">$more_link_text"
The href get permalink more post id class more link more link text a.
1. $more_link_text (string)
The more link text.

Usage

To run the hook, copy the example below.
  1. $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a = apply_filters( 'the_content_more_link', $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a, $more_link_text ); 
  2.  
  3. if ( !empty( $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the the_content_more_link callback 
  2. function filter_the_content_more_link( $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a, $more_link_text ) { 
  3. // make filter magic happen here... 
  4. return $a_href_get_permalink_more_post_id_class_more_link_more_link_text_a
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'the_content_more_link', 'filter_the_content_more_link', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'the_content_more_link', 'filter_the_content_more_link', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/post-template.php  
  1. $output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink() . "#more-{$post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text );