From 1d68ccec25d281baf3e95b0d0e9334188a625528 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 10 Sep 2015 21:45:24 +0000 Subject: [PATCH] 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 --- wp-admin/includes/admin.php | 3 + wp-admin/includes/options.php | 141 ++++++++++++++++++++++++++++++++ wp-admin/options-discussion.php | 18 ---- wp-admin/options-general.php | 59 ------------- wp-admin/options-permalink.php | 21 ----- wp-admin/options-reading.php | 31 ------- wp-includes/version.php | 2 +- 7 files changed, 145 insertions(+), 130 deletions(-) create mode 100644 wp-admin/includes/options.php diff --git a/wp-admin/includes/admin.php b/wp-admin/includes/admin.php index 64a0ded744..3cd47fee86 100644 --- a/wp-admin/includes/admin.php +++ b/wp-admin/includes/admin.php @@ -39,6 +39,9 @@ require_once(ABSPATH . 'wp-admin/includes/import.php'); /** WordPress Misc Administration API */ require_once(ABSPATH . 'wp-admin/includes/misc.php'); +/** WordPress Options Administration API */ +require_once(ABSPATH . 'wp-admin/includes/options.php'); + /** WordPress Plugin Administration API */ require_once(ABSPATH . 'wp-admin/includes/plugin.php'); diff --git a/wp-admin/includes/options.php b/wp-admin/includes/options.php new file mode 100644 index 0000000000..f0fab455ff --- /dev/null +++ b/wp-admin/includes/options.php @@ -0,0 +1,141 @@ + + + + + + + + +'; + echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

'; +} \ No newline at end of file diff --git a/wp-admin/options-discussion.php b/wp-admin/options-discussion.php index d55b7fcc0e..4ba8be9830 100644 --- a/wp-admin/options-discussion.php +++ b/wp-admin/options-discussion.php @@ -14,24 +14,6 @@ if ( ! current_user_can( 'manage_options' ) ) $title = __('Discussion Settings'); $parent_file = 'options-general.php'; -/** - * Output JavaScript to toggle display of additional settings if avatars are disabled. - * - * @since 4.2.0 - */ -function options_discussion_add_js() { -?> - -add_help_tab( array( diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index cbb7d2f64c..e0e5e5f95e 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -20,65 +20,6 @@ $parent_file = 'options-general.php'; /* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */ $timezone_format = _x('Y-m-d H:i:s', 'timezone date format'); -/** - * Display JavaScript on the page. - * - * @since 3.5.0 - */ -function options_general_add_js() { -?> - -' . __('The fields on this screen determine some of the basics of your site setup.') . '

' . diff --git a/wp-admin/options-permalink.php b/wp-admin/options-permalink.php index 0f30556db9..7af1e98a22 100644 --- a/wp-admin/options-permalink.php +++ b/wp-admin/options-permalink.php @@ -46,27 +46,6 @@ get_current_screen()->set_help_sidebar( '

' . __('Support Forums') . '

' ); -/** - * Display JavaScript on the page. - * - * @since 3.5.0 - */ -function options_permalink_add_js() { - ?> - - - -'; - echo '

' . __( 'The character encoding of your site (UTF-8 is recommended)' ) . '

'; -} - get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __('Overview'), diff --git a/wp-includes/version.php b/wp-includes/version.php index 460aefdb60..e97440f738 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34021'; +$wp_version = '4.4-alpha-34022'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.