Commit Graph

33838 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90) 8b8312f822 Multisite: Switch to a usermeta key for email confirmation.
To prevent inconsistent data across sites in a network the new email address is now stored in usermeta. Adds visual feedback for the case when an update has failed.
All existing options will be removed on a database upgrade.

Props MikeHansenMe, kovshenin, jeremyfelt, ocean90.
Fixes #23358.

git-svn-id: https://develop.svn.wordpress.org/trunk@36679 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 15:33:14 +00:00
Ryan McCue b464a4ba3a REST API: Fix error in Request tests.
On the 21st of November, 2014, I committed tests for WP_REST_Request
to the API plugin. Although I didn't realise at the time, I was
causing my future self to go through hours of sufferring.

Unfortunately, I forgot to call parent::setUp() which would break
the tests in subtle ways in the future and would ruin the good part
of my day.

Let this be a warning to all of you who write future unit tests.

See f0396be17e
for the original commit.


git-svn-id: https://develop.svn.wordpress.org/trunk@36678 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 08:28:12 +00:00
Andrew Ozz fb89bad3e1 TinyMCE, inline link dialog:
- Remove the bottom half of the (old) modal and add autocomplete on the URL field.
- Disable the inline edit dialog in old IE (7, 8 and 9). Use only the modal there.
- Fix in IE10 and 11.
- Fix (most?) remaining edge cases.
- Fix focusing the inline dialog, the modal and the editor.

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36677 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 06:20:01 +00:00
Weston Ruter 407a2bd076 Customize: Introduce `customize_nav_menu_searched_items` filter for modifying results of nav menu item searches.
This new filter can be used in conjunction with the `customize_nav_menu_available_items` and `customize_nav_menu_available_item_types` filters.

Props TimothyBlynJacobs, westonruter.
Fixes #34947.


git-svn-id: https://develop.svn.wordpress.org/trunk@36676 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 05:56:40 +00:00
Weston Ruter fa4cd9d5e0 Customize: Fix nav menu item search after Backbone update.
Fixes regression introduced in [36546].

See #34350.


git-svn-id: https://develop.svn.wordpress.org/trunk@36675 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 05:37:04 +00:00
Ryan McCue c3c445c0c9 REST API: Use WP_REST_Request::from_url() when embedding.
See #35803.


git-svn-id: https://develop.svn.wordpress.org/trunk@36674 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 04:19:44 +00:00
Ryan McCue 92d2be6a3d REST API: Add WP_REST_Request::from_url()
Allows converting a REST URL into a Request object.

Props danielbachhuber.
Fixes #35803.


git-svn-id: https://develop.svn.wordpress.org/trunk@36673 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 04:00:12 +00:00
Aaron Jorbin 6165ea0b98 Add Additional filters to Press This
3 new filters that aim to improve the extensibility of Press This:
1) `press_this_save_post_content` - Applied right after the side_load_images in order to allow potential side loads of other types of media.
Example use case: side load non-image media, such as audio or video.

2) `press_this_useful_html_elements`
Allows filtering of currently hard coded array of HTML elements allowed in fetch_source_html step for special cases where additional HTML elements need to be kept.
Example use case: HTML5 elements, such as amp-img, that someone wants to pull in.

3) `press_this_suggested_content`
A filter for the content right before it's passed to the editor and presented to the user.
Example use case is when someone stored posts in a different, non-HTML format, such as Markdown, this is essential.

Fixes #34455.
Props cadeyrn, kraftbj



git-svn-id: https://develop.svn.wordpress.org/trunk@36672 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 03:55:21 +00:00
Aaron Jorbin 31e4c5c5d9 Make Custom Taxonomy Feeds Auto-discoverable
This helps improve the parity between custom taxonomies and built in taxonomies. It is one small step to #makeCustomTaxonomyFeedsGreatAgain.

Fixes #23677
Props mdgl, stevenkword



git-svn-id: https://develop.svn.wordpress.org/trunk@36671 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 02:35:23 +00:00
Sergey Biryukov 9c474ff900 I18N: Remove `<code>` tag from translatable string in `wp-admin/includes/class-wp-filesystem-ssh2.php`.
Props ramiy.
Fixes #35741.

