the_content_more_link
Filter HookDescription
Filters the Read More link text.Hook Information
File Location |
wp-includes/post-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 376 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$more_link_element
|
Read More link element. |
string
|
$more_link_text
|
Read More text. |
Usage Examples
Basic Usage
<?php
// Hook into the_content_more_link
add_filter('the_content_more_link', 'my_custom_filter', 10, 2);
function my_custom_filter($more_link_element, $more_link_text) {
// Your custom filtering logic here
return $more_link_element;
}
Source Code Context
wp-includes/post-template.php:376
- How this hook is used in WordPress core
<?php
371 * @since 2.8.0
372 *
373 * @param string $more_link_element Read More link element.
374 * @param string $more_link_text Read More text.
375 */
376 $output .= apply_filters( 'the_content_more_link', ' <a href="' . get_permalink( $_post ) . "#more-{$_post->ID}\" class=\"more-link\">$more_link_text</a>", $more_link_text );
377 }
378 $output = force_balance_tags( $output );
379 }
380 }
381
PHP Documentation
<?php
/**
* Filters the Read More link text.
*
* @since 2.8.0
*
* @param string $more_link_element Read More link element.
* @param string $more_link_text Read More text.
*/
Quick Info
- Hook Type: Filter
- Parameters: 2
- File: wp-includes/post-template.php
Related Hooks
Related hooks will be displayed here in future updates.