Commit Graph

32284 Commits

Author SHA1 Message Date
Drew Jaynes
2585c20b35 Docs: Adjust third-person singular verbs in DocBlock summaries for oEmbed functions introduced in [34903].
See #34227.


git-svn-id: https://develop.svn.wordpress.org/trunk@34970 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:49:27 +00:00
Drew Jaynes
c959cb8b9b Embeds: Fix syntax on instantiating a new WP_oEmbed_Controller instance and cross-reference in the DocBlock for wp_oembed_parse_query().
See #34227.


git-svn-id: https://develop.svn.wordpress.org/trunk@34969 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:39:52 +00:00
Drew Jaynes
bceea32c67 Docs: Adjust the summary for the oembed_discovery_links hook doc to mention that the filter is for HTML output.
See #34227.


git-svn-id: https://develop.svn.wordpress.org/trunk@34968 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:38:10 +00:00
Drew Jaynes
43431fd8b3 Docs: Clarify the file header summary for wp-includes/embed-functions.php, and add missing parameter information for wp_oembed_parse_query(), introduced in [34903].
See #34227.


git-svn-id: https://develop.svn.wordpress.org/trunk@34967 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:37:03 +00:00
Drew Jaynes
39ff95f883 Embeds: If we're adding a boatload of new items to default-filters.php, might as well make them readable.
See #32522.


git-svn-id: https://develop.svn.wordpress.org/trunk@34966 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:30:51 +00:00
John Blackbourn
bc043c51e8 Introduce the ability to filter the Users admin listing screen by users with no role, if such users exist.
Fixes #22993
Props spmlucas, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34965 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:06:46 +00:00
Drew Jaynes
6fe7598cff Docs: Add a couple of strategically-placed spaces in WP_Rewrite.
Fixes #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34964 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 22:06:42 +00:00
John Blackbourn
b02c884370 On the Users list table, show all the roles of a user in a comma-separated list if they have more than one role. This prevents role obfuscation in situations where a user has had more than one role programmatically assigned to them.
Fixes #22959
Props scribu, JustinSainton, DrewAPicture, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34963 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:58:34 +00:00
Drew Jaynes
e05fb68289 Docs: Mark the optional parameters for WP_Rewrite::generate_rewrite_rules() as such, and improve overall formatting.
Also brings in the list of acceptable constants for the `$ep_mask` parameter.

See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34962 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:48:25 +00:00
Jeremy Felt
0b9a437317 Make $blog_id explicitly global.
`$blog_id` is used in both single and multisite configurations as a global variable, though has never been explicitly marked as such in the global scope. This can cause confusion depending on how core is loaded.

Fixes #34217.


git-svn-id: https://develop.svn.wordpress.org/trunk@34961 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:44:11 +00:00
Drew Jaynes
61c3b3121f Docs: Convert the description for the optional $args parameter in WP_Rewrite::add_permastruct() into a hash notation.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34960 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:34:56 +00:00
Boone Gorges
fa1e061dac WP_User_Query role improvement redux.
It's back, and it's better than ever: an overhaul of role-related arguments
in `WP_User_Query`. This updated version of the previously-reverted [34875]
includes support for the use of `$blog_id` without specifying a `$role`, for
a 99.7% reduced chance of breaking wordpress.org and other large sites.

Props boonebgorges, swissspidy.
Fixes #22212.

git-svn-id: https://develop.svn.wordpress.org/trunk@34959 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:27:04 +00:00
Drew Jaynes
bf12d6abfb Docs: Improve more formatting and syntax for inline comments in WP_Rewrite.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34958 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:23:31 +00:00
Drew Jaynes
694a56bc14 Docs: Add saner formatting and make readability improvements to a variety of inline comments in WP_Rewrite and WP_Rewrite::generate_rewrite_rules().
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34957 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:17:14 +00:00
Boone Gorges
3cc827ef5a Store SQL query string as a property on WP_User_Query.
In addition to better parity with other WP query classes, this also allows
testing of SQL strings, should anyone want to do something so foolish.

See #22212.

git-svn-id: https://develop.svn.wordpress.org/trunk@34956 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 21:05:50 +00:00
Sergey Biryukov
b69797e8e8 Docs: Fix typo in [34944].
See #34218.

git-svn-id: https://develop.svn.wordpress.org/trunk@34955 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 20:59:46 +00:00
Scott Taylor
26aeb0f9bc After [34953], unbreak WordPress.
See [34930], #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34954 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:28:14 +00:00
Scott Taylor
7a6f53d917 HTTP/REST API: move WP_HTTP_Response to wp-includes/ with the rest (ha!) of the HTTP classes. This is PHP 5.2, so this class is global, and as per @rmccue, unrelated to REST specifically.
See [34930], #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34953 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:26:44 +00:00
Drew Jaynes
e215ca23f4 Docs: Normalize documentation spacing in the DocBlocks for add_meta_box() and remove_meta_box() following [34951].
Fixes #15000.


