Commit Graph

87 Commits

Author SHA1 Message Date
Dominik Schilling 8756f2912f Import: Enhance accessibility on the Import screen.
* Remove title attributes.
* Show "Install Now" and "Details" links if the importer isn't installed yet.
* Show a "Run Importer" link if the importer is installed. It also handles activation if the plugin isn't activated.
* Add `aria-label` attributes to each link.
* Unify the importer descriptions to make them independent from the plugin state. The API was changed in [meta3690].
* Adjust JavaScript callbacks for ajaxified importer installs.

Props afercia, swissspidy, ocean90.
See #24766.
Fixes #35191.

git-svn-id: https://develop.svn.wordpress.org/trunk@38075 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-17 15:31:29 +00:00
Dominik Schilling 94c2212de8 Update/Install: Give context to some install/update strings to allow for differentiation between theme and plugin translations.
Props swissspidy, SergeyBiryukov.
Fixes #37290.

git-svn-id: https://develop.svn.wordpress.org/trunk@38057 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 17:31:15 +00:00
Dominik Schilling a9d1e10161 Remove `svn:executable` property from Requests and some other files.
git-svn-id: https://develop.svn.wordpress.org/trunk@38049 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-13 14:38:21 +00:00
Andrew Ozz f11d5ef4d8 TinyMCE: update to 4.4.0, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt. Includes two bugfixes for #36434.
Fixes #37327.

git-svn-id: https://develop.svn.wordpress.org/trunk@38034 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 00:19:47 +00:00
Pascal Birchler 68cff6ac40 Plugins: Improve Ajax search of installed plugins.
Fixes a few accessibility issues, tweaks the design of the search form to match other Ajax search fields and improves compatibility with older browsers.

See #37230.

git-svn-id: https://develop.svn.wordpress.org/trunk@38033 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-11 21:49:30 +00:00
Andrew Ozz a985e346b1 TinyMCE: update to 4.3.13, changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #37225.

git-svn-id: https://develop.svn.wordpress.org/trunk@37910 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-29 13:20:17 +00:00
Konstantin Obenland 4dd1d9bef9 Update/Install: Shiny Updates v2.
Gone are the days of isolation and feelings of "meh", brought on by The Bleak Screen of Sadness. For a shiny knight has arrived to usher our plugins and themes along their arduous journey of installation, updates, and the inevitable fate of ultimate deletion.

Props swissspidy, adamsilverstein, mapk, afragen, ocean90, ryelle, j-falk, michael-arestad, melchoyce, DrewAPicture, AdamSoucie, ethitter, pento, dd32, kraftbj, Ipstenu, jorbin, afercia, stephdau, paulwilde, jipmoors, khag7, svovaf, jipmoors, obenland.
Fixes #22029, #25828, #31002, #31529, #31530, #31773, #33637, #35032.



git-svn-id: https://develop.svn.wordpress.org/trunk@37714 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-15 16:36:07 +00:00
Weston Ruter f26ccf6fac Customize: Update server-sent setting validation notifications as changes are entered.
Send back setting validities with full refreshes and selective refreshes so that invalid settings can have notifications displayed immediately before attempting save, and so that these notifications can be cleared as soon as the input is corrected.

* Splits out JS logic for listing controls into separate methods  `wp.customize.Setting.prototype.findControls()` and `wp.customize.findControlsForSettings()`.
* Adds a `setting` property to the `data` on notifications added to controls that are synced from their settings.
* Adds `selective-refresh-setting-validities` message sent from preview to pane.
* Changes `WP_Customize_Manager::validate_setting_values()` to return when settings are valid as well as invalid.
* Adds `WP_Customize_Manager::prepare_setting_validity_for_js()`.
* Add setting validities to data exported to JS in Customizer Preview and in selective refresh responses.

Fixes #36944.


git-svn-id: https://develop.svn.wordpress.org/trunk@37700 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-14 19:16:54 +00:00
Ella Iseulde Van Dorpe 644795a9dc TinyMCE: wptextpattern: fix for fast typing
Props jnylen0, iseulde.

Fixes #36585.



git-svn-id: https://develop.svn.wordpress.org/trunk@37668 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-09 19:06:25 +00:00
Weston Ruter c7ff79df64 Customize: Add setting validation model and control notifications to augment setting sanitization.
When a setting is invalid, not only will it be blocked from being saved but all other settings will be blocked as well. This ensures that Customizer saves aren't partial but are more transactional. User will be displayed the error in a notification so that they can fix and re-attempt saving.

PHP changes:

