Commit Graph

33494 Commits

Author SHA1 Message Date
Andrea Fercia 29e2274793 Accessibility: Fix displaying of Universal time and Local time info on the General Settings screen.
In [36263] they were mistakenly moved within a conditional check.

Fixes #35064.

git-svn-id: https://develop.svn.wordpress.org/trunk@36585 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-19 16:08:51 +00:00
Andrea Fercia e4e9e19f4a Accessibility: after [36000] conditionally print out the `aria-describedby` attribute on the Featured Image postbox.
Fixes #35076.

git-svn-id: https://develop.svn.wordpress.org/trunk@36584 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-19 15:09:51 +00:00
Weston Ruter 73f2866194 Customize: Prevent consecutive `refresh` requests from preview from causing JS error.
Fixes "Uncaught TypeError: this.targetWindow is not a function".

See #27355.
Fixes #35866.


git-svn-id: https://develop.svn.wordpress.org/trunk@36583 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-19 03:46:59 +00:00
Andrea Fercia bd6fc729e9 Accessibility: Reduce the WordPress shades of grey, Episode 2.
See #35783.

git-svn-id: https://develop.svn.wordpress.org/trunk@36582 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 22:29:29 +00:00
Andrea Fercia 985e22828e Plugins: Remove an unused variable after [35953].
Fixes #35050.

git-svn-id: https://develop.svn.wordpress.org/trunk@36581 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 21:32:37 +00:00
Dominik Schilling (ocean90) 57ebfc9b94 Themes: After [36546] restore theme search functionality.
* Correct several incorrect uses of `_.union`. Since Underscore 1.7.0 `_.union` supports only arrays and not variadic args.
* Use a namespaced event `themes:update`. Backbone 1.2 added a built in `update` event that triggers after any amount of models are added or removed from a collection.

Props adamsilverstein.
See #34350.

git-svn-id: https://develop.svn.wordpress.org/trunk@36580 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 21:20:33 +00:00
Dominik Schilling (ocean90) e636f79308 Themes: Fix flickering of the theme screenshot on hover in WebKit browsers.
Props JoeFusco.
Fixes #35787.

git-svn-id: https://develop.svn.wordpress.org/trunk@36579 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 21:10:17 +00:00
Dominik Schilling (ocean90) 2d7150e40d Formatting: Avoid a PHP warning when `wptexturize()` is called with a trailing less-than symbol.
Props westonruter.
Fixes #35864.

git-svn-id: https://develop.svn.wordpress.org/trunk@36578 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 20:30:54 +00:00
Drew Jaynes 1663c24df4 Docs: Add an explanation for the dynamic portion of the `{$taxonomy}_term_edit_form_top` hook, introduced in [36526].
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36577 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 18:19:00 +00:00
DrewAPicture 305e314259 Docs: Add formatting to a changelog entry in the hook doc for the `rest_dispatch_request` filter.
See [36534]. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36576 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 18:17:04 +00:00
Dominik Schilling (ocean90) e7a6236168 Media Library: After [36546] restore the "Add new" functionality.
Rework handling of the `'toggle:upload:attachment'` event using `.on` vs `.listenTo` for better compatibility with the current version of Backbone.

Props adamsilverstein.
See #34350.
Fixes #35853.

git-svn-id: https://develop.svn.wordpress.org/trunk@36575 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 17:49:21 +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
Dominik Schilling (ocean90) cc59bf5f3b Customizer: In nav menus show the location name instead of slug.
Props ryankienstra.
Fixes #34755.

git-svn-id: https://develop.svn.wordpress.org/trunk@36573 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 17:15:28 +00:00
Jeremy Felt a16d97039b Remove extra spaces between function names and brackets
These were introduced when making list table view modes sticky.

See #16774, #34365.


git-svn-id: https://develop.svn.wordpress.org/trunk@36572 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 16:50:49 +00:00
Dominik Schilling (ocean90) c3c16e7c6e Don't display errors during Ajax requests.
See #34915 for REST and #23811 for XML-RPC.

Props pento.
Fixes #26262.

