Commit Graph

34728 Commits

Author SHA1 Message Date
Andrew Ozz
afea5ef3a7 TinyMCE: preserve <script> and <style> tags inside the editor.
Uses image placeholders for the tags and makes then visible. That way the tags can also be deleted from inside the editor.

Props iseulde, azaozz.
Fixes #32923.

git-svn-id: https://develop.svn.wordpress.org/trunk@38039 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 22:08:28 +00:00
John Blackbourn
a501d6c8be Meta: Add a missing @since param for wp_object_type_exists().
See #35658


git-svn-id: https://develop.svn.wordpress.org/trunk@38038 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 13:20:55 +00:00
Dominik Schilling
7083cd200a Text Changes: Unify/merge two more permission error messages.
Props ramiy.
Fixes #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@38037 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:44:33 +00:00
Dominik Schilling
a27c61f7c2 Resource Hints: Remove schemes from dns-prefetch resource hint outputs.
"wordpress.org", "!http://wordpress.org", and "!https://wordpress.org" should all have the same DNS lookup.
Also, replace `\r\n` with `\n` and ensure that invalid URLs are skipped.

Props niallkennedy, peterwilsoncc.
Fixes #37240.

git-svn-id: https://develop.svn.wordpress.org/trunk@38036 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:31:58 +00:00
Dominik Schilling
e556fec595 Toolbar: Allow 0 as a value for the tabindex property of a menu item.
To enhance accessibility for items without a link you can now define `tabindex="0"`, which makes descendant dropdowns accessible.

Props joedolson, afercia, ocean90.
Fixes #32495.

git-svn-id: https://develop.svn.wordpress.org/trunk@38035 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-12 11:18:00 +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
Dominik Schilling
1991213da7 Multisite: Use hash_equals() when comparing hashes to mitigate timing attacks.
Fixes #37324.

git-svn-id: https://develop.svn.wordpress.org/trunk@38032 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:42:02 +00:00
Dominik Schilling
310d406274 Accessibility: Add aria-button-if-js class to links in the media list table that behave like buttons when JavaScript is on.
Props joedolson, afercia.
See #26504.
Fixes #36555.

git-svn-id: https://develop.svn.wordpress.org/trunk@38031 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 19:30:20 +00:00
Drew Jaynes
a745c3f168 Docs: The $labels property in WP_Post_Type is of type object as returned from get_post_type_labels(), not an array.
Props swissspidy.
See #36217.


git-svn-id: https://develop.svn.wordpress.org/trunk@38030 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 17:40:11 +00:00
Drew Jaynes
13ec34335a Docs: Standardize references to "meta box" or "meta boxes" as two distinct words throughout core documentation per the core spelling guide.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38029 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:55:21 +00:00
Drew Jaynes
5cf0ef170a Docs: Standardize capitalization of Ajax throughout core documentation per the core spelling guide.
Ajax, while considered an acronym for Asynchronous JavaScript and XML, is most commonly capitalized only in the first character.

Part props ocean90.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38028 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-10 00:50:21 +00:00
Drew Jaynes
8af1a9d56a Docs: Link the 4.6 changelog entry in the DocBlock for register_meta() to its corresponding dev note on make/core.
h/t ocean90.

See #35658. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38027 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 16:49:06 +00:00
Tammie
a68d3d1469 PHP 7 compatibility issues fixed in Twenty Thirteen and Twenty Fourteen
Props xknown
Fixes #37227
--This Line, and those below, will be ignored--

M    themes/twentyfourteen/functions.php
M    themes/twentythirteen/functions.php