* Introduces `WP_Customize_Setting::validate()`, `WP_Customize_Setting::$validate_callback`, and the `customize_validate_{$setting_id}` filter.
* Introduces `WP_Customize_Manager::validate_setting_values()` to do validation (and sanitization) for the setting values supplied, returning a list of `WP_Error` instances for invalid settings.
* Attempting to save settings that are invalid will result in the save being blocked entirely, with the errors being sent in the `customize_save_response`. Modifies `WP_Customize_Manager::save()` to check all settings for validity issues prior to calling their `save` methods.
* Introduces `WP_Customize_Setting::json()` for parity with the other Customizer classes. This includes exporting of the `type`.
* Modifies `WP_Customize_Manager::post_value()` to apply `validate` after `sanitize`, and if validation fails, to return the `$default`.
* Introduces `customize_save_validation_before` action which fires right before the validation checks are made prior to saving.

JS changes:

* Introduces `wp.customize.Notification` in JS which to represent `WP_Error` instances returned from the server when setting validation fails.
* Introduces `wp.customize.Setting.prototype.notifications`.
* Introduces `wp.customize.Control.prototype.notifications`, which are synced with a control's settings' notifications.
* Introduces `wp.customize.Control.prototype.renderNotifications()` to re-render a control's notifications in its notification area. This is called automatically when the notifications collection changes.
* Introduces `wp.customize.settingConstructor`, allowing custom setting types to be used in the same way that custom controls, panels, and sections can be made.
* Injects a notification area into existing controls which is populated in response to the control's `notifications` collection changing. A custom control can customize the placement of the notification area by overriding the new `getNotificationsContainerElement` method.
* When a save fails due to setting invalidity, the invalidity errors will be added to the settings to then populate in the controls' notification areas, and the first such invalid control will be focused.

Props westonruter, celloexpressions, mrahmadawais.
See #35210.
See #30937.
Fixes #34893.


git-svn-id: https://develop.svn.wordpress.org/trunk@37476 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-20 21:09:40 +00:00
Ella Iseulde Van Dorpe 859d40bd24 Editor: wptextpattern: add back inline tests
See [37024].
See #33300.


git-svn-id: https://develop.svn.wordpress.org/trunk@37080 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-25 13:30:10 +00:00
Sergey Biryukov 57646fb7ba TinyMCE: Adjust textpattern tests for the changes in [37023].
See #33300.

git-svn-id: https://develop.svn.wordpress.org/trunk@37024 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-17 00:46:26 +00:00
Andrew Ozz 22e01b6274 TinyMCE: update to 4.3.8, changelog: https://www.tinymce.com/docs/changelog/#version438-march152016.
Fixes #36254.

git-svn-id: https://develop.svn.wordpress.org/trunk@37000 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-15 21:37:22 +00:00
Andrew Ozz b4db71a2f8 TinyMCE: update to 4.3.6. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #36035.

git-svn-id: https://develop.svn.wordpress.org/trunk@36798 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-01 23:12:43 +00:00
Ella Iseulde Van Dorpe 37fda5a8b9 TinyMCE: textpattern: clean up
* Use editor.once instead of storing into variables.
* Add pattern for hr.

See #33300.


git-svn-id: https://develop.svn.wordpress.org/trunk@36719 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-26 00:51:01 +00:00
Weston Ruter d80ef26b48 Customize: Allow controls to be registered without any associated settings.
* Improves parity between partials and controls. A partial or control can be settingless if instantiated with `settings` param as empty array (otherwise, if null, then the partial/control ID is used). 
* Eliminate need to create dummy settings that serve no purpose except to place a control in the UI.
* Removes dummy settings for `create_new_menu` and `new_menu_name`.
* Introduces `WP_Customize_Control::$capability` and `WP_Customize_Partial::$capability`, and if set checks them in the respective `check_capabilities()` methods.
* Prevents PHP fatal error from happening when non-existing settings are provided to control: "Call to a member function `check_capabilities()` on a non-object".
* Fixes issue where nav menu items and widgets were no longer working with selective refresh because cap check was failing.

See #27355.
Fixes #35926.


git-svn-id: https://develop.svn.wordpress.org/trunk@36689 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 18:27:45 +00:00
Ella Iseulde Van Dorpe 7040b4d932 TinyMCE: inline text patterns
First run.

See #33300.


git-svn-id: https://develop.svn.wordpress.org/trunk@36627 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 08:32:34 +00:00
Andrew Ozz 218c1240b8 TinyMCE: update to 4.3.4. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #35876.

git-svn-id: https://develop.svn.wordpress.org/trunk@36589 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-19 19:18:59 +00:00
Weston Ruter 03360d143d Customize: Add selective refresh framework with implementation for widgets and re-implementation for nav menus.
See https://make.wordpress.org/core/2016/02/16/selective-refresh-in-the-customizer/.

Props westonruter, valendesigns, DrewAPicture, ocean90.
Fixes #27355.


git-svn-id: https://develop.svn.wordpress.org/trunk@36586 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-19 18:40:06 +00:00
Dominik Schilling (ocean90) 9f5eb3c604 Add missing test changes for [36573].
See #34755.

