Make WordPress Core

Changeset 32800


Ignore:
Timestamp:
06/16/2015 08:00:15 PM (9 years ago)
Author:
wonderboymusic
Message:

if is a statment, not a function.

See #32444.

Location:
trunk/src
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r32736 r32800  
    473473        $out = '';
    474474
    475         if( $primary === $column_name ) {
     475        if ( $primary === $column_name ) {
    476476            $del_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "delete-comment_$comment->comment_ID" ) );
    477477            $approve_nonce = esc_html( '_wpnonce=' . wp_create_nonce( "approve-comment_$comment->comment_ID" ) );
  • trunk/src/wp-admin/includes/class-wp-links-list-table.php

    r32753 r32800  
    287287     */
    288288    protected function handle_row_actions( $link, $column_name, $primary ) {
    289         if( $primary === $column_name ) {
     289        if ( $primary === $column_name ) {
    290290            $edit_link = get_edit_bookmark_link( $link );
    291291
  • trunk/src/wp-admin/includes/class-wp-list-table.php

    r32724 r32800  
    635635        $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0;
    636636
    637         if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
     637        if ( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] )
    638638            $pagenum = $this->_pagination_args['total_pages'];
    639639
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r32798 r32800  
    634634     */
    635635    protected function handle_row_actions( $link, $column_name, $primary ) {
    636         if( $primary === $column_name ) {
     636        if ( $primary === $column_name ) {
    637637            return $this->row_actions( $this->_get_row_actions( $post, $att_title ) );
    638638        }
  • trunk/src/wp-admin/includes/class-wp-press-this.php

    r32720 r32800  
    10461046        if ( ! empty( $data['t'] ) ) {
    10471047            $title = $data['t'];
    1048         } elseif( ! empty( $data['_meta'] ) ) {
     1048        } elseif ( ! empty( $data['_meta'] ) ) {
    10491049            if ( ! empty( $data['_meta']['twitter:title'] ) ) {
    10501050                $title = $data['_meta']['twitter:title'];
  • trunk/src/wp-admin/includes/deprecated.php

    r32650 r32800  
    573573        if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results
    574574            $args = array();
    575             if( ! empty($this->search_term) )
     575            if ( ! empty($this->search_term) )
    576576                $args['usersearch'] = urlencode($this->search_term);
    577             if( ! empty($this->role) )
     577            if ( ! empty($this->role) )
    578578                $args['role'] = urlencode($this->role);
    579579
  • trunk/src/wp-admin/includes/nav-menu.php

    r32691 r32800  
    140140
    141141            <div class="menu-item-settings" id="menu-item-settings-<?php echo $item_id; ?>">
    142                 <?php if( 'custom' == $item->type ) : ?>
     142                <?php if ( 'custom' == $item->type ) : ?>
    143143                    <p class="field-url description description-wide">
    144144                        <label for="edit-menu-item-url-<?php echo $item_id; ?>">
     
    198198
    199199                <div class="menu-item-actions description-wide submitbox">
    200                     <?php if( 'custom' != $item->type && $original_title !== false ) : ?>
     200                    <?php if ( 'custom' != $item->type && $original_title !== false ) : ?>
    201201                        <p class="link-to-original">
    202202                            <?php printf( __('Original: %s'), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?>
     
    460460
    461461    // If first time editing, disable advanced items by default.
    462     if( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
     462    if ( false === get_user_option( 'managenav-menuscolumnshidden' ) ) {
    463463        $user = wp_get_current_user();
    464464        update_user_option($user->ID, 'managenav-menuscolumnshidden',
     
    11811181        $result .= '</div>';
    11821182
    1183         if( empty($menu_items) )
     1183        if ( empty($menu_items) )
    11841184            return $result . ' <ul class="menu" id="menu-to-edit"> </ul>';
    11851185
  • trunk/src/wp-admin/includes/post.php

    r32673 r32800  
    13191319
    13201320    if ( isset( $view_post ) ) {
    1321         if( 'draft' == $post->post_status ) {
     1321        if ( 'draft' == $post->post_status ) {
    13221322            $preview_link = set_url_scheme( get_permalink( $post->ID ) );
    13231323            /** This filter is documented in wp-admin/includes/meta-boxes.php */
  • trunk/src/wp-admin/network.php

    r32654 r32800  
    5959function allow_subdomain_install() {
    6060    $domain = preg_replace( '|https?://([^/]+)|', '$1', get_option( 'home' ) );
    61     if( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) )
     61    if ( parse_url( get_option( 'home' ), PHP_URL_PATH ) || 'localhost' == $domain || preg_match( '|^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$|', $domain ) )
    6262        return false;
    6363
  • trunk/src/wp-includes/admin-bar.php

    r32537 r32800  
    505505            && ( $post_type_object->show_in_admin_bar ) )
    506506        {
    507             if( 'draft' == $post->post_status ) {
     507            if ( 'draft' == $post->post_status ) {
    508508                $preview_link = set_url_scheme( get_permalink( $post->ID ) );
    509509                /** This filter is documented in wp-admin/includes/meta-boxes.php */
  • trunk/src/wp-includes/class-wp-image-editor-imagick.php

    r32650 r32800  
    137137            $this->image = new Imagick( $this->file );
    138138
    139             if( ! $this->image->valid() )
     139            if ( ! $this->image->valid() )
    140140                return new WP_Error( 'invalid_image', __('File is not an image.'), $this->file);
    141141
  • trunk/src/wp-includes/class-wp-image-editor.php

    r32650 r32800  
    349349            $dir  = $info['dirname'];
    350350
    351             if( isset( $info['extension'] ) )
     351            if ( isset( $info['extension'] ) )
    352352                $ext = $info['extension'];
    353353
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r32733 r32800  
    39633963        do_action( 'xmlrpc_call', 'wp.getPostType' );
    39643964
    3965         if( ! post_type_exists( $post_type_name ) )
     3965        if ( ! post_type_exists( $post_type_name ) )
    39663966            return new IXR_Error( 403, __( 'Invalid post type' ) );
    39673967
    39683968        $post_type = get_post_type_object( $post_type_name );
    39693969
    3970         if( ! current_user_can( $post_type->cap->edit_posts ) )
     3970        if ( ! current_user_can( $post_type->cap->edit_posts ) )
    39713971            return new IXR_Error( 401, __( 'Sorry, you are not allowed to edit this post type.' ) );
    39723972
     
    40204020
    40214021        foreach( $post_types as $post_type ) {
    4022             if( ! current_user_can( $post_type->cap->edit_posts ) )
     4022            if ( ! current_user_can( $post_type->cap->edit_posts ) )
    40234023                continue;
    40244024
  • trunk/src/wp-includes/default-constants.php

    r31056 r32800  
    1818    // set memory limits
    1919    if ( !defined('WP_MEMORY_LIMIT') ) {
    20         if( is_multisite() ) {
     20        if ( is_multisite() ) {
    2121            define('WP_MEMORY_LIMIT', '64M');
    2222        } else {
  • trunk/src/wp-includes/feed-atom-comments.php

    r29014 r32800  
    4444    <link rel="self" type="application/atom+xml" href="<?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?>" />
    4545    <id><?php echo esc_url( get_post_comments_feed_link('', 'atom') ); ?></id>
    46 <?php } elseif(is_search()) { ?>
     46<?php } elseif (is_search()) { ?>
    4747    <link rel="alternate" type="<?php bloginfo_rss('html_type'); ?>" href="<?php echo home_url() . '?s=' . get_search_query(); ?>" />
    4848    <link rel="self" type="application/atom+xml" href="<?php echo get_search_comments_feed_link('', 'atom'); ?>" />
  • trunk/src/wp-includes/feed.php

    r32765 r32800  
    110110        $max_post_time = max( $post_times );
    111111
    112         if( $wp_query->is_comment_feed() ) {
     112        if ( $wp_query->is_comment_feed() ) {
    113113            $max_comment_time = $wpdb->get_var( $wpdb->prepare( "SELECT MAX(comment_date_gmt) FROM $wpdb->comments WHERE comment_post_ID IN ('%s') AND comment_approved = '1'", $postids ) );
    114114
     
    677677    do_action_ref_array( 'wp_feed_options', array( &$feed, $url ) );
    678678    $feed->init();
    679     $feed->set_output_encoding( get_option( 'blog_charset' ) ); 
     679    $feed->set_output_encoding( get_option( 'blog_charset' ) );
    680680    $feed->handle_content_type();
    681681
  • trunk/src/wp-includes/formatting.php

    r32797 r32800  
    15831583            $tag = strtolower(substr($regex[1],1));
    15841584            // if too many closing tags
    1585             if( $stacksize <= 0 ) {
     1585            if ( $stacksize <= 0 ) {
    15861586                $tag = '';
    15871587                // or close to be safe $tag = '/' . $tag;
     
    16381638            // Attributes
    16391639            $attributes = $regex[2];
    1640             if( ! empty( $attributes ) && $attributes[0] != '>' )
     1640            if ( ! empty( $attributes ) && $attributes[0] != '>' )
    16411641                $attributes = ' ' . $attributes;
    16421642
     
    27432743     */
    27442744    $filtered = apply_filters( 'pre_ent2ncr', null, $text );
    2745     if( null !== $filtered )
     2745    if ( null !== $filtered )
    27462746        return $filtered;
    27472747
  • trunk/src/wp-includes/functions.php

    r32797 r32800  
    14851485
    14861486    // Strip the protocol.
    1487     if( wp_is_stream( $target ) ) {
     1487    if ( wp_is_stream( $target ) ) {
    14881488        list( $wrapper, $target ) = explode( '://', $target, 2 );
    14891489    }
     
    14931493
    14941494    // Put the wrapper back on the target.
    1495     if( $wrapper !== null ) {
     1495    if ( $wrapper !== null ) {
    14961496        $target = $wrapper . '://' . $target;
    14971497    }
  • trunk/src/wp-includes/ms-files.php

    r24305 r32800  
    1212require_once( dirname( dirname( __FILE__ ) ) . '/wp-load.php' );
    1313
    14 if( !is_multisite() )
     14if ( !is_multisite() )
    1515    die( 'Multisite support not enabled' );
    1616
     
    3131
    3232$mime = wp_check_filetype( $file );
    33 if( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
     33if ( false === $mime[ 'type' ] && function_exists( 'mime_content_type' ) )
    3434    $mime[ 'type' ] = mime_content_type( $file );
    3535
    36 if( $mime[ 'type' ] )
     36if ( $mime[ 'type' ] )
    3737    $mimetype = $mime[ 'type' ];
    3838else
     
    6161$client_etag = isset( $_SERVER['HTTP_IF_NONE_MATCH'] ) ? stripslashes( $_SERVER['HTTP_IF_NONE_MATCH'] ) : false;
    6262
    63 if( ! isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )
     63if ( ! isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )
    6464    $_SERVER['HTTP_IF_MODIFIED_SINCE'] = false;
    6565
  • trunk/src/wp-includes/ms-functions.php

    r32733 r32800  
    18641864        clean_term_cache($term_id);
    18651865    }
    1866     if( $recurse_start )
     1866    if ( $recurse_start )
    18671867        $global_terms_recurse = null;
    18681868
  • trunk/src/wp-includes/pluggable.php

    r32793 r32800  
    410410            // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
    411411            $recipient_name = '';
    412             if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
     412            if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
    413413                if ( count( $matches ) == 3 ) {
    414414                    $recipient_name = $matches[1];
     
    432432                // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
    433433                $recipient_name = '';
    434                 if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
     434                if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
    435435                    if ( count( $matches ) == 3 ) {
    436436                        $recipient_name = $matches[1];
     
    450450                // Break $recipient into name and address parts if in the format "Foo <bar@baz.com>"
    451451                $recipient_name = '';
    452                 if( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
     452                if ( preg_match( '/(.*)<(.+)>/', $recipient, $matches ) ) {
    453453                    if ( count( $matches ) == 3 ) {
    454454                        $recipient_name = $matches[1];
     
    12741274    /**
    12751275     * Filter the redirect fallback URL for when the provided redirect is not safe (local).
    1276      * 
     1276     *
    12771277     * @since 4.3.0
    1278      * 
     1278     *
    12791279     * @param string $fallback_url  The fallback URL to use by default.
    12801280     * @param int    $status        The redirect status.
  • trunk/src/wp-includes/post.php

    r32762 r32800  
    461461 *
    462462 * @property string $page_template
    463  * 
     463 *
    464464 * @property-read array  $ancestors
    465465 * @property-read int    $post_category
     
    32953295                $post_status = 'future';
    32963296            }
    3297         } elseif( 'future' == $post_status ) {
     3297        } elseif ( 'future' == $post_status ) {
    32983298            $now = gmdate('Y-m-d H:i:59');
    32993299            if ( mysql2date('U', $post_date_gmt, false) <= mysql2date('U', $now, false) ) {
  • trunk/src/wp-includes/revision.php

    r32733 r32800  
    151151
    152152            //don't save revision if post unchanged
    153             if( ! $post_has_changed ) {
     153            if ( ! $post_has_changed ) {
    154154                return;
    155155            }
Note: See TracChangeset for help on using the changeset viewer.