From f8f263cdb91d33c35ebb7dea4028ad75661f5611 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 26 Sep 2017 08:23:07 +0000 Subject: [PATCH] Permalinks: Change structure tag button state more reliably. Changes the highlighted tag buttons accordingly when selecting one of the commong permalink settings. Deprecates `options_permalink_add_js()` as that JavaScript isn't added inline anymore. Fixes #29872. git-svn-id: https://develop.svn.wordpress.org/trunk@41598 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/deprecated.php | 23 +++++++++++++++++++++++ src/wp-admin/includes/options.php | 22 ---------------------- src/wp-admin/js/common.js | 22 +++++++++++++++++++++- src/wp-admin/options-permalink.php | 2 -- 4 files changed, 44 insertions(+), 25 deletions(-) diff --git a/src/wp-admin/includes/deprecated.php b/src/wp-admin/includes/deprecated.php index ab5ddafd17..e65fe5a79c 100644 --- a/src/wp-admin/includes/deprecated.php +++ b/src/wp-admin/includes/deprecated.php @@ -1491,3 +1491,26 @@ function post_form_autocomplete_off() { echo ' autocomplete="off"'; } } + +/** + * Display JavaScript on the page. + * + * @since 3.5.0 + * @deprecated 4.9.0 + */ +function options_permalink_add_js() { + ?> + + - -set_help_sidebar( '

' . __('Support Forums') . '

' ); -add_filter('admin_head', 'options_permalink_add_js'); - $home_path = get_home_path(); $iis7_permalinks = iis7_supports_permalinks(); $permalink_structure = get_option( 'permalink_structure' );