Commit Graph

17 Commits

Author SHA1 Message Date
Sergey Biryukov
429f38551d Grouped backports to the 4.4 branch.
- Posts, Post types: Apply KSES to post-by-email content,
- General: Validate host on "Are you sure?" screen,
- Posts, Post types: Remove emails from post-by-email logs,
- Pings/trackbacks: Apply KSES to all trackbacks,
- Comments: Apply kses when editing comments,
- Customize: Escape blogname option in underscores templates,
- Mail: Reset PHPMailer properties between use,
- Query: Validate relation in `WP_Date_Query`,
- Widgets: Escape RSS error messages for display.

Merges [54521], [54522], [54523], [54525], [54526], [54527], [54529], [54530], [54541] to the 4.4 branch.
Props voldemortensen, johnbillion, paulkevan, peterwilsoncc, xknown, dd32, audrasjb, martinkrcho, davidbaumwald, tykoted, johnjamesjacoby, ehtis, matveb, talldanwp.

Built from https://develop.svn.wordpress.org/branches/4.4@54558


git-svn-id: http://core.svn.wordpress.org/branches/4.4@54113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2022-10-17 18:01:21 +00:00
Dion Hulse
378e246adf Customize: Ensure that "Change" button appears when there are only 2 themes.
Fixes defect introduced in [35535].

Merges [35943] to the 4.4 branch.
Props igmoweb.
See #34549.
Fixes #35081.

Built from https://develop.svn.wordpress.org/branches/4.4@36065


git-svn-id: http://core.svn.wordpress.org/branches/4.4@36030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-23 01:51:22 +00:00
Weston Ruter
5dae1386aa Customize: Ensure that a setting (especially a multidimensional one) can still be previewed when the post value to preview is set after preview() is invoked.
* Introduce `customize_post_value_set_{$setting_id}` and `customize_post_value_set` actions which are done when `WP_Customize_Manager::set_post_value()` is called.
* Clear the `preview_applied` flag for aggregated multidimensional settings when a post value is set. This ensures the new value is used instead of a previously-cached previewed value.
* Move `$is_preview` property from subclasses to `WP_Customize_Setting` parent class.
* Deferred preview: Ensure that when `preview()` short-circuits due to not being applicable that it will be called again later when the post value is set.
* Populate post value for updated-widget with the (unsanitized) JS-value in `WP_Customize_Widgets::call_widget_update()` so that value will be properly sanitized when accessed in `WP_Customize_Manager::post_value()`.

Includes unit tests with assertions to check the reported issues and validate the fixes.

Fixes defect introduced in [35007].
See #32103.
Fixes #34738.

Built from https://develop.svn.wordpress.org/trunk@35724


git-svn-id: http://core.svn.wordpress.org/trunk@35688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-21 02:52:27 +00:00
Sergey Biryukov
17af54fc7c Customizer: Use correct context and translator comments for menu location strings.
See #33431.
Built from https://develop.svn.wordpress.org/trunk@35722


git-svn-id: http://core.svn.wordpress.org/trunk@35686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-20 17:46:25 +00:00
Dominik Schilling
d1805c9da8 Customizer: Merge two similar strings.
Remove also `{{ data.menu_name }}` since it doesn't print anything.

Fixes #33630.
Built from https://develop.svn.wordpress.org/trunk@35695


git-svn-id: http://core.svn.wordpress.org/trunk@35659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 22:25:25 +00:00
Scott Taylor
a9fb6e9ae0 Customizer i18n: provide translator context for current menu name and location.
Props ryankienstra.
Fixes #33431.

Built from https://develop.svn.wordpress.org/trunk@35676


git-svn-id: http://core.svn.wordpress.org/trunk@35640 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-18 19:21:28 +00:00
Helen Hou-Sandí
ae9e173082 Buttons: Standardize on .button-link for link-like buttons.
This serves as both a reset and some basic styling. The class name also aligns with parallel components in other popular projects.

props paulwilde for the initial patch.
fixes #34242.

Built from https://develop.svn.wordpress.org/trunk@35636


