Filter hook 'parent_post_rel_link'

in WP Core File wp-includes/deprecated.php at line 2788

View Source

parent_post_rel_link

Filter Hook
Description
Get parent post relational link.

Hook Information

File Location wp-includes/deprecated.php View on GitHub
Hook Type Filter
Line Number 2788

Hook Parameters

Type Name Description
string $title Optional. Link title format. Default '%title'.

Usage Examples

Basic Usage
<?php
// Hook into parent_post_rel_link
add_filter('parent_post_rel_link', 'my_custom_filter', 10, 1);

function my_custom_filter($title) {
    // Your custom filtering logic here
    return $title;
}

Source Code Context

wp-includes/deprecated.php:2788 - How this hook is used in WordPress core
<?php
2783  
2784  	$link = "<link rel='up' title='";
2785  	$link .= esc_attr( $title );
2786  	$link .= "' href='" . get_permalink($post) . "' />\n";
2787  
2788  	return apply_filters( "parent_post_rel_link", $link );
2789  }
2790  
2791  /**
2792   * Display relational link for parent item
2793   *

PHP Documentation

<?php
/**
 * Get parent post relational link.
 *
 * @since 2.8.0
 * @deprecated 3.3.0
 *
 * @global WP_Post $post Global post object.
 *
 * @param string $title Optional. Link title format. Default '%title'.
 * @return string
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/deprecated.php
Related Hooks

Related hooks will be displayed here in future updates.