Changes in trunk/wp-admin/options-reading.php [15227:16980]
- File:
-
- 1 edited
-
trunk/wp-admin/options-reading.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-reading.php
r15227 r16980 16 16 $parent_file = 'options-general.php'; 17 17 18 /** 19 * Display JavaScript on the page. 20 * 21 * @package WordPress 22 * @subpackage Reading_Settings_Screen 23 */ 24 function add_js() { 25 ?> 26 <script type="text/javascript"> 27 //<![CDATA[ 28 jQuery(document).ready(function($){ 29 var section = $('#front-static-pages'), 30 staticPage = section.find('input:radio[value="page"]'), 31 selects = section.find('select'), 32 check_disabled = function(){ 33 selects.attr('disabled', staticPage.is(':checked') ? '' : 'disabled'); 34 }; 35 check_disabled(); 36 section.find('input:radio').change(check_disabled); 37 }); 38 //]]> 39 </script> 40 <?php 41 } 42 add_action('admin_head', 'add_js'); 43 18 44 add_contextual_help($current_screen, 19 45 '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' . … … 22 48 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' . 23 49 '<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>' .50 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_SubPanel" target="_blank">Documentation on Reading Settings</a>') . '</p>' . 25 51 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 26 52 ); … … 39 65 <input name="show_on_front" type="hidden" value="posts" /> 40 66 <table class="form-table"> 41 <?php else : 67 <?php 68 if ( 'posts' != get_option( 'show_on_front' ) ) : 69 update_option( 'show_on_front', 'posts' ); 70 endif; 71 72 else : 42 73 if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) 43 74 update_option( 'show_on_front', 'posts' ); … … 95 126 <?php do_settings_sections( 'reading' ); ?> 96 127 97 <p class="submit"> 98 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes' ); ?>" /> 99 </p> 128 <?php submit_button(); ?> 100 129 </form> 101 130 </div>
Note: See TracChangeset
for help on using the changeset viewer.