WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/02/2017 09:51:09 PM (4 years ago)
Author:
afercia
Message:

Quick/Bulk Edit: Improve the inline error messages styling.

  • uses the core notice styles for the Quick Edit form inline error messages
  • adds missing periods at the end of a few error messages

Props ocean90, karmatosed, melchoyce, afercia.
Fixes #35496.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r41674 r41684  
    425425    // Do not allow unregistering internal taxonomies.
    426426    if ( $taxonomy_object->_builtin ) {
    427         return new WP_Error( 'invalid_taxonomy', __( 'Unregistering a built-in taxonomy is not allowed' ) );
     427        return new WP_Error( 'invalid_taxonomy', __( 'Unregistering a built-in taxonomy is not allowed.' ) );
    428428    }
    429429
     
    747747function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) {
    748748    if ( empty( $term ) ) {
    749         return new WP_Error( 'invalid_term', __( 'Empty Term' ) );
     749        return new WP_Error( 'invalid_term', __( 'Empty Term.' ) );
    750750    }
    751751
     
    21242124
    21252125    if ( false === $wpdb->insert( $wpdb->terms, $data ) ) {
    2126         return new WP_Error( 'db_insert_error', __( 'Could not insert term into the database' ), $wpdb->last_error );
     2126        return new WP_Error( 'db_insert_error', __( 'Could not insert term into the database.' ), $wpdb->last_error );
    21272127    }
    21282128
     
    23482348        if ( $values )
    23492349            if ( false === $wpdb->query( "INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id, term_order) VALUES " . join( ',', $values ) . " ON DUPLICATE KEY UPDATE term_order = VALUES(term_order)" ) )
    2350                 return new WP_Error( 'db_insert_error', __( 'Could not insert term relationship into the database' ), $wpdb->last_error );
     2350                return new WP_Error( 'db_insert_error', __( 'Could not insert term relationship into the database.' ), $wpdb->last_error );
    23512351    }
    23522352
     
    26162616
    26172617    if ( ! $term ) {
    2618         return new WP_Error( 'invalid_term', __( 'Empty Term' ) );
     2618        return new WP_Error( 'invalid_term', __( 'Empty Term.' ) );
    26192619    }
    26202620
     
    27022702        } else {
    27032703            /* translators: 1: Taxonomy term slug */
    2704             return new WP_Error('duplicate_term_slug', sprintf(__('The slug “%s” is already in use by another term'), $slug));
     2704            return new WP_Error( 'duplicate_term_slug', sprintf( __( 'The slug “%s” is already in use by another term.' ), $slug ) );
    27052705        }
    27062706    }
     
    39173917
    39183918    if ( !is_object($term) )
    3919         $term = new WP_Error('invalid_term', __('Empty Term'));
     3919        $term = new WP_Error( 'invalid_term', __( 'Empty Term.' ) );
    39203920
    39213921    if ( is_wp_error( $term ) )
     
    41294129function is_object_in_term( $object_id, $taxonomy, $terms = null ) {
    41304130    if ( !$object_id = (int) $object_id )
    4131         return new WP_Error( 'invalid_object', __( 'Invalid object ID' ) );
     4131        return new WP_Error( 'invalid_object', __( 'Invalid object ID.' ) );
    41324132
    41334133    $object_terms = get_object_term_cache( $object_id, $taxonomy );
Note: See TracChangeset for help on using the changeset viewer.