WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/19/2013 08:12:48 AM (7 years ago)
Author:
nacin
Message:

Fall back to non-translated strings in _doing_it_wrong() if the translation function doesn't exist. This may be the case in sunrise, for example.

Merges [24439] to the 3.5 branch.

props SergeyBiryukov.
fixes #23555.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.5/wp-includes/functions.php

    r23281 r24440  
    29552955    // Allow plugin to filter the output error trigger
    29562956    if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) {
    2957         $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
    2958         $message .= ' ' . __( 'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
    2959         trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
     2957        if ( function_exists( '__' ) ) {
     2958            $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version );
     2959            $message .= ' ' . __( 'Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' );
     2960            trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) );
     2961        } else {
     2962            $version = is_null( $version ) ? '' : sprintf( '(This message was added in version %s.)', $version );
     2963            $message .= ' Please see <a href="http://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information.';
     2964            trigger_error( sprintf( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s', $function, $message, $version ) );
     2965        }
    29602966    }
    29612967}
Note: See TracChangeset for help on using the changeset viewer.