git-svn-id: https://develop.svn.wordpress.org/trunk@34952 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:12:25 +00:00
Drew Jaynes
a6e9d49467 Administration: Add the ability to pass an array of screen IDs to add_meta_box() and remove_meta_box().
The `$screen` parameter in both functions can now accept a single screen ID, `WP_Screen` object, or an array of screen IDs.

Adds tests.

Props coffee2code, iamfriendly, madalinungureanu, mordauk, igmoweb, meloniq, DrewAPicture.
See #15000.


git-svn-id: https://develop.svn.wordpress.org/trunk@34951 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 19:06:32 +00:00
Konstantin Obenland
7e923cc0fe Template: Add fallback for empty containers.
Since [14031] the container can be omitted in `wp_nav_menu()`. It can not
however in `wp_page_menu()`, which creates a conflict if it is set as
the fallback, Let's make sure there is always a valid container tag.

Fixes #33974.



git-svn-id: https://develop.svn.wordpress.org/trunk@34950 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 18:26:13 +00:00
Sergey Biryukov
ab296be565 REST API: Add some missing documentation.
Props swissspidy.
Fixes #34215.

git-svn-id: https://develop.svn.wordpress.org/trunk@34949 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 18:00:45 +00:00
Helen Hou-Sandi
df1b726ed0 Buttons: Update styles and colors.
* Aligns with the color standards. See https://make.wordpress.org/design/handbook/foundations/colors/
* Creates a consistent interaction experience between states.
* Improves contrast and accessibility.

props hugobaeta, afercia, melchoyce, michael-arestad.
fixes #31459.


git-svn-id: https://develop.svn.wordpress.org/trunk@34948 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:30:57 +00:00
Boone Gorges
a1389117b2 Allow a null id to do a name lookup in wp_set_current_user().
Previously, the `name` fallback was failing in the case where the current user
was 0, due to a loose comparison between 0 (the current user) and `null` (the
value that is used to trigger the `name` fallback).

Props bobbingwide.
Fixes #20845.

git-svn-id: https://develop.svn.wordpress.org/trunk@34947 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:28:34 +00:00
John Blackbourn
17e2841eea Improve the parameter names and inline documentation for add_rewrite_rule(), WP_Rewrite::add_rule(), and WP_Rewrite::add_external_rule().
Fixes #34197


git-svn-id: https://develop.svn.wordpress.org/trunk@34946 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:27:05 +00:00
Boone Gorges
5c496e841a Add tests for current behavior of wp_set_current_user().
See #20845.

git-svn-id: https://develop.svn.wordpress.org/trunk@34945 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:19:00 +00:00
Drew Jaynes
4dc569f748 Docs: Fix third-person singular verbs in DocBlock summaries throughout WP_Rewrite.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34944 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:11:52 +00:00
Sergey Biryukov
017e097daf Add wp_load_translations_early() to wpdb::check_connection().
Fixes #29306. See #34216.

git-svn-id: https://develop.svn.wordpress.org/trunk@34943 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 17:10:58 +00:00
Sergey Biryukov
9a80bffdb3 Split database error messages into separate strings to remove unnecessary HTML tags from translations.
Add translator comments for placeholders.

Fixes #34216.

git-svn-id: https://develop.svn.wordpress.org/trunk@34942 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 16:51:50 +00:00
Drew Jaynes
ee6b1ae7c8 Docs: Relocate some more DocBlock-level @see tags and add some missing @access tags in WP_Rewrite.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34941 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 16:50:52 +00:00
Drew Jaynes
e0dd9fa33a Docs: Relocate some DocBlock-level @see tags in WP_Rewrite.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34940 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 16:48:04 +00:00
Drew Jaynes
ac7ef64dde Docs: Remove invalid inline @link tags from a variety of DocBlocks in WP_Rewrite.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34939 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 16:46:16 +00:00
Drew Jaynes
60a5a56f40 Docs: Add a file header to wp-includes/class-wp-rewrite.php.
See #34218.


git-svn-id: https://develop.svn.wordpress.org/trunk@34938 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 16:40:11 +00:00
Dominik Schilling (ocean90)
4b897ef9d4 Embeds: Update $wp_db_version to flush rewrite rules for [34903].
Fixes #34209.

git-svn-id: https://develop.svn.wordpress.org/trunk@34937 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 11:11:11 +00:00
Dominik Schilling (ocean90)
f771be9e2c Term Meta: Prevent a "Multiple primary key defined" error during database upgrades.
You must have two spaces between the words `PRIMARY KEY` and the definition of your primary key. Yes, seriously.

See [34529].
Fixes #34210.

git-svn-id: https://develop.svn.wordpress.org/trunk@34936 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 11:08:15 +00:00
Gary Pendergast
633a9870dd Posts: Add the pre_get_lastpostmodified filter to get_lastpostmodified().
This allows `get_lastpostmodified()` to be short circuited when the site wants to avoid running the occasionally slow queries in `_get_last_post_time()`.

Fixes #34205.



git-svn-id: https://develop.svn.wordpress.org/trunk@34935 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 05:56:57 +00:00
Boone Gorges
9c9cdf28ca Allow excluded keywords when searching posts.
Pass a keyword with a leading hyphen to exclude posts containing that keyword.
For example, 'taco -onions' will return posts that contain the word 'taco' but
do not contain the word 'onions'.

