| [ Index ] |
PHP Cross Reference of Wordpress 2.9.1 |
[Summary view] [Print] [Text view]
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 blog.')); 14 15 $title = __('Reading Settings'); 16 $parent_file = 'options-general.php'; 17 18 include ('admin-header.php'); 19 ?> 20 21 <div class="wrap"> 22 <?php screen_icon(); ?> 23 <h2><?php echo esc_html( $title ); ?></h2> 24 25 <form name="form1" method="post" action="options.php"> 26 <?php settings_fields('reading'); ?> 27 28 <table class="form-table"> 29 <?php if ( get_pages() ): ?> 30 <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> 33 <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'); ?> 36 </label> 37 </p> 38 <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'); ?> 41 </label> 42 </p> 43 <ul> 44 <li><?php printf("<label for='page_on_front'>".__('Front page: %s')."</label>", wp_dropdown_pages("name=page_on_front&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_on_front'))); ?></li> 45 <li><?php printf("<label for='page_for_posts'>".__('Posts page: %s')."</label>", wp_dropdown_pages("name=page_for_posts&echo=0&show_option_none=".__('- Select -')."&selected=" . get_option('page_for_posts'))); ?></li> 46 </ul> 47 <?php if ( 'page' == get_option('show_on_front') && get_option('page_for_posts') == get_option('page_on_front') ) : ?> 48 <div id="front-page-warning" class="updated fade-ff0000"> 49 <p> 50 <?php _e('<strong>Warning:</strong> these pages should not be the same!'); ?> 51 </p> 52 </div> 53 <?php endif; ?> 54 </fieldset></td> 55 </tr> 56 <?php endif; ?> 57 <tr valign="top"> 58 <th scope="row"><label for="posts_per_page"><?php _e('Blog pages show at most') ?></label></th> 59 <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') ?> 61 </td> 62 </tr> 63 <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> 66 </tr> 67 <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> 72 </fieldset></td> 73 </tr> 74 75 <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> 79 </tr> 80 <?php do_settings_fields('reading', 'default'); ?> 81 </table> 82 83 <?php do_settings_sections('reading'); ?> 84 85 <p class="submit"> 86 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" /> 87 </p> 88 </form> 89 </div> 90 <?php include ('./admin-footer.php'); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Fri Jan 8 00:19:48 2010 | Cross-referenced by PHPXref 0.7 |