Make WordPress Core

Ticket #32786: 32786.diff

File 32786.diff, 659 bytes (added by MikeHansenMe, 11 years ago)
  • src/wp-includes/link-template.php

     
    907907 */
    908908function get_edit_term_link( $term_id, $taxonomy, $object_type = '' ) {
    909909        $tax = get_taxonomy( $taxonomy );
    910         if ( !current_user_can( $tax->cap->edit_terms ) )
     910        if ( ! current_user_can( $tax->cap->edit_terms ) ) {
    911911                return;
     912        }
    912913
    913914        $term = get_term( $term_id, $taxonomy );
    914915
     916        if ( is_wp_error( $term ) || is_null( $term ) ) {
     917                return;
     918        }
     919
    915920        $args = array(
    916921                'action' => 'edit',
    917922                'taxonomy' => $taxonomy,