git-svn-id: https://develop.svn.wordpress.org/trunk@36571 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 16:42:48 +00:00
Dion Hulse d707453bbc HTTP API: Certificate bundle: Attempt to move a certificate lower in the file to allow older OpenSSL versions to parse it & communicate with WordPress.org securely again.
The OpenSSL version which was failing in this case was `OpenSSL 0.9.8e 23 Feb 2007`.

See #35637 #30434 #25007


git-svn-id: https://develop.svn.wordpress.org/trunk@36570 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 08:20:42 +00:00
Andrew Ozz bb49a958d2 Replace `wp_upload_dir()` with the new `wp_get_upload_dir()` in all cases where a file is not being uploaded. Deprecate `_wp_upload_dir_baseurl()`, and replace it with `wp_get_upload_dir()`.
See #34359.

git-svn-id: https://develop.svn.wordpress.org/trunk@36569 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 00:23:04 +00:00
Drew Jaynes e2dd03abd4 Docs: Remove a duplicate `@static` tag from the `WP_Customize_Panel->instance_count` property DocBlock.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36568 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-18 00:13:21 +00:00
Boone Gorges 0e9ff07da5 Reintroduce term meta unit test accidentally removed in [36566].
git-svn-id: https://develop.svn.wordpress.org/trunk@36567 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 23:01:05 +00:00
Boone Gorges 28fad09b61 More performance improvements to metadata lazyloading.
Comment and term meta lazyloading for `WP_Query` loops, introduced in 4.4,
depended on filter callback methods belonging to `WP_Query` objects. This meant
storing `WP_Query` objects in the `$wp_filter` global (via `add_filter()`),
requiring that PHP retain the objects in memory, even when the local variables
would typically be expunged during normal garbage collection. In cases where a
large number of `WP_Query` objects were instantiated on a single pageload,
and/or where the contents of the `WP_Query` objects were quite large, serious
performance issues could result.

We skirt this problem by moving metadata lazyloading out of `WP_Query`. The
new `WP_Metadata_Lazyloader` class acts as a lazyload queue. Query instances
register items whose metadata should be lazyloaded - such as post terms, or
comments - and a `WP_Metadata_Lazyloader` method will intercept comment and
term meta requests to perform the cache priming. Since `WP_Metadata_Lazyloader`
instances are far smaller than `WP_Query` (containing only object IDs), and
clean up after themselves far better than the previous `WP_Query` methods (bp
only running their callbacks a single time for a given set of queued objects),
the resource use is decreased dramatically.

See [36525] for an earlier step in this direction.

Props lpawlik, stevegrunwell, boonebgorges.
Fixes #35816.

git-svn-id: https://develop.svn.wordpress.org/trunk@36566 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 22:57:33 +00:00
Andrew Ozz c7936b8785 Improve the performance of `wp_upload_dir()`:
- Cache the output in non-persistent cache.
- Cache the result from `wp_mkdir_p()` in persistent cache (when present).
- Introduce `wp_get_upload_dir()` for use when not uploading files. It is equivalent to `wp_upload_dir()` but does not check for the existence or create the upload directory.
- Change tests to use the non-cached `_wp_upload_dir()`. They change options on the fly (should never be used in production) to simulate different environments.
- Introduce `_upload_dir_no_subdir()` and `_upload_dir_https()` to facilitate testing. These use the proper `upload_dir` filter to simulate different environments.

Props kovshenin, azaozz.
See #34359.

git-svn-id: https://develop.svn.wordpress.org/trunk@36565 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 22:51:01 +00:00
Boone Gorges 1afe1da216 Add changelog entry for `publicly_queryable` argument in `register_taxonomy()`.
Missed in [36525].

Fixes #34491.

git-svn-id: https://develop.svn.wordpress.org/trunk@36564 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 22:03:50 +00:00
Dominik Schilling (ocean90) bc95fd2884 Tests: Add test for `wp_get_installed_translations()`.
Introduces language files in /tests/phpunit/data/language. Each file includes the header and 5 translations.

Props realloc for initial patch.
Fixes #35284.

git-svn-id: https://develop.svn.wordpress.org/trunk@36563 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 22:01:11 +00:00
Jeremy Felt fafbd9fafd Multisite: Make view mode sticky for network users and sites list tables.
Fixes #34365.