git-svn-id: https://develop.svn.wordpress.org/trunk@38026 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 15:10:38 +00:00
Dominik Schilling
408ac29bfb Docs: Fix a typo in the DocBlock for themes_api(), themes_api, plugins_api(), and plugins_api.
See #32246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38025 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 14:38:33 +00:00
Drew Jaynes
ea78fbdcdb Docs: Fix minor formatting and syntax for wp-admin/* elements introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38024 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:59:16 +00:00
Drew Jaynes
c717040925 Docs: Cross-reference parent classes in DocBlocks for upgrader classes moved to their own files in 4.6
See #36618. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38023 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:44:23 +00:00
Drew Jaynes
871fadef86 Docs: Improve usefulness of DocBlocks for ajax-actions.php functions introduced in 4.6.
See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38022 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:22:57 +00:00
Drew Jaynes
16c18387ba Docs: Fix a typo in the hook doc description for the enable_loading_advanced_cache_dropin run-time filter.
See #34936. See #37318.


git-svn-id: https://develop.svn.wordpress.org/trunk@38021 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 13:16:43 +00:00
Dominik Schilling
73fc7915cd Taxonomy: Remove an unnecessary double assignment in WP_Term_Query::get_terms().
Props birgire.
Fixes #37254.

git-svn-id: https://develop.svn.wordpress.org/trunk@38020 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 11:48:13 +00:00
Pascal Birchler
d1db1f5e10 Upgrade/Install: Do not remove event handlers when trying to update a theme.
Previously, when clicking "Update now" the callbacks were erroneously removed. This prevented opening the filesystem credentials modal for a second time.

Fixes #37285.

git-svn-id: https://develop.svn.wordpress.org/trunk@38019 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-09 11:42:04 +00:00
Drew Jaynes
180559f064 Docs: Fix a typo in an inline hook reference in the DocBlock for comment_form().
Props ocean90.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@38018 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 23:55:54 +00:00
Dominik Schilling
78789beda9 Bootstrap: Make wp_is_ini_value_changeable() compatible with PHP 5.2.6 - 5.2.17.
There is a bug in PHP 5.2.6 - 5.2.17 (https://bugs.php.net/bug.php?id=44936, https://3v4l.org/IL0A2) which changes the access level of a setting to 63 after `ini_set()` was called.
To continue comparing the access value against `INI_ALL` and `INI_USER` use the bit operator `& 7`:

* `1 & 7 === 1` (INI_USER)
* `2 & 7 === 2` (INI_PERDIR)
* `4 & 7 === 4` (INI_SYSTEM)
* `7 & 7 === 7` (INI_ALL)
* `63 & 7 === 7` (INI_ALL)

See [38015].
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38017 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 18:35:22 +00:00
Dominik Schilling
a927a48b31 Unit tests: Don't change the memory_limit setting during tests.
40M isn't enough and can lead to an "out of memory" error. Change `test_wp_raise_memory_limit()` to test that `wp_raise_memory_limit()` doesn't *lower* the memory limit.

See [38015].
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38016 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 18:16:07 +00:00
Dominik Schilling
c68f1ec772 Bootstrap: Enhance core's memory limit handling.
* Don't lower memory limit if the current limit is greater than `WP_MAX_MEMORY_LIMIT`.
* Set `WP_MEMORY_LIMIT` and `WP_MAX_MEMORY_LIMIT` to current limit if the `memory_limit` setting can't be changed at runtime.
* Use `wp_convert_hr_to_bytes()` when parsing the value of the `memory_limit` setting because it can be a shorthand or an integer value.
* Introduce `wp_raise_memory_limit( $context )` to raise the PHP memory limit for memory intensive processes. This DRYs up some logic and includes the existing `admin_memory_limit` and `image_memory_limit` filters. The function can also be used for custom contexts, the `{$context}_memory_limit` filter allows to customize the limit.
* Introduce `wp_is_ini_value_changeable( $setting )` to determine whether a PHP ini value is changeable at runtime.
* Remove a `function_exists( 'memory_get_usage' )` check. Since PHP 5.2.1 support for memory limit is always enabled.

Related commits: [38011-38013]

Props jrf, A5hleyRich, swissspidy, ocean90.
Fixes #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38015 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 14:36:37 +00:00
Sergey Biryukov
ec1f83f770 Docs: Fix typo in a comment in Core_Upgrader::upgrade().
Props Zuige.
Fixes #37314.

git-svn-id: https://develop.svn.wordpress.org/trunk@38014 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 13:18:31 +00:00
Dominik Schilling
629c6e36b5 Bootstrap: Clean up wp_convert_hr_to_bytes().
* Don't return a value higher than `PHP_INT_MAX`.
* Add unit tests.

Props jrf.
See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38013 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 12:53:08 +00:00
Dominik Schilling
df78fb4ef3 Boostrap: Move wp_convert_hr_to_bytes() to wp-includes/load.php.
`wp_convert_hr_to_bytes()` was previously defined in wp-includes/media.php because it's only used by `wp_max_upload_size()` in the same file.
Moving this function to load.php allows us to improve core's memory limit handling.

See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38012 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 11:26:58 +00:00
Dominik Schilling
a64bf12b1b Constants: Move constants for data sizes before constants for memory limits.
This allows us to improve core's memory limit handling.

See #32075.

git-svn-id: https://develop.svn.wordpress.org/trunk@38011 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 11:18:19 +00:00
Peter Wilson
c611f9a514 Embeds: Include locale stylesheets after default styles.
Fire `locale_stylesheet` action after the `wp_print_styles` action in the embeds header to match the order in `wp_head`.

Props swissspidy.
Fixes #36839.


git-svn-id: https://develop.svn.wordpress.org/trunk@38010 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 06:06:36 +00:00
Rachel Baker
437d80e56c Revisions: Allow autosaves to be restored when revisions are disabled.
Fixes bug introduced in [23639] where autosaves are not restored if revisions are disabled.

Props adamsilverstein.
Fixes #36262.




git-svn-id: https://develop.svn.wordpress.org/trunk@38009 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-08 01:15:19 +00:00
Jeremy Felt
9f254e6fb2 Docs: Correct the description of the $network_id in WP_Site_Query.
Passing 0 for `network_id` results in a query across all networks.

See #35791.


git-svn-id: https://develop.svn.wordpress.org/trunk@38008 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 20:35:02 +00:00
Jeremy Felt
2b145d5066 Multisite: Correct logic used to display an Edit User link after adding a user.
Previously, if a user was added with the checkbox for no confirmation selected and an error was then encountered in `wpmu_activate_signup()`, a fatal error would trigger because `$new_user` was a `WP_Error` object rather than a user.

Fixes #37223.


git-svn-id: https://develop.svn.wordpress.org/trunk@38007 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 17:47:54 +00:00
Jeremy Felt
8a7d81b627 Multisite: Add a nonce to the "Cancel" URL when changing a site's admin email.
Props scottbasgaard.
Fixes #36954.


git-svn-id: https://develop.svn.wordpress.org/trunk@38006 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 17:12:54 +00:00
Boone Gorges
f41d3cff7d Tests: Ensure that test for invalid user ID actually uses an invalid user ID.
This prevents false positives when the ID column's incrementor has exceeded the
hardcoded invalid ID.

Fixes #37308.

git-svn-id: https://develop.svn.wordpress.org/trunk@38005 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 16:47:25 +00:00
Dominik Schilling
535f0e3090 Screen API: After [37972], ensure that $box['args'] is an array before trying to access __widget_basename.
This prevents a PHP fatal error on the Nav Menus screen where `$args` is an object.

Props elrae.
Fixes #35021.

git-svn-id: https://develop.svn.wordpress.org/trunk@38004 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 16:38:28 +00:00
Jeremy Felt
65a90ba496 Multisite: Don't store max_num_pages in WP_Network_Query query cache.
This value can be easily calculated with available data.

Props spacedmonkey.
Fixes #32504.


git-svn-id: https://develop.svn.wordpress.org/trunk@38003 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 15:51:58 +00:00
Jeremy Felt
188902ee09 Multisite: Don't store max_num_pages in WP_Site_Query query cache.
This value can be easily calculated with available data.

Props spacedmonkey.
Fixes #35791.


git-svn-id: https://develop.svn.wordpress.org/trunk@38002 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 15:31:45 +00:00
Boone Gorges
9d34db0590 Comments: Cache results of SELECT FOUND_ROWS() query.
When comment IDs are fetched from the cache rather than the database,
the subsequent `SELECT FOUND_ROWS()` query will not return the correct value.
To avoid unnecessary queries, we cache the results of the `found_comments`
query alongside the comment IDs.

Props spacedmonkey.
Fixes #37184.

git-svn-id: https://develop.svn.wordpress.org/trunk@38001 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 14:26:21 +00:00
Dominik Schilling
44da2a77b9 Text Changes: Unify a few more permission error messages which were missed in [37914].
Props ramiy.
Fixes #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37999 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 11:32:44 +00:00
Dominik Schilling
fb3b0a9f8b Import: Merge two similar strings.
Props ramiy.
See #34521.

git-svn-id: https://develop.svn.wordpress.org/trunk@37998 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 10:53:00 +00:00
Sergey Biryukov
eff1d5f58e Unit Tests: Add description for data_get_comments_number_text_declension().
See #13651.

git-svn-id: https://develop.svn.wordpress.org/trunk@37997 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 10:44:57 +00:00
Jeremy Felt
01bcc4d40b Meta: Don't pass an empty $meta_key to get_metadata().
This doesn't break anything, but also isn't necessary.

Props sc0ttkclark.
See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37996 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 00:17:38 +00:00
Jeremy Felt
4938acf349 Meta: Introduce an initial set of tests for register_meta().
Props sc0ttkclark, ericlewis.
See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37995 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-07 00:14:40 +00:00
pento
4b6b18d730 Docs: Fix an incorrect @since comment.
See #36495.


git-svn-id: https://develop.svn.wordpress.org/trunk@37994 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 23:48:01 +00:00
Dominik Schilling
a1d37564b2 Post WordPress 4.6 Beta 2 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@37993 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:38:54 +00:00
Dominik Schilling
cabbc22606 WordPress 4.6 Beta 2.
git-svn-id: https://develop.svn.wordpress.org/trunk@37992 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:24:58 +00:00
Helen Hou-Sandi
495ff0c633 Meta: Make registration error conditions return consistently.
In doing this, non-core object types are no longer forcibly blocked and are instead checked against `wp_object_type_exists()` which has a filterable return value. Still, filter that at your own risk.

props Faison for the initial patch.
see 35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37991 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:08:55 +00:00
Jeremy Felt
68b18c62f2 Meta: Ensure $object_subtype is available before use in register_meta().
Props sc0ttkclark.
See #35658.


git-svn-id: https://develop.svn.wordpress.org/trunk@37990 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 18:00:23 +00:00
Ryan McCue
194c8d0e33 HTTP API: Switch back to returning an array.
The array-compatibility object we started returning in r37428 unfortunately isn't enough like an array. In particular, `is_array()` checks fail, despite the object implementing ArrayAccess. Mea culpa.

This moves the WP_HTTP_Response object to a new http_response key in the array, and changes the value back to an actual array.

Fixes #37097.
See #33055.


git-svn-id: https://develop.svn.wordpress.org/trunk@37989 602fd350-edb4-49c9-b593-d223f7449a82
2016-07-06 17:50:44 +00:00