WordPress.org

Make WordPress Core

Ticket #14440: adjacent_post_link.patch

File adjacent_post_link.patch, 628 bytes (added by mfields, 5 years ago)
  • link-template.php

     
    13421342 * @param bool $previous Optional, default is true. Whether display link to previous post. 
    13431343 */ 
    13441344function adjacent_post_link($format, $link, $in_same_cat = false, $excluded_categories = '', $previous = true) { 
     1345        $override = apply_filters( 'override_adjacent_post_link', '' ); 
     1346        if( !empty( $override ) ) { 
     1347                return $override; 
     1348        } 
    13451349        if ( $previous && is_attachment() ) 
    13461350                $post = & get_post($GLOBALS['post']->post_parent); 
    13471351        else