<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12918] trunk/wp-admin/options-reading.php: options-reading.php cleanup.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12918">12918</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-02-01 16:42:19 +0000 (Mon, 01 Feb 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>options-reading.php cleanup. Props nacin. fixes <a href="http://trac.wordpress.org/ticket/12058">#12058</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminoptionsreadingphp">trunk/wp-admin/options-reading.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminoptionsreadingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-reading.php (12917 => 12918)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-reading.php        2010-02-01 16:28:54 UTC (rev 12917)
+++ trunk/wp-admin/options-reading.php        2010-02-01 16:42:19 UTC (rev 12918)
</span><span class="lines">@@ -7,15 +7,15 @@
</span><span class="cx"> */
</span><span class="cx">
</span><span class="cx"> /** WordPress Administration Bootstrap */
</span><del>-require_once('admin.php');
</del><ins>+require_once( 'admin.php' );
</ins><span class="cx">
</span><del>-if ( ! current_user_can('manage_options') )
-        wp_die(__('You do not have sufficient permissions to manage options for this blog.'));
</del><ins>+if ( ! current_user_can( 'manage_options' ) )
+        wp_die( __( 'You do not have sufficient permissions to manage options for this blog.' ) );
</ins><span class="cx">
</span><del>-$title = __('Reading Settings');
</del><ins>+$title = __( 'Reading Settings' );
</ins><span class="cx"> $parent_file = 'options-general.php';
</span><span class="cx">
</span><del>-include('admin-header.php');
</del><ins>+include( 'admin-header.php' );
</ins><span class="cx"> ?>
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="lines">@@ -23,31 +23,31 @@
</span><span class="cx"> <h2><?php echo esc_html( $title ); ?></h2>
</span><span class="cx">
</span><span class="cx"> <form name="form1" method="post" action="options.php">
</span><del>-<?php settings_fields('reading'); ?>
</del><ins>+<?php settings_fields( 'reading' ); ?>
</ins><span class="cx">
</span><span class="cx"> <table class="form-table">
</span><span class="cx"> <?php if ( get_pages() ): ?>
</span><span class="cx"> <tr valign="top">
</span><del>-<th scope="row"><?php _e('Front page displays')?></th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('Front page displays')?></span></legend>
</del><ins>+<th scope="row"><?php _e( 'Front page displays' ); ?></th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
</ins><span class="cx">         <p><label>
</span><del>-                <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked('posts', get_option('show_on_front')); ?> />
-                <?php _e('Your latest posts'); ?>
</del><ins>+                <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
+                <?php _e( 'Your latest posts' ); ?>
</ins><span class="cx">         </label>
</span><span class="cx">         </p>
</span><span class="cx">         <p><label>
</span><del>-                <input name="show_on_front" type="radio" value="page" class="tog" <?php checked('page', get_option('show_on_front')); ?> />
-                <?php printf(__('A <a href="%s">static page</a> (select below)'), 'edit-pages.php'); ?>
</del><ins>+                <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
+                <?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
</ins><span class="cx">         </label>
</span><span class="cx">         </p>
</span><span class="cx"> <ul>
</span><del>-        <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>
-        <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>
</del><ins>+        <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>
+        <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>
</ins><span class="cx"> </ul>
</span><del>-<?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?>
</del><ins>+<?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
</ins><span class="cx"> <div id="front-page-warning" class="updated">
</span><span class="cx">         <p>
</span><del>-                <?php _e('<strong>Warning:</strong> these pages should not be the same!'); ?>
</del><ins>+                <?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?>
</ins><span class="cx">         </p>
</span><span class="cx"> </div>
</span><span class="cx"> <?php endif; ?>
</span><span class="lines">@@ -55,36 +55,36 @@
</span><span class="cx"> </tr>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx"> <tr valign="top">
</span><del>-<th scope="row"><label for="posts_per_page"><?php _e('Blog pages show at most') ?></label></th>
</del><ins>+<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
</ins><span class="cx"> <td>
</span><del>-<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option('posts_per_page'); ?>" class="small-text" /> <?php _e('posts') ?>
</del><ins>+<input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
</ins><span class="cx"> </td>
</span><span class="cx"> </tr>
</span><span class="cx"> <tr valign="top">
</span><del>-<th scope="row"><label for="posts_per_rss"><?php _e('Syndication feeds show the most recent') ?></label></th>
-<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>
</del><ins>+<th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
+<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>
</ins><span class="cx"> </tr>
</span><span class="cx"> <tr valign="top">
</span><del>-<th scope="row"><?php _e('For each article in a feed, show') ?> </th>
-<td><fieldset><legend class="screen-reader-text"><span><?php _e('For each article in a feed, show') ?> </span></legend>
-<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 />
-<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked(1, get_option('rss_use_excerpt')); ?> /> <?php _e('Summary') ?></label></p>
</del><ins>+<th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>
+<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend>
+<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 />
+<label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p>
</ins><span class="cx"> </fieldset></td>
</span><span class="cx"> </tr>
</span><span class="cx">
</span><span class="cx"> <tr valign="top">
</span><del>-<th scope="row"><label for="blog_charset"><?php _e('Encoding for pages and feeds') ?></label></th>
-<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option('blog_charset'); ?>" class="regular-text" />
-<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>
</del><ins>+<th scope="row"><label for="blog_charset"><?php _e( 'Encoding for pages and feeds' ); ?></label></th>
+<td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option( 'blog_charset' ); ?>" class="regular-text" />
+<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>
</ins><span class="cx"> </tr>
</span><del>-<?php do_settings_fields('reading', 'default'); ?>
</del><ins>+<?php do_settings_fields( 'reading', 'default' ); ?>
</ins><span class="cx"> </table>
</span><span class="cx">
</span><del>-<?php do_settings_sections('reading'); ?>
</del><ins>+<?php do_settings_sections( 'reading' ); ?>
</ins><span class="cx">
</span><span class="cx"> <p class="submit">
</span><del>-        <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
</del><ins>+        <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes' ); ?>" />
</ins><span class="cx"> </p>
</span><span class="cx"> </form>
</span><span class="cx"> </div>
</span><del>-<?php include('./admin-footer.php'); ?>
</del><ins>+<?php include( './admin-footer.php' ); ?>
</ins></span></pre>
</div>
</div>
</body>
</html>