{$boundary}_post_rel_link
Filter HookDescription
Get boundary post relational link. Can either be start or end post relational link.Hook Information
File Location |
wp-includes/deprecated.php
View on GitHub
|
Hook Type | Filter |
Line Number | 2712 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$title
|
Optional. Link title format. Default '%title'. |
bool
|
$in_same_cat
|
Optional. Whether link should be in a same category. Default false. |
string
|
$excluded_categories
|
Optional. Excluded categories IDs. Default empty. |
bool
|
$start
|
Optional. Whether to display link to first or last post. Default true. |
Usage Examples
Basic Usage
<?php
// Hook into {$boundary}_post_rel_link
add_filter('{$boundary}_post_rel_link', 'my_custom_filter', 10, 4);
function my_custom_filter($title, $in_same_cat, $excluded_categories, $start) {
// Your custom filtering logic here
return $title;
}
Source Code Context
wp-includes/deprecated.php:2712
- How this hook is used in WordPress core
<?php
2707 $link = $start ? "<link rel='start' title='" : "<link rel='end' title='";
2708 $link .= esc_attr($title);
2709 $link .= "' href='" . get_permalink($post) . "' />\n";
2710
2711 $boundary = $start ? 'start' : 'end';
2712 return apply_filters( "{$boundary}_post_rel_link", $link );
2713 }
2714
2715 /**
2716 * Display relational link for the first post.
2717 *
PHP Documentation
<?php
/**
* Get boundary post relational link.
*
* Can either be start or end post relational link.
*
* @since 2.8.0
* @deprecated 3.3.0
*
* @param string $title Optional. Link title format. Default '%title'.
* @param bool $in_same_cat Optional. Whether link should be in a same category.
* Default false.
* @param string $excluded_categories Optional. Excluded categories IDs. Default empty.
* @param bool $start Optional. Whether to display link to first or last post.
* Default true.
* @return string
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/deprecated.php
Related Hooks
Related hooks will be displayed here in future updates.