Changeset 24723
- Timestamp:
- 07/17/2013 09:04:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r24695 r24723 2865 2865 // Allow plugin to filter the output error trigger 2866 2866 if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) { 2867 if ( ! is_null($replacement) ) 2868 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); 2869 else 2870 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); 2867 if ( function_exists( '__' ) ) { 2868 if ( ! is_null( $replacement ) ) 2869 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $function, $version, $replacement ) ); 2870 else 2871 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); 2872 } else { 2873 if ( ! is_null( $replacement ) ) 2874 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $function, $version, $replacement ) ); 2875 else 2876 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) ); 2877 } 2871 2878 } 2872 2879 } … … 2905 2912 if ( WP_DEBUG && apply_filters( 'deprecated_file_trigger_error', true ) ) { 2906 2913 $message = empty( $message ) ? '' : ' ' . $message; 2907 if ( ! is_null( $replacement ) ) 2908 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message ); 2909 else 2910 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message ); 2914 if ( function_exists( '__' ) ) { 2915 if ( ! is_null( $replacement ) ) 2916 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.'), $file, $version, $replacement ) . $message ); 2917 else 2918 trigger_error( sprintf( __('%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.'), $file, $version ) . $message ); 2919 } else { 2920 if ( ! is_null( $replacement ) ) 2921 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s! Use %3$s instead.', $file, $version, $replacement ) . $message ); 2922 else 2923 trigger_error( sprintf( '%1$s is <strong>deprecated</strong> since version %2$s with no alternative available.', $file, $version ) . $message ); 2924 } 2911 2925 } 2912 2926 } … … 2949 2963 // Allow plugin to filter the output error trigger 2950 2964 if ( WP_DEBUG && apply_filters( 'deprecated_argument_trigger_error', true ) ) { 2951 if ( ! is_null( $message ) ) 2952 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 2953 else 2954 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); 2965 if ( function_exists( '__' ) ) { 2966 if ( ! is_null( $message ) ) 2967 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s'), $function, $version, $message ) ); 2968 else 2969 trigger_error( sprintf( __('%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.'), $function, $version ) ); 2970 } else { 2971 if ( ! is_null( $message ) ) 2972 trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s! %3$s', $function, $version, $message ) ); 2973 else 2974 trigger_error( sprintf( '%1$s was called with an argument that is <strong>deprecated</strong> since version %2$s with no alternative available.', $function, $version ) ); 2975 } 2955 2976 } 2956 2977 }
Note: See TracChangeset
for help on using the changeset viewer.