Make WordPress Core


Ignore:
Timestamp:
01/18/2010 08:34:48 PM (15 years ago)
Author:
ryan
Message:

Coding standards, space after if

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r12733 r12752  
    3939
    4040    $upload = false;
    41     if( !empty($_POST['photo_src']) && current_user_can('upload_files') ) {
     41    if ( !empty($_POST['photo_src']) && current_user_can('upload_files') ) {
    4242        foreach( (array) $_POST['photo_src'] as $key => $image) {
    4343            // see if files exist in content - we don't want to upload non-used selected files.
     
    4747
    4848                // Replace the POSTED content <img> with correct uploaded ones. Regex contains fix for Magic Quotes
    49                 if( !is_wp_error($upload) )
     49                if ( !is_wp_error($upload) )
    5050                    $content = preg_replace('/<img ([^>]*)src=\\\?(\"|\')'.preg_quote(htmlspecialchars($image), '/').'\\\?(\2)([^>\/]*)\/*>/is', $upload, $content);
    5151            }
     
    185185        function get_images_from_uri($uri) {
    186186            $uri = preg_replace('/\/#.+?$/','', $uri);
    187             if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
     187            if ( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
    188188                return "'" . esc_attr( html_entity_decode($uri) ) . "'";
    189189            $content = wp_remote_fopen($uri);
     
    199199            foreach ($matches[3] as $src) {
    200200                // if no http in url
    201                 if(strpos($src, 'http') === false)
     201                if (strpos($src, 'http') === false)
    202202                    // if it doesn't have a relative uri
    203                     if( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === 0)
     203                    if ( strpos($src, '../') === false && strpos($src, './') === false && strpos($src, '/') === 0)
    204204                        $src = 'http://'.str_replace('//','/', $host['host'].'/'.$src);
    205205                    else
     
    554554                    <a title="<?php _e('Embed a Video'); ?>" href="#"><img alt="<?php _e('Embed a Video'); ?>" src="images/media-button-video.gif"/></a>
    555555                </li>
    556                 <?php if( user_can_richedit() ) { ?>
     556                <?php if ( user_can_richedit() ) { ?>
    557557                <li id="switcher">
    558558                    <?php wp_print_scripts( 'quicktags' ); ?>
Note: See TracChangeset for help on using the changeset viewer.