]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-admin/options-reading.php
Wordpress 3.0
[autoinstalls/wordpress.git] / wp-admin / options-reading.php
1 <?php
2 /**
3  * Reading settings administration panel.
4  *
5  * @package WordPress
6  * @subpackage Administration
7  */
8
9 /** WordPress Administration Bootstrap */
10 require_once( './admin.php' );
11
12 if ( ! current_user_can( 'manage_options' ) )
13         wp_die( __( 'You do not have sufficient permissions to manage options for this site.' ) );
14
15 $title = __( 'Reading Settings' );
16 $parent_file = 'options-general.php';
17
18 add_contextual_help($current_screen,
19         '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' .
20         '<p>' . sprintf(__('You can choose what&#8217;s displayed on the front page of your site. It can be posts in reverse chronological order (classic blog), or a fixed/static page. To set a static home page, you first need to create two <a href="%s">Pages</a>. One will become the front page, and the other will be where your posts are displayed.'), 'post-new.php?post_type=page') . '</p>' .
21         '<p>' . __('You can also control the display of your content in RSS feeds, including the maximum numbers of posts to display, whether to show full text or a summary, and the character set encoding.') . '</p>' .
22         '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' .
23         '<p><strong>' . __('For more information:') . '</strong></p>' .
24         '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_SubPanel" target="_blank">Reading Settings Documentation</a>') . '</p>' .
25         '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
26 );
27
28 include( './admin-header.php' );
29 ?>
30
31 <div class="wrap">
32 <?php screen_icon(); ?>
33 <h2><?php echo esc_html( $title ); ?></h2>
34
35 <form name="form1" method="post" action="options.php">
36 <?php settings_fields( 'reading' ); ?>
37
38 <?php if ( ! get_pages() ) : ?>
39 <input name="show_on_front" type="hidden" value="posts" />
40 <table class="form-table">
41 <?php else :
42         if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) )
43                 update_option( 'show_on_front', 'posts' );
44 ?>
45 <table class="form-table">
46 <tr valign="top">
47 <th scope="row"><?php _e( 'Front page displays' ); ?></th>
48 <td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Front page displays' ); ?></span></legend>
49         <p><label>
50                 <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
51                 <?php _e( 'Your latest posts' ); ?>
52         </label>
53         </p>
54         <p><label>
55                 <input name="show_on_front" type="radio" value="page" class="tog" <?php checked( 'page', get_option( 'show_on_front' ) ); ?> />
56                 <?php printf( __( 'A <a href="%s">static page</a> (select below)' ), 'edit.php?post_type=page' ); ?>
57         </label>
58         </p>
59 <ul>
60         <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;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_on_front' ) ) ) ); ?></label></li>
61         <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;' ), 'option_none_value' => '0', 'selected' => get_option( 'page_for_posts' ) ) ) ); ?></label></li>
62 </ul>
63 <?php if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) == get_option( 'page_on_front' ) ) : ?>
64 <div id="front-page-warning" class="error inline"><p><?php _e( '<strong>Warning:</strong> these pages should not be the same!' ); ?></p></div>
65 <?php endif; ?>
66 </fieldset></td>
67 </tr>
68 <?php endif; ?>
69 <tr valign="top">
70 <th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
71 <td>
72 <input name="posts_per_page" type="text" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
73 </td>
74 </tr>
75 <tr valign="top">
76 <th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
77 <td><input name="posts_per_rss" type="text" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td>
78 </tr>
79 <tr valign="top">
80 <th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>
81 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each article in a feed, show' ); ?> </span></legend>
82 <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 />
83 <label><input name="rss_use_excerpt" type="radio" value="1" <?php checked( 1, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Summary' ); ?></label></p>
84 </fieldset></td>
85 </tr>
86
87 <tr valign="top">
88 <th scope="row"><label for="blog_charset"><?php _e( 'Encoding for pages and feeds' ); ?></label></th>
89 <td><input name="blog_charset" type="text" id="blog_charset" value="<?php form_option( 'blog_charset' ); ?>" class="regular-text" />
90 <span class="description"><?php _e( 'The <a href="http://codex.wordpress.org/Glossary#Character_set">character encoding</a> of your site (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>
91 </tr>
92 <?php do_settings_fields( 'reading', 'default' ); ?>
93 </table>
94
95 <?php do_settings_sections( 'reading' ); ?>
96
97 <p class="submit">
98         <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes' ); ?>" />
99 </p>
100 </form>
101 </div>
102 <?php include( './admin-footer.php' ); ?>