Make WordPress Core

Ticket #16230: 16230-Category-slug-length-fix.diff

File 16230-Category-slug-length-fix.diff, 629 bytes (added by sachinrajcp123, 7 months ago)
  • wp-includes/taxonomy.php

    diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php
    index 111aaaa..222bbbb 100644
    a b function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    563563
    564564    $defaults = array(
    565565        'alias_of' => '',
    566566        'description' => '',
    567567        'parent' => 0,
    568568        'slug' => '',
    569569    );
     570
     571    // Ensure slug length does not exceed 200 characters.
     572    if ( ! empty( $args['slug'] ) && strlen( $args['slug'] ) > 200 ) {