WordPress.org

Make WordPress Core

Ticket #12349: check-already-existsing-slug-even-if-empty.diff

File check-already-existsing-slug-even-if-empty.diff, 491 bytes (added by nbachiyski, 4 years ago)
  • wp-includes/taxonomy.php

     
    14801480 
    14811481        if ( empty($slug) ) 
    14821482                $slug = sanitize_title($name); 
    1483         elseif ( is_term($slug) ) // Provided slug issue. 
     1483         
     1484        if ( is_term($slug) ) // Provided slug issue. 
    14841485                return new WP_Error('term_slug_exists', __('A Term with the slug provided already exists.')); 
    14851486 
    14861487        $term_group = 0;