Make WordPress Core


Ignore:
Timestamp:
09/10/2015 09:44:29 PM (9 years ago)
Author:
wonderboymusic
Message:

Move ad hoc Options functions to wp-admin/includes/options.php:

  • Move options_discussion_add_js() from wp-admin/options-discussion.php
  • Move options_general_add_js() from wp-admin/options-general.php
  • Move options_permalink_add_js() from wp-admin/options-permalink.php
  • Move options_reading_add_js() from wp-admin/options-reading.php
  • Move options_reading_blog_charset() from wp-admin/options-reading.php

See #33813.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/options-permalink.php

    r33818 r34022  
    4747);
    4848
    49 /**
    50  * Display JavaScript on the page.
    51  *
    52  * @since 3.5.0
    53  */
    54 function options_permalink_add_js() {
    55     ?>
    56 <script type="text/javascript">
    57 jQuery(document).ready(function() {
    58     jQuery('.permalink-structure input:radio').change(function() {
    59         if ( 'custom' == this.value )
    60             return;
    61         jQuery('#permalink_structure').val( this.value );
    62     });
    63     jQuery('#permalink_structure').focus(function() {
    64         jQuery("#custom_selection").attr('checked', 'checked');
    65     });
    66 });
    67 </script>
    68 <?php
    69 }
    7049add_filter('admin_head', 'options_permalink_add_js');
    7150
Note: See TracChangeset for help on using the changeset viewer.