git-svn-id: https://develop.svn.wordpress.org/trunk@36562 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 21:59:51 +00:00
Jeremy Felt e198e92dff Multisite: Avoid a PHP Notice when saving a site address without a path.
Props kjbenk.
Fixes #35631.


git-svn-id: https://develop.svn.wordpress.org/trunk@36561 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 20:49:29 +00:00
Dominik Schilling (ocean90) 479596acda Plugins: Remove slashes from search terms and use `urldecode()` in non-URL contexts.
Fixes #35712.

git-svn-id: https://develop.svn.wordpress.org/trunk@36560 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 20:14:37 +00:00
Dominik Schilling (ocean90) 548a18059c Tests: Add a test for testing `wp_enqueue_script()` with an alias handle in the footer.
Props kovshenin.
See #35643.

git-svn-id: https://develop.svn.wordpress.org/trunk@36559 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 19:52:42 +00:00
Dominik Schilling (ocean90) 1d19617606 Updates: Prevent further actions if an update button is disabled.
Props adamsilverstein, afercia.
Fixes #35257.

git-svn-id: https://develop.svn.wordpress.org/trunk@36558 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 19:41:14 +00:00
Dominik Schilling (ocean90) 8445b1b48d Make `$wp_local_package` explicitly global in wp-settings.php.
Props danielbachhuber.
Fixes #34975.

git-svn-id: https://develop.svn.wordpress.org/trunk@36557 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 19:31:21 +00:00
Jeremy Felt c74db359c4 Multisite: Add a hook to the end of the network's Add New User form.
The `network_user_new_form` action can be used to extend the new user form.

Props ptahdunbar.
Fixes #15389.


git-svn-id: https://develop.svn.wordpress.org/trunk@36556 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 19:14:50 +00:00
Jeremy Felt 181f39d2e0 Multisite: Add a hook to the end of the Add Site form.
The `network_site_new_form` action can be used to extend the new site form.

Props igmoweb, ocean90.
Fixes #34739.


git-svn-id: https://develop.svn.wordpress.org/trunk@36555 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 19:02:17 +00:00
Dominik Schilling (ocean90) ab905e41b9 Credits: Remove unused strings.
Props Ankit K Gupta.
Fixes #34909.

git-svn-id: https://develop.svn.wordpress.org/trunk@36554 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 18:59:38 +00:00
Dominik Schilling (ocean90) d35f13a4e3 Install: Enhance the language of the "Success" message.
Props ckoerner.
Fixes #34897.

git-svn-id: https://develop.svn.wordpress.org/trunk@36553 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 18:57:09 +00:00
Dominik Schilling (ocean90) 653e0b0827 Tests: Add `Tests_dbDelta::assertTableHasPrimaryKey()`.
Also fix a typo in the name for the compound key.

Props charlestonsw.
Fixes #34877.

git-svn-id: https://develop.svn.wordpress.org/trunk@36552 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 18:54:27 +00:00
Andrew Ozz e1cab8a017 Styles:
- Restore loading order for wp-admin: open-sans, dashicons, etc.
- Remove couple of redundant dependencies.

See #35229.

git-svn-id: https://develop.svn.wordpress.org/trunk@36551 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 18:00:40 +00:00
Dominik Schilling (ocean90) 59747aa6b9 Script/Style Dependencies: Make sure that inline styles for handles without a source are printed.
This prevents breaking plugins which are adding inline styles to the `wp-admin` handle after [36341].

Props dd32, ocean90.
Fixes #35229.

git-svn-id: https://develop.svn.wordpress.org/trunk@36550 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 17:10:53 +00:00
Dominik Schilling (ocean90) 149686b424 Tests: Indent `test_wp_register_script()` with tabs.
git-svn-id: https://develop.svn.wordpress.org/trunk@36549 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 16:07:01 +00:00
Dominik Schilling (ocean90) 3921eb53ea Autoprefixer for [36532].
See #31195.

git-svn-id: https://develop.svn.wordpress.org/trunk@36548 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 15:38:04 +00:00
Dominik Schilling (ocean90) de9d091e76 Tests: Indent `test_wp_register_style()` with tabs.
git-svn-id: https://develop.svn.wordpress.org/trunk@36547 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 15:36:20 +00:00
Dominik Schilling (ocean90) 1750b09775 Update Backbone and Underscore to the latest versions.
Backbone, from 1.1.2 to 1.2.3. Underscore, from 1.6.0 to 1.8.3.

