Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

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

    r47060 r47122  
    4646    if ( ! WP_Filesystem( $credentials ) ) {
    4747        ob_start();
    48         request_filesystem_credentials( $redirect, '', true ); // Failed to connect, Error and request again.
     48        // Failed to connect. Error and request again.
     49        request_filesystem_credentials( $redirect, '', true );
    4950        $data = ob_get_clean();
    5051
     
    195196            ),
    196197            $update['url']
    197         ); //Theme browser inside WP? replace this, Also, theme preview JS will override this on the available list.
     198        ); // Theme browser inside WP? Replace this. Also, theme preview JS will override this on the available list.
    198199        $update_url  = wp_nonce_url( admin_url( 'update.php?action=upgrade-theme&theme=' . urlencode( $stylesheet ) ), 'upgrade-theme_' . $stylesheet );
    199200
     
    261262 */
    262263function get_theme_feature_list( $api = true ) {
    263     // Hard-coded list is used if api not accessible.
     264    // Hard-coded list is used if API is not accessible.
    264265    $features = array(
    265266
     
    332333    );
    333334
    334     // Loop over the wporg canonical list and apply translations
     335    // Loop over the wp.org canonical list and apply translations.
    335336    $wporg_features = array();
    336337    foreach ( (array) $feature_list as $feature_category => $feature_items ) {
     
    434435 */
    435436function themes_api( $action, $args = array() ) {
    436     // include an unmodified $wp_version
     437    // Include an unmodified $wp_version.
    437438    include( ABSPATH . WPINC . '/version.php' );
    438439
     
    452453
    453454    if ( ! isset( $args->wp_version ) ) {
    454         $args->wp_version = substr( $wp_version, 0, 3 ); // X.y
     455        $args->wp_version = substr( $wp_version, 0, 3 ); // x.y
    455456    }
    456457
     
    656657            'id'           => $slug,
    657658            'name'         => $theme->display( 'Name' ),
    658             'screenshot'   => array( $theme->get_screenshot() ), // @todo multiple
     659            'screenshot'   => array( $theme->get_screenshot() ), // @todo Multiple screenshots.
    659660            'description'  => $theme->display( 'Description' ),
    660661            'author'       => $theme->display( 'Author', false, true ),
     
    675676    }
    676677
    677     // Remove 'delete' action if theme has an active child
     678    // Remove 'delete' action if theme has an active child.
    678679    if ( ! empty( $parents ) && array_key_exists( $current_theme, $parents ) ) {
    679680        unset( $prepared_themes[ $parents[ $current_theme ] ]['actions']['delete'] );
Note: See TracChangeset for help on using the changeset viewer.