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. Built from https://develop.svn.wordpress.org/trunk@34022 git-svn-id: http://core.svn.wordpress.org/trunk@33991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -46,27 +46,6 @@ get_current_screen()->set_help_sidebar(
|
||||
'<p>' . __('<a href="https://wordpress.org/support/" target="_blank">Support Forums</a>') . '</p>'
|
||||
);
|
||||
|
||||
/**
|
||||
* Display JavaScript on the page.
|
||||
*
|
||||
* @since 3.5.0
|
||||
*/
|
||||
function options_permalink_add_js() {
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function() {
|
||||
jQuery('.permalink-structure input:radio').change(function() {
|
||||
if ( 'custom' == this.value )
|
||||
return;
|
||||
jQuery('#permalink_structure').val( this.value );
|
||||
});
|
||||
jQuery('#permalink_structure').focus(function() {
|
||||
jQuery("#custom_selection").attr('checked', 'checked');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
add_filter('admin_head', 'options_permalink_add_js');
|
||||
|
||||
$home_path = get_home_path();
|
||||
|
||||
Reference in New Issue
Block a user