The new versions of Backbone and Underscore offer numerous small bug fixes and some optimizations and other improvements. Check the [http://backbonejs.org/#changelog Backbone changelog] and [http://underscorejs.org/#changelog Underscore changelog] for the full details. 

The new versions include some significant changes that may break existing code. Plugins or themes that rely on the bundled Backbone and/or Underscore libraries should carefully check functionality with the latest versions and run any available unit tests to ensure compatibility.

Some changes of note that were addressed in core as part of this upgrade:

* `_.flatten` no longer works with objects since Underscore.js 1.7. `_.flatten()` working with objects was an unintended side-affect of the implementation, see [https://github.com/jashkenas/underscore/issues/1904#issuecomment-60241576 underscore#1904]. Check any `_flatten` usage and only flatten arrays.
* As of Backbone 1.2.0, you can no longer modify the `events` hash or your view's `el` property in `initialize`, so don't try to modify them there. 
* Since Underscore 1.7, Underscore templates no longer accept an initial data object. `_.template` always returns a function now so make sure you use it that way.

Props adamsilverstein.
Fixes #34350.

git-svn-id: https://develop.svn.wordpress.org/trunk@36546 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 15:21:09 +00:00
Dominik Schilling (ocean90) f9f0015a90 Setup: Improve wording on the page for the database connection details.
See #26879.

git-svn-id: https://develop.svn.wordpress.org/trunk@36545 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 15:02:03 +00:00
Dominik Schilling (ocean90) 14aa03e37c Setup: Use "Username" instead of "User Name".
Props thisisit.
Fixes #35850.

git-svn-id: https://develop.svn.wordpress.org/trunk@36544 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 14:59:34 +00:00
Andrew Ozz 13a9d1a7e6 Do not strip slashes from the whole &_POST when doing autosaves.
Props joehoyle.
Fixes #35408.

git-svn-id: https://develop.svn.wordpress.org/trunk@36543 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-17 00:09:42 +00:00
Andrew Ozz d3a848c773 Comments: look for wp_error when checking whether `$wpdb->get_col_length()` has failed.
See #10377.

git-svn-id: https://develop.svn.wordpress.org/trunk@36542 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 23:49:43 +00:00
Dominik Schilling (ocean90) a440256da0 Introduce a `$parent_class` parameter for `_deprecated_constructor()`.
Use the parameter for the deprecated constructor warning in `WP_Widget` to provide an indication to which widget is using the PHP4 style constructor.

Props sebastian.pisula.
Fixes #33440.

git-svn-id: https://develop.svn.wordpress.org/trunk@36541 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 23:19:38 +00:00
Dominik Schilling (ocean90) c80ed70337 In `wp_title()` fix a 7 year old typo.
Props joelerr.
Fixes #34879.

git-svn-id: https://develop.svn.wordpress.org/trunk@36540 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 22:27:05 +00:00
Dominik Schilling (ocean90) 8535f40cf8 Themes: Use the attachment ID as the key in `get_uploaded_header_images()`.
Prevents missing header images when an image has the same name as another header image.

Props sirbrillig.
Fixes #31786.

git-svn-id: https://develop.svn.wordpress.org/trunk@36539 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 22:11:14 +00:00
Dominik Schilling (ocean90) 35579fa786 i18n: Prevent `is_textdomain_loaded()` from returning true even if there are no translations for the domain.
In `get_translations_for_domain()` don't fill the global `$l10n` with `NOOP_Translations` instances, return a `NOOP_Translations` instance instead.

Props nacin, jrf.
Fixes #21319.

git-svn-id: https://develop.svn.wordpress.org/trunk@36538 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 21:14:45 +00:00
Andrea Fercia 3e7f4fba19 Accessibility: Reduce the WordPress shades of grey, first part.
See #35783.

git-svn-id: https://develop.svn.wordpress.org/trunk@36537 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 16:08:19 +00:00
rmccue 5a945adeed REST API: Apply rest_post_dispatch to embedded responses.
Fixes #35628.
Props @danielbachhuber.


git-svn-id: https://develop.svn.wordpress.org/trunk@36536 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-16 06:05:02 +00:00