Make WordPress Core


Ignore:
Timestamp:
06/01/2012 07:05:30 PM (14 years ago)
Author:
ryan
Message:

Consolodate some strings. Props pavelevap. fixes #20809

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r20856 r20972  
    14741474
    14751475                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
    1476                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1476                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    14771477
    14781478                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    … …  
    15621562
    15631563                if ( ! taxonomy_exists( $content_struct['taxonomy'] ) )
    1564                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1564                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    15651565
    15661566                $taxonomy = get_taxonomy( $content_struct['taxonomy'] );
    … …  
    16541654
    16551655                if ( ! taxonomy_exists( $taxonomy ) )
    1656                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1656                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    16571657
    16581658                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    17211721
    17221722                if ( ! taxonomy_exists( $taxonomy ) )
    1723                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1723                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    17241724
    17251725                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    17741774
    17751775                if ( ! taxonomy_exists( $taxonomy ) )
    1776                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1776                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    17771777
    17781778                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    18531853
    18541854                if ( ! taxonomy_exists( $taxonomy ) )
    1855                         return new IXR_Error( 403, __( 'Invalid taxonomy.' ) );
     1855                        return new IXR_Error( 403, __( 'Invalid taxonomy' ) );
    18561856
    18571857                $taxonomy = get_taxonomy( $taxonomy );
    … …  
    29512951
    29522952                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.' ) );
    29542954
    29552955                do_action('xmlrpc_call', 'wp.getMediaItem');
    … …  
    29962996
    29972997                if ( !current_user_can( 'upload_files' ) )
    2998                         return new IXR_Error( 401, __( 'Sorry, you cannot upload files.' ) );
     2998                        return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) );
    29992999
    30003000                do_action('xmlrpc_call', 'wp.getMediaLibrary');
    … …  
    31053105
    31063106                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' ) );
    31083108
    31093109                $post_type = get_post_type_object( $post_type_name );
    … …  
    36803680                        } else {
    36813681                                // 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' ) );
    36833683                        }
    36843684                } else {
    … …  
    37363736                                        break;
    37373737                                default:
    3738                                         return(new IXR_Error(401, __('Invalid post type.')));
     3738                                        return(new IXR_Error(401, __('Invalid post type')));
    37393739                                        break;
    37403740                        }
    … …  
    39883988                // Use wp.editPost to edit post types other than post and page.
    39893989                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' ) );
    39913991
    39923992                // Thwart attempt to change the post type.
    … …  
    40404040                                        break;
    40414041                                default:
    4042                                         return(new IXR_Error(401, __('Invalid post type.')));
     4042                                        return(new IXR_Error(401, __('Invalid post type')));
    40434043                                        break;
    40444044                        }
    … …  
    45324532
    45334533                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.' ) );
    45354535                        return $this->error;
    45364536                }
Note: See TracChangeset for help on using the changeset viewer.