Make WordPress Core

Changeset 35765


Ignore:
Timestamp:
12/04/2015 04:12:51 PM (9 years ago)
Author:
DrewAPicture
Message:

About page: Fix some minor string errors and simplify URL-building for the plugin install link for capable users.

Props ocean90, DrewAPicture
See #34663.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/about.php

    r35763 r35765  
    110110                        <p><?php
    111111                            if ( current_user_can( 'install_plugins' ) ) {
    112                                 $plugin_link = '<a href="' . esc_url( network_admin_url( 'plugin-install.php?tab=plugin-information&plugin=rest-api' .
    113                                         '&TB_iframe=true&width=600&height=550' ) ) . '" class="thickbox">WordPress REST API</a>';
     112                                $url_args = array(
     113                                    'tab'       => 'plugin-information',
     114                                    'plugin'    => 'rest-api',
     115                                    'TB_iframe' => true,
     116                                    'width'     => 600,
     117                                    'height'    => 550
     118                                );
     119
     120                                $plugin_link = '<a href="' . esc_url( add_query_arg( $url_args, network_admin_url( 'plugin-install.php' ) ) ) . '" class="thickbox">WordPress REST API</a>';
    114121                            } else {
    115122                                $plugin_link = '<a href="https://wordpress.org/plugins/rest-api">WordPress REST API</a>';
     
    117124
    118125                            /* translators: WordPress REST API plugin link */
    119                             printf( ( 'Infrastructure is the first part of a multi-stage rollout for the REST API, which also targets inclusion of core endpoints in an upcoming release. To get a sneak peek of the core endpoints, and for more on extending the REST API, check out the official %s plugin.' ),
    120                                 $plugin_link
    121                             );
     126                            printf( ( 'Infrastructure is the first part of a multi-stage rollout for the REST API, which also targets inclusion of core endpoints in an upcoming release. To get a sneak peek of the core endpoints, and for more on extending the REST API, check out the official %s plugin.' ), $plugin_link );
    122127                        ?></p>
    123128                    </div>
     
    130135                    <p><?php
    131136                        /* translators: 1: add_term_meta() docs link, 2: get_term_meta() docs link, 3: update_term_meta() docs link */
    132                         printf( ( 'Terms now now support metadata, just like posts. See %1$s, %2$s, and %3$s for more information.' ),
     137                        printf( ( 'Terms now support metadata, just like posts. See %1$s, %2$s, and %3$s for more information.' ),
    133138                            '<a href="https://developer.wordpress.org/reference/functions/add_term_meta"><code>add_term_meta()</code></a>',
    134139                            '<a href="https://developer.wordpress.org/reference/functions/get_term_meta"><code>get_term_meta()</code></a>',
     
    141146                    <p><?php
    142147                        /* translators: WP_Comment_Query class name */
    143                         printf( ( 'Comment queries now have improved cache handling and performance. New arguments in %s making crafting robust comment queries simpler.' ), '<code>WP_Comment_Query</code>' );
     148                        printf( ( 'Comment queries now have cache handling to improve performance. New arguments in %s make crafting robust comment queries simpler.' ), '<code>WP_Comment_Query</code>' );
    144149                    ?></p>
    145150                </div>
Note: See TracChangeset for help on using the changeset viewer.