git-svn-id: http://core.svn.wordpress.org/trunk@35600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-13 15:47:27 +00:00
Weston Ruter
c470b872bd Customize: Improve alignment of WP_Customize_Nav_Menu_Item_Setting::sanitize() behavior with wp_update_nav_menu_item().
* Apply `title_save_pre`, `excerpt_save_pre`, and `content_save_pre` filters on a nav menu item's `title`, `attr_title`, and `description` properties respectively. This ensures that arbitrary markup can be supplied if the user has `unfiltered_html` cap, and for these fields to have markup stripped if not.
* Ensure a nav menu item's `post_status` is sanitized as `publish` or `draft` using the same conditions as `wp_update_nav_menu_item()`.
* Align `WP_Customize_Nav_Menu_Item_Setting::sanitize()` behavior for sanitizing `position` to be the same as `wp_update_nav_menu_item()`.
* Also apply `nav_menu_attr_title` and `nav_menu_description` filters in `WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item()` to ensure that previewing markup entered into menu item description will preview the same way as when the nav menu item is saved.
* Add unit tests.

Fixes #32812.

Built from https://develop.svn.wordpress.org/trunk@35580


git-svn-id: http://core.svn.wordpress.org/trunk@35544 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-09 00:48:26 +00:00
Scott Taylor
e649fabb6a Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia.
Fixes #34583.

Built from https://develop.svn.wordpress.org/trunk@35567


git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-07 16:12:27 +00:00
Weston Ruter
1a55cbe59d Customize: Hide "Change" button in themes section if there are fewer than two available themes.
Props danielbachhuber, westonruter.
Fixes #34549.

Built from https://develop.svn.wordpress.org/trunk@35535


git-svn-id: http://core.svn.wordpress.org/trunk@35499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-05 01:26:25 +00:00
Weston Ruter
77e365efbf Customize: Add support for post_type_archive nav menu items.
Props celloexpressions, westonruter.
Fixes #16075.

Built from https://develop.svn.wordpress.org/trunk@35500


git-svn-id: http://core.svn.wordpress.org/trunk@35464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-04 04:30:26 +00:00
Andrea Fercia
be620e6da6 Customizer: Remove the no more used add-menu-item-loading spinner.
Also makes more room for longer translations.

Props dipali.dhole27@gmail.com.
Fixes #34342.
Built from https://develop.svn.wordpress.org/trunk@35396


git-svn-id: http://core.svn.wordpress.org/trunk@35360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 13:59:26 +00:00
Drew Jaynes
2f42bf0a73 Docs: Add missing DocBlocks for the $type and $sidebar_id properties, and summaries for the to_json() and render_content() methods in WP_Widget_Area_Customize_Control.
See #32246.

Built from https://develop.svn.wordpress.org/trunk@35393


git-svn-id: http://core.svn.wordpress.org/trunk@35357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-25 19:58:26 +00:00
Scott Taylor
68526a8bf1 Customize: move WP_Customize_Control subclasses to wp-includes/customize, they load in the exact same place.
See #34432.

Built from https://develop.svn.wordpress.org/trunk@35389


git-svn-id: http://core.svn.wordpress.org/trunk@35353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:57:25 +00:00
Scott Taylor
61aefacd2c Customize: move WP_Customize_Panel subclass to wp-includes/customize, it loads in the exact same place.
See #34432.

Built from https://develop.svn.wordpress.org/trunk@35386


git-svn-id: http://core.svn.wordpress.org/trunk@35350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:25:24 +00:00
Scott Taylor
574f53399c Customize: move WP_Customize_Section subclasses to wp-includes/customize, they load in the exact same place.
See #34432.

Built from https://develop.svn.wordpress.org/trunk@35385


git-svn-id: http://core.svn.wordpress.org/trunk@35349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:21:25 +00:00
Scott Taylor
21d74f5b1d Customize: move WP_Customize_Setting subclasses to wp-includes/customize, they load in the exact same place.
See #34432.

Built from https://develop.svn.wordpress.org/trunk@35383


git-svn-id: http://core.svn.wordpress.org/trunk@35347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-24 18:11:24 +00:00