Make WordPress Core

Ticket #46010: 46010.diff

File 46010.diff, 593 bytes (added by subrataemfluence, 6 years ago)
  • wp-includes/

    diff --git wp-includes/taxonomy.php wp-includes/taxonomy-46010.php
    index 5bf03fc..4b745ae 100755
    old new function wp_insert_term( $term, $taxonomy, $args = array() ) { 
    21132113        }
    21142114
    21152115        $slug = wp_unique_term_slug( $slug, (object) $args );
     2116       
     2117        /**
     2118         * Let's check if the slug length is < 200 characters
     2119         */
     2120        if( strlen( $slug ) >= 200 ) {
     2121                return new WP_Error( 'db_insert_error', __( 'A slug cannot be more than 200 characters long.' ), $wpdb->last_error );
     2122        }
    21162123
    21172124        $data = compact( 'name', 'slug', 'term_group' );
    21182125