git-svn-id: https://develop.svn.wordpress.org/trunk@36670 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 02:10:14 +00:00
Sergey Biryukov d85d32f3a0 I18N: Add translator comments and context to "New Site Created" email notification strings.
Props ramiy.
Fixes #35716.

git-svn-id: https://develop.svn.wordpress.org/trunk@36669 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 02:03:25 +00:00
Sergey Biryukov 140cf40194 I18N: Replace hardcoded URL in a translatable string with a placeholder in `wp-admin/upload.php`.
Props ramiy.
Fixes #35743.

git-svn-id: https://develop.svn.wordpress.org/trunk@36668 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:47:24 +00:00
Sergey Biryukov 3d100679e7 Widgets: Avoid a PHP notice in `is_dynamic_sidebar()` is a sidebar is registered but does not yet have an index in the `sidebars_widgets` option.
Props dlh.
Fixes #35928.

git-svn-id: https://develop.svn.wordpress.org/trunk@36667 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:36:21 +00:00
Sergey Biryukov 520170222b I18N: Remove `<code>` tag from translatable string in `wp-admin/theme-install.php`.
Props ramiy.
Fixes #35739.

git-svn-id: https://develop.svn.wordpress.org/trunk@36666 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:29:08 +00:00
Sergey Biryukov 33076b29d6 I18N: Remove `<code>` tags from translatable strings in `wp-admin/install.php`.
Props ramiy.
Fixes #35738.

git-svn-id: https://develop.svn.wordpress.org/trunk@36665 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:21:05 +00:00
Sergey Biryukov a476311429 I18N: Add missing periods to two strings in `wp-admin/network/sites.php`
Props ramiy.
Fixes #35720.

git-svn-id: https://develop.svn.wordpress.org/trunk@36664 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:08:35 +00:00
Sergey Biryukov 78391f6ebb I18N: Remove `<em>` tag from translatable string in `wp-admin/includes/class-wp-ms-sites-list-table.php`.
Props ramiy.
Fixes #35676.

git-svn-id: https://develop.svn.wordpress.org/trunk@36663 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:05:50 +00:00
Sergey Biryukov 32c15871bf I18N: Remove HTML tags from translatable strings in `wp-admin/plugins.php`.
Props ramiy.
Fixes #35679.

git-svn-id: https://develop.svn.wordpress.org/trunk@36662 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 01:01:28 +00:00
Sergey Biryukov 822bdab3af Comments: In `wp_xmlrpc_server::pingback_ping()`:
* Rename `$linea` to `$remote_source` for clarity. 
* Add `remote_source` to comment data, so it's available to `preprocess_comment` and `comment_post` filters.
* Pass the original (unfiltered) response source to the filters too (as `remote_source_original` in comment data).

Props dshanske for the original patch.
Fixes #34141.

git-svn-id: https://develop.svn.wordpress.org/trunk@36661 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 00:55:01 +00:00
Sergey Biryukov 1c00dc7150 Comments: Pass comment data to the `comment_post` filter.
Props dshanske.
See #34141.

git-svn-id: https://develop.svn.wordpress.org/trunk@36660 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 00:48:52 +00:00
Sergey Biryukov 45017abf02 Revisions: Clean up `_wp_post_revision_fields()`:
* Move the array processing to a new function, `_wp_post_revision_data()`.
* Make both functions accept a post array or a `WP_Post` object. 
* Always apply the `_wp_post_revision_fields` filter and pass the post data to it.

Fixes #13382.

git-svn-id: https://develop.svn.wordpress.org/trunk@36659 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 00:43:31 +00:00
Sergey Biryukov 50a4dd92ac I18N: Remove `<strong>` tags from translatable strings in `wp-admin/custom-header.php`.
Add translator comments.

Props ramiy.
Fixes #35675.

git-svn-id: https://develop.svn.wordpress.org/trunk@36658 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:42:59 +00:00
Sergey Biryukov 0d888f7a21 I18N: Remove `<a>` tags from translatable strings in `wp-admin/themes.php`.
Props ramiy.
Fixes #35745.

git-svn-id: https://develop.svn.wordpress.org/trunk@36657 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:38:28 +00:00
Sergey Biryukov 8cc3d71197 I18N: Remove `<a>` tag from translatable string in `wp-admin/options-general.php`.
Add translator comment.

Props ramiy.
Fixes #35673.