git-svn-id: https://develop.svn.wordpress.org/trunk@36574 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 17:43:56 +00:00
Weston Ruter 6dd1dd61a1 Customize: Add a user-friendly way to preview site responsiveness for desktop, tablet, and mobile.
Introduces `WP_Customize_Manager::get_previewable_devices()` with a `customize_previewable_devices` filter to change the default device and which devices are available for previewing. This is a feature that was first pioneered on WordPress.com.

Props celloexpressions, folletto, valendesigns, westonruter, welcher, adamsilverstein, michaelarestad, Fab1en.
Fixes #31195.


git-svn-id: https://develop.svn.wordpress.org/trunk@36532 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 01:56:13 +00:00
Andrew Ozz 1d82f671a3 TinyMCE: update to 4.3.3. Update the QUnit tests and revert back to testing the non-minified files in /src.
Fixes #35539.

git-svn-id: https://develop.svn.wordpress.org/trunk@36352 602fd350-edb4-49c9-b593-d223f7449a82
2016-01-20 04:17:22 +00:00
Andrew Ozz 71d22131e6 TinyMCE: update to 4.2.7. Changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=view&pr_id=1&vr_id=888
Fixes #34620.

git-svn-id: https://develop.svn.wordpress.org/trunk@35574 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-08 02:31:31 +00:00
Andrew Ozz 73d755b67a TinyMCE: update to 4.2.6. Changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=view&pr_id=1&vr_id=887.
Fixes #34331.

git-svn-id: https://develop.svn.wordpress.org/trunk@35306 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 22:05:31 +00:00
Weston Ruter 370057b5d7 Customizer: Always show Widgets panel initially if sidebars are registered; show notice to users in panel if no widget areas are in current preview.
Widgets panel will not wait to display until the preview loads.

Also fixes problems with `margin-top` in panels where other panels' `active` states change, as well as ensuring sections of deactivated panel collapse before panel is hidden to prevent the pane from becoming empty of controls.

Fixes #33052.
Fixes #33567.


git-svn-id: https://develop.svn.wordpress.org/trunk@35231 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 23:47:56 +00:00
Weston Ruter 78b73c8906 Customizer: Defer embedding widget controls to improve DOM performance and initial load time.
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.

Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.

Fixes #33901.


git-svn-id: https://develop.svn.wordpress.org/trunk@34563 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 21:01:46 +00:00
Andrew Ozz cc18f258cb TinyMCE: update to 4.2.5, changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=index&pr_id=1.
Fixes #33782 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@33981 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-09 19:44:09 +00:00
Ella Iseulde Van Dorpe aaf15cdde8 TinyMCE: wptextpattern: trim whitespace
Props iseulde and azaozz.
Fixes #33246.


git-svn-id: https://develop.svn.wordpress.org/trunk@33563 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-03 22:06:25 +00:00
Ella Iseulde Van Dorpe e30bd2f439 JSHint for [33528]: remove logging
See #32688.


git-svn-id: https://develop.svn.wordpress.org/trunk@33562 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-03 21:57:04 +00:00
Weston Ruter 7857be9cf0 Customizer: Add QUnit tests for menus.
Props adamsilverstein, westonruter, jorbin.
Fixes #32688.


git-svn-id: https://develop.svn.wordpress.org/trunk@33528 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-03 19:27:27 +00:00
Ella Iseulde Van Dorpe 34354fc3c0 TinyMCE: wptextpattern: headings on enter
Fixes #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@33452 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 23:15:15 +00:00
Aaron Jorbin b5f505d3dd Add Initial JS Unit Tests for Menu Customizer
While these two tests will help ensure we don't repeat our mistakes, they mostly help lay the foundation for more tests that still need to be written.

See #32688
Props adamsilverstein, jorbin



git-svn-id: https://develop.svn.wordpress.org/trunk@33451 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 22:07:27 +00:00
Ella Iseulde Van Dorpe aed9a8c5bc Editor: word count: better names for types.
Also fix it in wp_trim_words().

Fixes #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33440 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 11:18:55 +00:00
Andrew Ozz eee2fa493b TinyMCE: update to 4.2.2. Changelog: https://github.com/tinymce/tinymce/blob/master/changelog.txt.
Fixes #33033, #33042. See #33083.

git-svn-id: https://develop.svn.wordpress.org/trunk@33369 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-22 21:11:44 +00:00
Ella Iseulde Van Dorpe e2fab60c51 Editor: word count: exclude HTML comments and entities
Also make sure `type` is one of the three allowed types and remove unnecessary regex flags.

See #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33344 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-21 15:23:45 +00:00
Ella Iseulde Van Dorpe 16e22cd0aa Editor: word count: count astrals as one character
This makes sure an emoji, for example, is counted as one character.

