Changeset 41684 for trunk/src/wp-includes/taxonomy.php
- Timestamp:
- 10/02/2017 09:51:09 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/taxonomy.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/taxonomy.php
r41674 r41684 425 425 // Do not allow unregistering internal taxonomies. 426 426 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.' ) ); 428 428 } 429 429 … … 747 747 function get_term( $term, $taxonomy = '', $output = OBJECT, $filter = 'raw' ) { 748 748 if ( empty( $term ) ) { 749 return new WP_Error( 'invalid_term', __( 'Empty Term ' ) );749 return new WP_Error( 'invalid_term', __( 'Empty Term.' ) ); 750 750 } 751 751 … … 2124 2124 2125 2125 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 ); 2127 2127 } 2128 2128 … … 2348 2348 if ( $values ) 2349 2349 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 ); 2351 2351 } 2352 2352 … … 2616 2616 2617 2617 if ( ! $term ) { 2618 return new WP_Error( 'invalid_term', __( 'Empty Term ' ) );2618 return new WP_Error( 'invalid_term', __( 'Empty Term.' ) ); 2619 2619 } 2620 2620 … … 2702 2702 } else { 2703 2703 /* 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 ) ); 2705 2705 } 2706 2706 } … … 3917 3917 3918 3918 if ( !is_object($term) ) 3919 $term = new WP_Error( 'invalid_term', __('Empty Term'));3919 $term = new WP_Error( 'invalid_term', __( 'Empty Term.' ) ); 3920 3920 3921 3921 if ( is_wp_error( $term ) ) … … 4129 4129 function is_object_in_term( $object_id, $taxonomy, $terms = null ) { 4130 4130 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.' ) ); 4132 4132 4133 4133 $object_terms = get_object_term_cache( $object_id, $taxonomy );
Note: See TracChangeset
for help on using the changeset viewer.