Changes in trunk/wp-admin/options-reading.php [16980:15227]
- File:
-
- 1 edited
-
trunk/wp-admin/options-reading.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/options-reading.php
r16980 r15227 16 16 $parent_file = 'options-general.php'; 17 17 18 /**19 * Display JavaScript on the page.20 *21 * @package WordPress22 * @subpackage Reading_Settings_Screen23 */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 <?php41 }42 add_action('admin_head', 'add_js');43 44 18 add_contextual_help($current_screen, 45 19 '<p>' . __('This screen contains the settings that affect the display of your content.') . '</p>' . … … 48 22 '<p>' . __('You must click the Save Changes button at the bottom of the screen for new settings to take effect.') . '</p>' . 49 23 '<p><strong>' . __('For more information:') . '</strong></p>' . 50 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_SubPanel" target="_blank"> Documentation on Reading Settings</a>') . '</p>' .24 '<p>' . __('<a href="http://codex.wordpress.org/Settings_Reading_SubPanel" target="_blank">Reading Settings Documentation</a>') . '</p>' . 51 25 '<p>' . __('<a href="http://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>' 52 26 ); … … 65 39 <input name="show_on_front" type="hidden" value="posts" /> 66 40 <table class="form-table"> 67 <?php 68 if ( 'posts' != get_option( 'show_on_front' ) ) : 69 update_option( 'show_on_front', 'posts' ); 70 endif; 71 72 else : 41 <?php else : 73 42 if ( 'page' == get_option( 'show_on_front' ) && ! get_option( 'page_on_front' ) && ! get_option( 'page_for_posts' ) ) 74 43 update_option( 'show_on_front', 'posts' ); … … 126 95 <?php do_settings_sections( 'reading' ); ?> 127 96 128 <?php submit_button(); ?> 97 <p class="submit"> 98 <input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e( 'Save Changes' ); ?>" /> 99 </p> 129 100 </form> 130 101 </div>
Note: See TracChangeset
for help on using the changeset viewer.