WordPress.org

Make WordPress Core

Ticket #12721: 12721.diff

File 12721.diff, 786 bytes (added by prettyboymp, 5 years ago)
  • wp-includes/link-template.php

     
    791791        if ( !current_user_can( $post_type_object->edit_cap, $post->ID ) ) 
    792792                return; 
    793793 
    794         return apply_filters( 'get_edit_post_link', admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID) ), $post->ID, $context ); 
     794        if( preg_match("/^http(s?):/i", $post_type_object->_edit_link ) ) 
     795                $edit_url = sprintf($post_type_object->_edit_link . $action, $post->ID); 
     796        else  
     797                $edit_url = admin_url( sprintf($post_type_object->_edit_link . $action, $post->ID) ); 
     798                 
     799        return apply_filters( 'get_edit_post_link', $edit_url, $post->ID, $context ); 
    795800} 
    796801 
    797802/**