See #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33320 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-18 11:41:25 +00:00
Ella Iseulde Van Dorpe c2c5c5ac27 Editor: word count: exclude shortcodes
Props desaiuditd, adamsilverstein, azaozz and iseulde.
Fixes #27386. See #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33299 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 21:08:05 +00:00
Ella Iseulde Van Dorpe 129a3affe5 Editor: word count: exclude more characters
Also only exclude these characters for the `words` type. They should be counted for other types.
Add the ASCIIOnly option to the uglify config to preserve escaped unicode characters.

See #30966. Fixes #27391.



git-svn-id: https://develop.svn.wordpress.org/trunk@33292 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-16 09:44:43 +00:00
iseulde e1242b6979 Editor: word count: add `all` type
This type will count all characters including spaces.

See #30966.


git-svn-id: https://develop.svn.wordpress.org/trunk@33290 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-15 23:47:02 +00:00
Weston Ruter bde076cbfb Customizer: Prevent preview from loading during QUnit tests and causing an XHR cross-domain error.
Fixes #32666.


git-svn-id: https://develop.svn.wordpress.org/trunk@33120 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-08 05:37:37 +00:00
Andrew Ozz 58f914004d TinyMCE: update to 4.2.1. Changelog: https://github.com/tinymce/tinymce-dist/blob/master/changelog.txt.
Fixes #32801.

git-svn-id: https://develop.svn.wordpress.org/trunk@33013 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-01 00:51:22 +00:00
Ella Iseulde Van Dorpe fa5ec5077b Editor: restructure word count
* The WordCounter should only do one thing: count words. This makes it also easier to test.
* Add some really basic unit tests.
* Instead of only refreshing the count on enter and delete, refresh the count when the user stops typing. Also look at paste and content changes in TinyMCE.
* Use `match` instead of `replace` when it is appropriate.
* More readable code.

See #30966. Fixes #26620.



git-svn-id: https://develop.svn.wordpress.org/trunk@32856 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-19 10:34:59 +00:00
Ella Iseulde Van Dorpe fa1a214eb6 TinyMCE: wptextpattern: fix issue that removes content
* If the resulting text node is empty, don't remove all the content from the paragraph.
* If there's an empty text node at the start of the paragraph, ignore it and consider the next node to be the start.

See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32832 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-18 11:33:11 +00:00
Ella Iseulde Van Dorpe 11de1cedaa TinyMCE: wptextpattern: make tests ~2x faster
* Reuse the same instance for all tests in the module.
* Run without CSS (skin).
* Less typing.

See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32706 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 22:15:47 +00:00
Ella Iseulde Van Dorpe 63183254c9 Customizer: hide controls on test page
Introduced in [30919].
See #32577 and #30701.


git-svn-id: https://develop.svn.wordpress.org/trunk@32701 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-07 09:03:03 +00:00
Ella Iseulde Van Dorpe b866b19a20 TinyMCE: wptextpattern: disable for IE 8 and lower
Props azaozz, iseulde.
See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32700 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 22:37:13 +00:00
Ella Iseulde Van Dorpe 5bac5f7ccd TinyMCE: add wptextpattern plugin
This plugin can automatically format text patterns as you type. It includes two patterns: unordered (`* ` and `- `) and ordered list (`1. ` and `1) `). If the transformation in unwanted, the user can undo the change by pressing backspace, using the undo shortcut, or the undo button in the toolbar.

This is the first TinyMCE plugin that has unit tests and there's some good groundwork for adding tests to existing plugins in the future.

First run. See #31441.


git-svn-id: https://develop.svn.wordpress.org/trunk@32699 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-06 20:07:00 +00:00
Dominik Schilling (ocean90) 5ae2271098 Customizer: Improve JS templates for Panels and Sections added in [32658].
* Always fall back to using the default template if no custom template exists.
* Provide a set of default params when constructing new `Section` and `Panel` objects.

Includes QUnit tests.

Props celloexpressions, westonruter, ocean90.
Fixes #30737.

git-svn-id: https://develop.svn.wordpress.org/trunk@32681 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-01 22:46:56 +00:00
Weston Ruter cc19680774 Add JS templates for Customizer Panels and Sections.
This extends the approach taken for Customizer Controls in #29572.

Props celloexpressions, westonruter, ocean90.
See #30737.


git-svn-id: https://develop.svn.wordpress.org/trunk@32658 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-30 00:02:13 +00:00
Aaron Jorbin d0567838e4 Update QUnit to v1.18.0
See https://github.com/jquery/qunit/blob/1.18.0/History.md for changes from 1.12.0 to now.  Mostly bug fixes and internal changes in preparation for QUnit v2.

See #30824



git-svn-id: https://develop.svn.wordpress.org/trunk@32343 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-04 19:43:38 +00:00