Changeset 20972
- Timestamp:
- 06/01/2012 07:05:30 PM (12 years ago)
- Location:
- trunk/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r20856 r20972 1474 1474 1475 1475 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1476 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1476 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1477 1477 1478 1478 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1562 1562 1563 1563 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1564 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1564 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1565 1565 1566 1566 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1654 1654 1655 1655 if ( ! taxonomy_exists( $taxonomy ) ) 1656 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1656 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1657 1657 1658 1658 $taxonomy = get_taxonomy( $taxonomy ); … … 1721 1721 1722 1722 if ( ! taxonomy_exists( $taxonomy ) ) 1723 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1723 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1724 1724 1725 1725 $taxonomy = get_taxonomy( $taxonomy ); … … 1774 1774 1775 1775 if ( ! taxonomy_exists( $taxonomy ) ) 1776 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1776 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1777 1777 1778 1778 $taxonomy = get_taxonomy( $taxonomy ); … … 1853 1853 1854 1854 if ( ! taxonomy_exists( $taxonomy ) ) 1855 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1855 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1856 1856 1857 1857 $taxonomy = get_taxonomy( $taxonomy ); … … 2951 2951 2952 2952 if ( !current_user_can( 'upload_files' ) ) 2953 return new IXR_Error( 403, __( 'You are not allowed to upload files to this site.' ) );2953 return new IXR_Error( 403, __( 'You do not have permission to upload files.' ) ); 2954 2954 2955 2955 do_action('xmlrpc_call', 'wp.getMediaItem'); … … 2996 2996 2997 2997 if ( !current_user_can( 'upload_files' ) ) 2998 return new IXR_Error( 401, __( ' Sorry, you cannotupload files.' ) );2998 return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) ); 2999 2999 3000 3000 do_action('xmlrpc_call', 'wp.getMediaLibrary'); … … 3105 3105 3106 3106 if( ! post_type_exists( $post_type_name ) ) 3107 return new IXR_Error( 403, __( 'Invalid post type .' ) );3107 return new IXR_Error( 403, __( 'Invalid post type' ) ); 3108 3108 3109 3109 $post_type = get_post_type_object( $post_type_name ); … … 3680 3680 } else { 3681 3681 // No other post_type values are allowed here 3682 return new IXR_Error( 401, __( 'Invalid post type .' ) );3682 return new IXR_Error( 401, __( 'Invalid post type' ) ); 3683 3683 } 3684 3684 } else { … … 3736 3736 break; 3737 3737 default: 3738 return(new IXR_Error(401, __('Invalid post type .')));3738 return(new IXR_Error(401, __('Invalid post type'))); 3739 3739 break; 3740 3740 } … … 3988 3988 // Use wp.editPost to edit post types other than post and page. 3989 3989 if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) 3990 return new IXR_Error( 401, __( 'Invalid post type .' ) );3990 return new IXR_Error( 401, __( 'Invalid post type' ) ); 3991 3991 3992 3992 // Thwart attempt to change the post type. … … 4040 4040 break; 4041 4041 default: 4042 return(new IXR_Error(401, __('Invalid post type .')));4042 return(new IXR_Error(401, __('Invalid post type'))); 4043 4043 break; 4044 4044 } … … 4532 4532 4533 4533 if ( !current_user_can('upload_files') ) { 4534 $this->error = new IXR_Error( 401, __('You are not allowed to upload files to this site.'));4534 $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) ); 4535 4535 return $this->error; 4536 4536 } -
trunk/wp-includes/taxonomy.php
r20436 r20972 503 503 foreach ( (array) $taxonomies as $taxonomy ) { 504 504 if ( ! taxonomy_exists( $taxonomy ) ) 505 return new WP_Error( 'invalid_taxonomy', __( 'Invalid Taxonomy' ) );505 return new WP_Error( 'invalid_taxonomy', __( 'Invalid taxonomy' ) ); 506 506 } 507 507 … … 856 856 857 857 if ( ! taxonomy_exists($taxonomy) ) { 858 $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));858 $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 859 859 return $error; 860 860 } … … 985 985 function get_term_children( $term_id, $taxonomy ) { 986 986 if ( ! taxonomy_exists($taxonomy) ) 987 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));987 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 988 988 989 989 $term_id = intval( $term_id ); … … 1175 1175 foreach ( $taxonomies as $taxonomy ) { 1176 1176 if ( ! taxonomy_exists($taxonomy) ) { 1177 $error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));1177 $error = new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 1178 1178 return $error; 1179 1179 } … … 1876 1876 foreach ( (array) $taxonomies as $taxonomy ) { 1877 1877 if ( ! taxonomy_exists($taxonomy) ) 1878 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));1878 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 1879 1879 } 1880 1880 … … 2147 2147 2148 2148 if ( ! taxonomy_exists($taxonomy) ) 2149 return new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));2149 return new WP_Error('invalid_taxonomy', __('Invalid taxonomy')); 2150 2150 2151 2151 if ( !is_array($terms) )
Note: See TracChangeset
for help on using the changeset viewer.