WordPress.org

Make WordPress Core

Ticket #12240: link-template.php.diff

File link-template.php.diff, 550 bytes (added by shidouhikari, 4 years ago)

This patch adds a new filter, allowing plugins to work over permalink before rewrite tags start being parsed and replaced

  • wp-includes/link-template.php

     
    110110                return get_post_permalink($post); 
    111111 
    112112        $permalink = get_option('permalink_structure'); 
     113         
     114        $permalink = apply_filters('post_link_raw', $permalink, $post, $leavename); 
    113115 
    114116        if ( '' != $permalink && !in_array($post->post_status, array('draft', 'pending', 'auto-draft')) ) { 
    115117                $unixtime = strtotime($post->post_date);