Make WordPress Core


Ignore:
Timestamp:
03/11/2010 05:12:23 PM (16 years ago)
Author:
nacin
Message:

Use disabled() form helper. fixes #12581

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r13606 r13661  
    7676<tr valign="top">
    7777<th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
    78 <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
     78<td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>"<?php $disabled = disabled( defined( 'WP_SITEURL' ) ); ?> class="regular-text code<?php if ( $disabled ) echo ' disabled' ?>" /></td>
    7979</tr>
    8080<tr valign="top">
    8181<th scope="row"><label for="home"><?php _e('Blog address (URL)') ?></label></th>
    82 <td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>" class="regular-text code<?php if ( defined( 'WP_HOME' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> />
     82<td><input name="home" type="text" id="home" value="<?php form_option('home'); ?>"<?php $disabled = disabled( defined( 'WP_HOME' ) ); ?> class="regular-text code<?php if ( $disabled ) echo ' disabled' ?>" />
    8383<span class="description"><?php _e('Enter the address here if you want your blog homepage <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory">to be different from the directory</a> you installed WordPress.'); ?></span></td>
    8484</tr>
Note: See TracChangeset for help on using the changeset viewer.