git-svn-id: https://develop.svn.wordpress.org/trunk@36656 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:27:47 +00:00
Sergey Biryukov e34ce471af I18N: Remove `<a>` tag from translatable string in `wp-admin/user-edit.php`.
Add translator comment.

Props ramiy.
Fixes #35672.

git-svn-id: https://develop.svn.wordpress.org/trunk@36655 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:26:44 +00:00
Dominik Schilling (ocean90) 960863e74c Schema: Add an index to `wp_users.user_email`.
Improves lookup of an email address on large user tables.

See #9568.
Fixes #33376.

git-svn-id: https://develop.svn.wordpress.org/trunk@36654 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:20:36 +00:00
Sergey Biryukov 2bf31d37d3 I18N: Remove `<strong>` tag from translatable string in `wp-admin/import.php`.
Add translator comment.

Props ramiy.
Fixes #35671.

git-svn-id: https://develop.svn.wordpress.org/trunk@36653 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 23:08:45 +00:00
Pascal Birchler 9fb4d30ada Posts: Introduce `get_post_types_by_support()`.
Similar to `get_post_types()`, this new function returns a list of post type names that support a specific feature.

Props wpsmith, barryceelen, swissspidy.
Fixes #34010.

git-svn-id: https://develop.svn.wordpress.org/trunk@36652 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 22:49:17 +00:00
Pascal Birchler 7fdb345958 Users: Introduce `_wp_get_current_user()` for improved backward compatibility.
This new helper function is used by the pluggable functions `wp_get_current_user()` and `get_currentuserinfo()`, which was previously being called by the former before [36311]. Without it, infinite loops could be caused when plugins implement these functions, as they are now called the other way around.

Fixes #19615.

git-svn-id: https://develop.svn.wordpress.org/trunk@36651 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 22:25:32 +00:00
Weston Ruter fd46fad1c8 Customize: Fix and extend broken ajax unit tests to account for partials being skipped from rendering.
Fixes regression introduced in [36643].

See #35914.


git-svn-id: https://develop.svn.wordpress.org/trunk@36650 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 21:45:51 +00:00
Dominik Schilling (ocean90) 3a836ea224 Styles: Clarify the allowed values for the `$media` parameter of `wp_register_style()`/`wp_enqueue_style()`.
Adds unit test.

Fixes #35921.

git-svn-id: https://develop.svn.wordpress.org/trunk@36649 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 20:40:43 +00:00
Pascal Birchler 3039740a3a Embeds: Only display an iframe when it was successfully loaded.
This prevents showing a blank iframe by first checking if a message was successfully received from it.

Fixes #35894.

git-svn-id: https://develop.svn.wordpress.org/trunk@36648 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 20:22:41 +00:00
Boone Gorges 245e40f384 Query: Search should match `post_excerpt` in addition to title and content.
When ordering search results, exact matches in the post excerpt are weighted
above those in post content, but below those in the post title.

Props swissspidy, sebastian.pisula.
FIxes #35762.

git-svn-id: https://develop.svn.wordpress.org/trunk@36647 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 20:13:22 +00:00
Boone Gorges 193196a552 Make `$taxonomy` parameter optional in `get_edit_term_link()`.
Props nicdford, sc0ttkclark.
Fixes #35922.

git-svn-id: https://develop.svn.wordpress.org/trunk@36646 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 20:06:25 +00:00
Weston Ruter 773151a9bf Docs: Use markdown instead of HTML for `code` formatting.
Fixes phpdoc usage in [36622], [36608], [35724], [35307].

See #35898.
See #35869.
See #34738.
See #33552.


git-svn-id: https://develop.svn.wordpress.org/trunk@36645 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 19:17:11 +00:00
Sergey Biryukov cab3a242f7 Docs: Correct `$number` type in `number_format_i18n()`.
Props salcode.
Fixes #35893.

git-svn-id: https://develop.svn.wordpress.org/trunk@36644 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 18:43:47 +00:00
Weston Ruter c9b47e9d92 Customize: Skip exporting partials to client and handling rendering requests if user can't modify associated settings.
Introduces `WP_Customize_Partial::check_capabilities()` for parity with `WP_Customize_Control::check_capabilities()`.
 
See #27355.
Fixes #35914.


