Make WordPress Core

Changeset 12918


Ignore:
Timestamp:
02/01/2010 04:42:19 PM (14 years ago)
Author:
ryan
Message:

options-reading.php cleanup. Props nacin. fixes #12058

File:
1 edited

Legend:

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

    r12789 r12918  
    88
    99/** WordPress Administration Bootstrap */
    10 require_once('admin.php');
     10require_once( 'admin.php' );
    1111
    12 if ( ! current_user_can('manage_options') )
    13     wp_die(__('You do not have sufficient permissions to manage options for this blog.'));
     12if ( ! current_user_can( 'manage_options' ) )
     13    wp_die( __( 'You do not have sufficient permissions to manage options for this blog.' ) );
    1414
    15 $title = __('Reading Settings');
     15$title = __( 'Reading Settings' );
    1616$parent_file = 'options-general.php';
    1717
    18 include('admin-header.php');
     18include( 'admin-header.php' );
    1919?>
    2020
     
    2424
    2525<form name="form1" method="post" action="options.php">
    26 <?php settings_fields('reading'); ?>
     26<?php settings_fields( 'reading' ); ?>
    2727
    2828<table class="form-table">
    2929<?php if ( get_pages() ): ?>
    3030<tr valign="top">
    31 <th scope="row"><?php _e('Front page displays')?></th>
    32 <td><fieldset><legend class="screen-reader-text"><span><?php _e('Front page displays')?></span></legend>
     31<th scope="row"><?php _e( 'Front page displays' ); ?></th>
     32<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
    3333    <p><label>
    34         <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />
    35         <?php _e('Your latest posts'); ?>
     34        <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
     35        <?php _e( 'Your latest posts' ); ?>
    3636    </label>
    3737    </p>
    3838    <p><label>
    39         <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />
    40         <?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?>
     39        <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
     40        <?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
    4141    </label>
    4242    </p>
    4343<ul>
    44     <li><?php printf("<label for='page_on_front'>" . __('Front page: %s') . "</label>", wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __('&mdash; Select &mdash;'), 'selected' => get_option('page_on_front')  ) ) ); ?></li>
    45     <li><?php printf("<label for='page_for_posts'>". __('Posts page: %s') . "</label>", wp_dropdown_pages( array( 'name' => 'page_for_posts','echo' => 0, 'show_option_none' => __('&mdash; Select &mdash;'), 'selected' => get_option('page_for_posts') ) ) ); ?></li>
     44    <li><label for="page_on_front"><?php printf( __( 'Front page: %s' ), wp_dropdown_pages( array( 'name' => 'page_on_front', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
     45    <li><label for="page_for_posts"><?php printf( __( 'Posts page: %s' ), wp_dropdown_pages( array( 'name' => 'page_for_posts', 'echo' => 0, 'show_option_none' => __( '&mdash; Select &mdash;' ), 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
    4646</ul>
    47 <?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?>
     47<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
    4848<div id="front-page-warning" class="updated">
    4949    <p>
    50         <?php _e('<strong>Warning:</strong> these pages should not be the same!'); ?>
     50        <?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?>
    5151    </p>
    5252</div>
     
    5656<?php endif; ?>
    5757<tr valign="top">
    58 <th scope="row"><label for="posts_per_page"><?php _e('Blog pages show at most') ?></label></th>
     58<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
    5959<td>
    60 <input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" class="small-text" /> <?php _e('posts') ?>
     60<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
    6161</td>
    6262</tr>
    6363<tr valign="top">
    64 <th scope="row"><label for="posts_per_rss"><?php _e('Syndication feeds show the most recent') ?></label></th>
    65 <td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option('posts_per_rss'); ?>" class="small-text" /> <?php _e('posts') ?></td>
     64<th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
     65<td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?></td>
    6666</tr>
    6767<tr valign="top">
    68 <th scope="row"><?php _e('For each article in a feed, show') ?> </th>
    69 <td><fieldset><legend class="screen-reader-text"><span><?php _e('For each article in a feed, show') ?> </span></legend>
    70 <p><label><input name="rss_use_excerpt"  type="radio" value="0" <?php checked(0, get_option('rss_use_excerpt')); ?> /> <?php _e('Full text') ?></label><br />
    71 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p>
     68<th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>
     69<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend>
     70<p><label><input name="rss_use_excerpt"  type="radio" value="0" <?php checked( 0, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Full text' ); ?></label><br />
     71<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p>
    7272</fieldset></td>
    7373</tr>
    7474
    7575<tr valign="top">
    76 <th scope="row"><label for="blog_charset"><?php _e('Encoding for pages and feeds') ?></label></th>
    77 <td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" class="regular-text" />
    78 <span class="description"><?php _e('The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your blog (UTF-8 is recommended, if you are adventurous there are some <a href="http://en.wikipedia.org/wiki/Character_set">other encodings</a>)') ?></span></td>
     76<th scope="row"><label for="blog_charset"><?php _e( 'Encoding for pages and feeds' ); ?></label></th>
     77<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option( 'blog_charset' ); ?>" class="regular-text" />
     78<span class="description"><?php _e( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your blog (UTF-8 is recommended, if you are adventurous there are some <a href="http://en.wikipedia.org/wiki/Character_set">other encodings</a>)' ); ?></span></td>
    7979</tr>
    80 <?php do_settings_fields('reading', 'default'); ?>
     80<?php do_settings_fields( 'reading', 'default' ); ?>
    8181</table>
    8282
    83 <?php do_settings_sections('reading'); ?>
     83<?php do_settings_sections( 'reading' ); ?>
    8484
    8585<p class="submit">
    86     <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
     86    <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes' ); ?>" />
    8787</p>
    8888</form>
    8989</div>
    90 <?php include('./admin-footer.php'); ?>
     90<?php include( './admin-footer.php' ); ?>
Note: See TracChangeset for help on using the changeset viewer.