Make WordPress Core

Ticket #30614: 30614.3.patch

File 30614.3.patch, 3.7 KB (added by ramiy, 12 years ago)

more elegant solution

  • wp-includes/general-template.php

     
    609609        switch( $show ) {
    610610                case 'home' : // DEPRECATED
    611611                case 'siteurl' : // DEPRECATED
    612                         _deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> option instead.' ), 'url'  ) );
     612                        _deprecated_argument( __FUNCTION__, '2.2', sprintf(
     613                                /* translators: 1: 'siteurl'/'home' argument 2: bloginfo() function name 3: 'url' argument */
     614                                __('The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
     615                                '<code>' . $show . '</code>',
     616                                '<code>bloginfo()</code>',
     617                                '<code>url</code>'
     618                        ) );
    613619                case 'url' :
    614620                        $output = home_url();
    615621                        break;
    … …  
    669675                        $output = str_replace('_', '-', $output);
    670676                        break;
    671677                case 'text_direction':
    672                         //_deprecated_argument( __FUNCTION__, '2.2', sprintf( __('The <code>%s</code> option is deprecated for the family of <code>bloginfo()</code> functions.' ), $show ) . ' ' . sprintf( __( 'Use the <code>%s</code> function instead.' ), 'is_rtl()'  ) );
     678                        _deprecated_argument( __FUNCTION__, '2.2', sprintf(
     679                                /* translators: 1: 'text_direction' argument 2: bloginfo() function name 3: is_rtl() function name */
     680                                __('The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
     681                                '<code>' . $show . '</code>',
     682                                '<code>bloginfo()</code>',
     683                                '<code>is_rtl()</code>'
     684                        ) );
    673685                        if ( function_exists( 'is_rtl' ) ) {
    674686                                $output = is_rtl() ? 'rtl' : 'ltr';
    675687                        } else {
  • wp-includes/ms-load.php

     
    408408        $msg .= ' ' . __( 'If you are the owner of this network please check that MySQL is running properly and all tables are error free.' ) . '</p>';
    409409        $query = $wpdb->prepare( "SHOW TABLES LIKE %s", $wpdb->esc_like( $wpdb->site ) );
    410410        if ( ! $wpdb->get_var( $query ) ) {
    411                 $msg .= '<p>' . sprintf( __( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted <code>%s</code>. You really should look at your database now.' ), $wpdb->site ) . '</p>';
     411                $msg .= '<p>' . sprintf(
     412                        /* translators: Site name */
     413                        __( '<strong>Database tables are missing.</strong> This means that MySQL is not running, WordPress was not installed properly, or someone deleted %s. You really should look at your database now.' ),
     414                        '<code>' . $wpdb->site . '</code>'
     415                        ) . '</p>';
    412416        } else {
    413                 $msg .= '<p>' . sprintf( __( '<strong>Could not find site <code>%1$s</code>.</strong> Searched for table <code>%2$s</code> in database <code>%3$s</code>. Is that right?' ), rtrim( $domain . $path, '/' ), $wpdb->blogs, DB_NAME ) . '</p>';
     417                $msg .= '<p>' . sprintf(
     418                        /* translators: 1: Site url 2: Database blogs table 3: Database name */
     419                        __( '<strong>Could not find site %1$s.</strong> Searched for table %2$s in database %3$s. Is that right?' ),
     420                        '<code>' . rtrim( $domain . $path, '/' ) . '</code>',
     421                        '<code>' . $wpdb->blogs . '</code>',
     422                        '<code>' . DB_NAME . '</code>'
     423                        ) . '</p>';
    414424        }
    415425        $msg .= '<p><strong>' . __( 'What do I do now?' ) . '</strong> ';
    416426        $msg .= __( 'Read the <a target="_blank" href="http://codex.wordpress.org/Debugging_a_WordPress_Network">bug report</a> page. Some of the guidelines there may help you figure out what went wrong.' );