git-svn-id: https://develop.svn.wordpress.org/trunk@36643 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 18:13:30 +00:00
Drew Jaynes 380e94f1ee Docs: Update the type for `$callback` parameters to `callable` in DocBlocks for `add_settings_section()` and `add_settings_field()`.
Props aidanlane.
Fixes #35772.


git-svn-id: https://develop.svn.wordpress.org/trunk@36642 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 18:04:22 +00:00
Dominik Schilling (ocean90) 7e16474308 Customizer: Add visual feedback to reorder buttons.
Props coreymcollins, melchoyce.
Fixes #35041.

git-svn-id: https://develop.svn.wordpress.org/trunk@36641 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:53:40 +00:00
Drew Jaynes 66ec958a5f Users: Pass the array of user IDs being deleted to the `delete_user_form` action hook in two places.
Also updates documentation for the first parameter, `$current_user`, to clarify that it holds the `WP_User` object for the _current_ user, not the one being deleted.

Props usermrpapa.
Fixes #35063. 


git-svn-id: https://develop.svn.wordpress.org/trunk@36640 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:41:15 +00:00
Dominik Schilling (ocean90) ccaa888386 Customizer: Contain "No image set/selected" in dashed border.
Props Ankit K Gupta, chris_dev.
Fixes #35826.

git-svn-id: https://develop.svn.wordpress.org/trunk@36639 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:26:58 +00:00
Pascal Birchler 9ac7cc3aa0 Themes: Improve error messages for broken themes.
Props mayukojpn for initial patch.
Fixes #35286.

git-svn-id: https://develop.svn.wordpress.org/trunk@36638 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:19:57 +00:00
Pascal Birchler fe824ee872 Embeds: Make the click event handler work for dynamically added links.
Props JamesDiGioia.
Fixes #35630.

git-svn-id: https://develop.svn.wordpress.org/trunk@36637 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 17:15:23 +00:00
Drew Jaynes 203966bd4f Docs: Improve documentation for `WP_REST_Request` to highlight a caveat of ArrayAccess when it comes to passing similar arguments for multiple request methods.
Props danielbachhuber, DrewAPicture.
Fixes #35799.


git-svn-id: https://develop.svn.wordpress.org/trunk@36636 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:56:28 +00:00
Pascal Birchler ee7ac00886 Embeds: Load the default site icon from the `wp-includes` directory.
Files inside the `wp-admin` directory may not be publicly available. This copies the blue WordPress logo to `wp-includes/images`.

Props thewanderingbrit.
Fixes #35322.

git-svn-id: https://develop.svn.wordpress.org/trunk@36635 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:54:32 +00:00
Boone Gorges a001f7089b Docs: Improve description of `get_term()` return value.
Props sebastian.pisula.
Fixes #35919.

git-svn-id: https://develop.svn.wordpress.org/trunk@36634 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:47:47 +00:00
Pascal Birchler 0e13a57288 Script Loader: Introduce `wp_add_inline_script()`.
This new function can be used to add inline JavaScript before and after enqueued scripts, just like `wp_add_inline_style()` works for CSS.

Props atimmer, abiralneupane, ocean90, swissspidy.
Fixes #14853.

git-svn-id: https://develop.svn.wordpress.org/trunk@36633 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:43:41 +00:00
Boone Gorges 0338c8b3a3 Query: Allow a seed value to be passed when using 'rand' `$orderby`.
`WP_Query` allows random ordering; `'orderby' => 'rand'` translates to
`ORDER BY RAND()`. This syntax results in random ordering that is not
consistent from request to request. MySQL supports the passing of a seed value
to random sorts, such as `ORDER BY RAND(3)`, which will return the same
random value each time it's called. `WP_Query` now supports this syntax, by
passing `RAND(3)` (or whatever integer seed value you'd like) as the value
of `'orderby'`.

Props hlashbrooke.
Fixes #35692.

git-svn-id: https://develop.svn.wordpress.org/trunk@36632 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:39:50 +00:00
Dominik Schilling (ocean90) 7b1c4151dd L10n: Add test for `wp_dropdown_languages()`.
Props realloc.
Fixes #35294.

git-svn-id: https://develop.svn.wordpress.org/trunk@36631 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-23 16:27:36 +00:00
Dominik Schilling (ocean90) b5adc06521 Updates: Pass locales of all available languages to the themes/plugins update API.
This ensures that language packs for all languages in a Multisite install are updated.

Fixes #34937.

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