Make WordPress Core


Ignore:
Timestamp:
01/08/2015 07:04:40 AM (12 years ago)
Author:
wonderboymusic
Message:

The keyword elseif should be used instead of else if so that all control keywords look like single words.

This was a mess, is now standardized across the codebase, except for a few 3rd-party libs.

See #30799.

File:
1 edited

Legend:

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

    r31086 r31090  
    14381438        if ( ! empty( $_REQUEST['_wp_http_referer'] ) )
    14391439                $ref = wp_unslash( $_REQUEST['_wp_http_referer'] );
    1440         else if ( ! empty( $_SERVER['HTTP_REFERER'] ) )
     1440        elseif ( ! empty( $_SERVER['HTTP_REFERER'] ) )
    14411441                $ref = wp_unslash( $_SERVER['HTTP_REFERER'] );
    14421442
    … …  
    16711671function win_is_writable( $path ) {
    16721672
    1673         if ( $path[strlen( $path ) - 1] == '/' ) // if it looks like a directory, check a random file within the directory
     1673        if ( $path[strlen( $path ) - 1] == '/' ) { // if it looks like a directory, check a random file within the directory
    16741674                return win_is_writable( $path . uniqid( mt_rand() ) . '.tmp');
    1675         else if ( is_dir( $path ) ) // If it's a directory (and not a file) check a random file within the directory
     1675        } elseif ( is_dir( $path ) ) { // If it's a directory (and not a file) check a random file within the directory
    16761676                return win_is_writable( $path . '/' . uniqid( mt_rand() ) . '.tmp' );
    1677 
     1677        }
    16781678        // check tmp file for read/write capabilities
    16791679        $should_delete_tmp_file = !file_exists( $path );
Note: See TracChangeset for help on using the changeset viewer.