Props akibjorklund.
Fixes #33988.

git-svn-id: https://develop.svn.wordpress.org/trunk@34934 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 03:17:22 +00:00
John Blackbourn
ba7dc01639 Abstract the shortcode attribute parsing regex into its own function, update the JavaScript counterpart, and introduce a test to ensure they do not diverge again.
Fixes #34191
Props miqrogroove, johnbillion


git-svn-id: https://develop.svn.wordpress.org/trunk@34933 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 03:11:59 +00:00
John Blackbourn
9b156ee2a9 Correctly set the secure flag on the post password cookie based on the scheme of the referring URL, if it's available, instead of the home URL.
Fixes #29641


git-svn-id: https://develop.svn.wordpress.org/trunk@34932 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 03:08:05 +00:00
John Blackbourn
855991c578 Correctly set the secure flag for the test cookie based on the login URL scheme, and the same for the user settings cookies based on the admin URL scheme.
Fixes #34159


git-svn-id: https://develop.svn.wordpress.org/trunk@34931 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 03:04:41 +00:00
Ryan McCue
1e223ff16b REST API: Add missing reference to WP_HTTP_Response
See #33982


git-svn-id: https://develop.svn.wordpress.org/trunk@34930 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 02:39:06 +00:00
Ryan McCue
007e7b8cd4 REST API: Unbreak everything.
Obviously, it wouldn't have been a good commit unless I botched it.

See #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34929 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 02:33:51 +00:00
Ryan McCue
b39211475d REST API: Introduce baby API to the world.
Baby API was born at 2.8KLOC on October 8th at 2:30 UTC. API has lots
of growing to do, so wish it the best of luck.

Thanks to everyone who helped along the way:

Props rmccue, rachelbaker, danielbachhuber, joehoyle, drewapicture,
adamsilverstein, netweb, tlovett1, shelob9, kadamwhite, pento,
westonruter, nikv, tobych, redsweater, alecuf, pollyplummer, hurtige,
bpetty, oso96_2000, ericlewis, wonderboymusic, joshkadis, mordauk,
jdgrimes, johnbillion, jeremyfelt, thiago-negri, jdolan, pkevan,
iseulde, thenbrent, maxcutler, kwight, markoheijnen, phh, natewr,
jjeaton, shprink, mattheu, quasel, jmusal, codebykat, hubdotcom,
tapsboy, QWp6t, pushred, jaredcobb, justinsainton, japh, matrixik,
jorbin, frozzare, codfish, michael-arestad, kellbot, ironpaperweight,
simonlampen, alisspers, eliorivero, davidbhayes, JohnDittmar, dimadin,
traversal, cmmarslender, Toddses, kokarn, welcher, and ericpedia.

Fixes #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34928 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 02:30:18 +00:00
Ryan McCue
374b39d6ba REST API: Add wp_is_numeric_array helper function
The API uses this to do special operations on list responses (used
for collections), so we need to detect whether an array is
associative or numeric-indexed.

After much discussion, the bikeshed is to be painted green and gold.

See #33982.


git-svn-id: https://develop.svn.wordpress.org/trunk@34927 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 02:13:02 +00:00
Ryan McCue
0f657d21cc REST API: Add JsonSerializable compatibility to wp_json_encode
Following on from r34845, the JsonSerializable shim needs support
on the encoding side too. _wp_json_prepare_data handles this when
we've loaded the shim.

Props chriscct7.

See #33982. 


git-svn-id: https://develop.svn.wordpress.org/trunk@34926 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 01:29:50 +00:00
John Blackbourn
88779c7b67 Revert [34917] until the broken test is fixed.
See #13382


git-svn-id: https://develop.svn.wordpress.org/trunk@34925 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 01:03:39 +00:00
Dion Hulse
ebbe91ad8d Revert [34922] pending PHP 5.2 compatibility.
See #28633


git-svn-id: https://develop.svn.wordpress.org/trunk@34924 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 00:16:07 +00:00
Sergey Biryukov
6cc5757f10 Reset Password: Move the code for creating password reset key into a new function, get_password_reset_key(), and use it in retrieve_password().
Previously: [25231].

Props DH-Shredder.
Fixes #34180.

git-svn-id: https://develop.svn.wordpress.org/trunk@34923 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 00:10:41 +00:00
Dion Hulse
ffb7ae1389 Use PHP7's random_int() CSPRNG functionality in wp_rand() with a fallback to the random_compat library for PHP 5.x.
`random_compat` offers a set of compatible functions for older versions of PHP, filling in the gap by using other PHP extensions when available.
We still include our existing `wp_rand()` functionality as a fallback for when no proper CSPRNG exists on the system.

Props sarciszewski
See #28633


git-svn-id: https://develop.svn.wordpress.org/trunk@34922 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-08 00:01:26 +00:00
Sergey Biryukov
1fc41894d2 Customizer: Replace context for two strings added in [30306] with a translator comment.
Fixes #34203.

git-svn-id: https://develop.svn.wordpress.org/trunk@34921 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-07 23:53:35 +00:00