Make WordPress Core

Changeset 38077


Ignore:
Timestamp:
07/17/2016 04:14:27 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Text Changes: Add a full stop to "Invalid taxonomy" and "Invalid term ID" strings, for consistency with similar post-related messages.

See #18218, #32329.

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r37914 r38077  
    1111
    1212if ( ! $taxnow )
    13         wp_die( __( 'Invalid taxonomy' ) );
     13        wp_die( __( 'Invalid taxonomy.' ) );
    1414
    1515$tax = get_taxonomy( $taxnow );
    1616
    1717if ( ! $tax )
    18         wp_die( __( 'Invalid taxonomy' ) );
     18        wp_die( __( 'Invalid taxonomy.' ) );
    1919
    2020if ( ! in_array( $tax->name, get_taxonomies( array( 'show_ui' => true ) ) ) ) {
  • trunk/src/wp-admin/includes/class-wp-terms-list-table.php

    r37488 r38077  
    5454
    5555                if ( ! taxonomy_exists( $taxonomy ) )
    56                         wp_die( __( 'Invalid taxonomy' ) );
     56                        wp_die( __( 'Invalid taxonomy.' ) );
    5757
    5858                $tax = get_taxonomy( $taxonomy );
  • trunk/src/wp-includes/class-wp-term.php

    r36250 r38077  
    177177                        // Don't return terms from invalid taxonomies.
    178178                        if ( ! taxonomy_exists( $_term->taxonomy ) ) {
    179                                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     179                                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    180180                        }
    181181
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r38076 r38077  
    14271427
    14281428                                                if ( ! $term )
    1429                                                         return new IXR_Error( 403, __( 'Invalid term ID' ) );
     1429                                                        return new IXR_Error( 403, __( 'Invalid term ID.' ) );
    14301430
    14311431                                                $terms[$taxonomy][] = (int) $term_id;
    … …  
    18741874
    18751875                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
    1876                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     1876                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    18771877
    18781878                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    … …  
    19611961
    19621962                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
    1963                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     1963                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    19641964
    19651965                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    … …  
    19791979
    19801980                if ( ! $term )
    1981                         return new IXR_Error( 404, __( 'Invalid term ID' ) );
     1981                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
    19821982
    19831983                if ( isset( $content_struct['name'] ) ) {
    … …  
    20572057
    20582058                if ( ! taxonomy_exists( $taxonomy ) )
    2059                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     2059                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    20602060
    20612061                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    20702070
    20712071                if ( ! $term )
    2072                         return new IXR_Error( 404, __( 'Invalid term ID' ) );
     2072                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
    20732073
    20742074                $result = wp_delete_term( $term_id, $taxonomy->name );
    … …  
    21282128
    21292129                if ( ! taxonomy_exists( $taxonomy ) )
    2130                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     2130                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    21312131
    21322132                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    21412141
    21422142                if ( ! $term )
    2143                         return new IXR_Error( 404, __( 'Invalid term ID' ) );
     2143                        return new IXR_Error( 404, __( 'Invalid term ID.' ) );
    21442144
    21452145                return $this->_prepare_term( $term );
    … …  
    21862186
    21872187                if ( ! taxonomy_exists( $taxonomy ) )
    2188                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     2188                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    21892189
    21902190                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    22812281
    22822282                if ( ! taxonomy_exists( $taxonomy ) )
    2283                         return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
     2283                        return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
    22842284
    22852285                $taxonomy = get_taxonomy( $taxonomy );
  • trunk/src/wp-includes/taxonomy.php

    r38029 r38077  
    506506function unregister_taxonomy( $taxonomy ) {
    507507        if ( ! taxonomy_exists( $taxonomy ) ) {
    508                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     508                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    509509        }
    510510
    … …  
    737737        foreach ( (array) $taxonomies as $taxonomy ) {
    738738                if ( ! taxonomy_exists( $taxonomy ) ) {
    739                         return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     739                        return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    740740                }
    741741        }
    … …  
    827827
    828828        if ( $taxonomy && ! taxonomy_exists( $taxonomy ) ) {
    829                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     829                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    830830        }
    831831
    … …  
    989989 */
    990990function get_term_children( $term_id, $taxonomy ) {
    991         if ( ! taxonomy_exists($taxonomy) )
    992                 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
     991        if ( ! taxonomy_exists( $taxonomy ) ) {
     992                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
     993        }
    993994
    994995        $term_id = intval( $term_id );
    … …  
    12091210                foreach ( $args['taxonomy'] as $taxonomy ) {
    12101211                        if ( ! taxonomy_exists( $taxonomy ) ) {
    1211                                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     1212                                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    12121213                        }
    12131214                }
    … …  
    19761977        foreach ( $taxonomies as $taxonomy ) {
    19771978                if ( ! taxonomy_exists($taxonomy) )
    1978                         return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
     1979                        return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    19791980        }
    19801981
    … …  
    22272228
    22282229        if ( ! taxonomy_exists($taxonomy) ) {
    2229                 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
     2230                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    22302231        }
    22312232        /**
    … …  
    22422243        }
    22432244        if ( is_int($term) && 0 == $term ) {
    2244                 return new WP_Error('invalid_term_id', __('Invalid term ID'));
     2245                return new WP_Error( 'invalid_term_id', __( 'Invalid term ID.' ) );
    22452246        }
    22462247        if ( '' == trim($term) ) {
    2247                 return new WP_Error('empty_term_name', __('A name is required for this term'));
     2248                return new WP_Error( 'empty_term_name', __( 'A name is required for this term.' ) );
    22482249        }
    22492250        $defaults = array( 'alias_of' => '', 'description' => '', 'parent' => 0, 'slug' => '');
    … …  
    24742475        $object_id = (int) $object_id;
    24752476
    2476         if ( ! taxonomy_exists($taxonomy) )
    2477                 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy'));
     2477        if ( ! taxonomy_exists( $taxonomy ) ) {
     2478                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
     2479        }
    24782480
    24792481        if ( !is_array($terms) )
    … …  
    26122614
    26132615        if ( ! taxonomy_exists( $taxonomy ) ) {
    2614                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     2616                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    26152617        }
    26162618
    … …  
    28082810
    28092811        if ( ! taxonomy_exists( $taxonomy ) ) {
    2810                 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) );
     2812                return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy.' ) );
    28112813        }
    28122814
Note: See TracChangeset for help on using the changeset viewer.