Commit Graph

33724 Commits

Author SHA1 Message Date
John Blackbourn 6cf0caf13e Unify the initialisation of `$_SERVER` variables during test bootstrap. This abstracts the (re-)initialisation into a function that can be used inside of tests too, before assertions are performed.
See #35954


git-svn-id: https://develop.svn.wordpress.org/trunk@36715 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 21:59:56 +00:00
John Blackbourn fd03f6ec19 Canonical: Improve the method names and inline docs for canonical redirect tests.
git-svn-id: https://develop.svn.wordpress.org/trunk@36714 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 21:55:57 +00:00
John Blackbourn a9a61a2764 Docs: Correct the possible return types for `WP_Dependencies::query()`.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@36713 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 21:25:47 +00:00
John Blackbourn 15245415c7 Docs: Improve the description of the `get_object_taxonomies()` function. Uncertainty has no place in documentation.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@36712 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 21:24:10 +00:00
John Blackbourn fd8e31e3b2 Move some assertions in HTTPS related tests, so failures that occur before the environment reset don't result in a contaminated test environment.
See #35954


git-svn-id: https://develop.svn.wordpress.org/trunk@36711 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 21:17:34 +00:00
Dominik Schilling (ocean90) d30e49fa60 L10n: Add test for `wp_get_pomo_file_data()`.
Props realloc.
See #35284.

git-svn-id: https://develop.svn.wordpress.org/trunk@36710 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 15:01:23 +00:00
Dominik Schilling (ocean90) 9a7488aaf8 Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective).
Props obrienlabs, thewanderingbrit.
Fixes #34887.

git-svn-id: https://develop.svn.wordpress.org/trunk@36709 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 12:52:33 +00:00
Pascal Birchler a57b5c8ce5 Embeds: Use a more accessible way to initially hide the iframe.
This fixes a bug in Firefox where assets inside the iframe aren't being displayed because they have no computed style.

See #35894.

git-svn-id: https://develop.svn.wordpress.org/trunk@36708 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 10:22:43 +00:00
Drew Jaynes eaaef09d83 Docs: Use a third-person singular verb in the DocBlock summary for `wp_add_inline_script()`, introduced in [36633].
See #14853. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36707 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 05:13:14 +00:00
Drew Jaynes 816a3e058c Docs: Standardize DocBlocks for two new `WP_Scripts` methods, `add_inline_script()` and `print_inline_script()`, introduced in [36633].
See #14853. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36706 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 05:10:46 +00:00
Drew Jaynes f90a37805d Docs: Make a few syntactical improvements to the DocBlock for `_wp_get_current_user()`, introduced in [36651].
Includes a cross reference from the DocBlock for `wp_get_current_user()`, which itself is pluggable, but the new internal function is not.

See #19615. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36705 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 05:06:39 +00:00
Drew Jaynes 4acfd64d93 Posts: Rename the `$args` parameter in `get_post_types_by_support()` to `$feature` for better self-documentation.
See #34010. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36704 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 04:55:01 +00:00
Andrew Ozz be75cdbe7c TinyMCE, inline link dialog:
- Reset the inline dialog when canceling the advanced modal. If there is a link it should be on the first stage: follow/preview link.
- Fix tabbing in the inline edit dialog.

See #33301.

git-svn-id: https://develop.svn.wordpress.org/trunk@36703 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 03:47:46 +00:00
Mike Schroder c55cf787b1 Post 4.5-beta1 version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@36702 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 03:34:32 +00:00
Mike Schroder bd5250eee7 4.5-beta1
git-svn-id: https://develop.svn.wordpress.org/trunk@36701 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-25 01:48:51 +00:00
Mike Schroder e2d2c45c6b Media: Optimize Imagick settings for quality and filesize
- Resamples and sharpens larger images before resize.
- Uses imagick::FILTER_TRIANGLE for a smoother resize.
- Introduces `WP_Image_Editor_Imagick::thumbnail_image()` protected method to efficiently resize images. Similar to the functionality of Imagick's `thumbnailImage()`.
- Introduces `WP_Image_Editor_Imagick::strip_meta()` protected method and `image_strip_meta` filter that, by default, strip image profiles to reduce file size, while leaving color profiles intact.

See: #33642, #30402, #28634.
Props: joemcgill, dnewton, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@36700 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 22:50:10 +00:00
Aaron Jorbin 46baace6f3 Revert r36696
This broke embeds. Needs a better solution to also make sure all queries from the REST API aren't broken.

see #35907.




git-svn-id: https://develop.svn.wordpress.org/trunk@36699 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 22:11:50 +00:00
Konstantin Obenland b73a1c9aa9 Customize: Introduce Logo support for themes.
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/

Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland. 
See #33755.



git-svn-id: https://develop.svn.wordpress.org/trunk@36698 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 22:09:54 +00:00
Dominik Schilling (ocean90) 320e8b1642 I18N: Fix placeholders and add translator comments after [36695].
See #35705.

git-svn-id: https://develop.svn.wordpress.org/trunk@36697 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 21:48:02 +00:00
Aaron Jorbin c379b5fc24 Permit sticky posts to affect the query in REST_REQUEST
Needed for https://github.com/WP-API/WP-API/issues/2210

Props danielbachhuber.
Fixes #35907.



git-svn-id: https://develop.svn.wordpress.org/trunk@36696 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 21:43:15 +00:00
jeremyfelt 95ba2c38c0 Multisite: Provide an "Edit user" link after adding a new user
Props codex-m, jeremyfelt.
Fixes #35705.


git-svn-id: https://develop.svn.wordpress.org/trunk@36695 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 21:42:02 +00:00
Drew Jaynes 138b55c16e Embeds: Update embed template paths and messages in tests, missed in [36693].
Props ocean90
See #34561.


git-svn-id: https://develop.svn.wordpress.org/trunk@36694 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 21:20:41 +00:00
Drew Jaynes 177351364c Embeds: Introduce embed templates into the template hierarchy via theme-compat.
Splits wp-includes/embed-template.php, introduced in 4.4, into five new templates that can be individually overridden by themes:

* embed.php
* embed-404.php
* embed-content.php
* header-embed.php
* footer-embed.php

Also introduces a new template tag for outputting the site title, `the_embed_site_title()`.

The five new templates live in theme-compat, allowing for graceful fallbacks should themes prefer not to override any or all of them.

Props swissspidy, imath, ocean90, DrewAPicture.
See #34561.


git-svn-id: https://develop.svn.wordpress.org/trunk@36693 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 20:56:18 +00:00
Andrew Ozz 98956847c1 TinyMCE: remove the iframe expansion CSS fix for iOS Safari. Not needed in iOS 9.x. Fixes visual glitches with the caret.
Fixes #35939.

git-svn-id: https://develop.svn.wordpress.org/trunk@36692 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 19:25:29 +00:00
Boone Gorges 036bac45bc Improve 'offset' calculation when querying for hierarchical terms.
When querying for terms in hierarchical taxonomies, `get_terms()` initially
queries for all matching terms, and then trims the located results based on the
`$number` and `$offset` arguments passed to the function. See #8832. However,
a flaw in the original logic meant that results were failing to be trimmed
properly in cases where `$offset` exceeds the total number of matching terms;
in these cases, we should force an empty array.

Props danielbachhuber.
Fixes #35935.

git-svn-id: https://develop.svn.wordpress.org/trunk@36691 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 19:12:45 +00:00
Sergey Biryukov 12645e6f75 I18N: Move the "Caution:" prefix to a separate string in `wp-admin/includes/network.php`.
Props ramiy.
Fixes #35674.

git-svn-id: https://develop.svn.wordpress.org/trunk@36690 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 18:39:32 +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
Sergey Biryukov 516756e370 Mail: Correct `compact()` usage in `wp_mail()`.
Props Ankit K Gupta, maweder.
Fixes #35781 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@36688 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 17:37:36 +00:00
Drew Jaynes 432969af21 Docs: Add an inline `@see` tag to link up the `plugins_loaded` hook in the description for the `customize_loaded_components` filter.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@36687 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:43:49 +00:00
Dominik Schilling (ocean90) 1e7fd85666 Upgrade: Bump db version for `upgrade_450()` in `upgrade_all()`.
See #23358.

git-svn-id: https://develop.svn.wordpress.org/trunk@36686 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:33:28 +00:00
Mel Choyce 8a9d0e3499 Forms: Swap "Submit" button label for "Enter" on password-protected pages.
Props karmatosed, SergeyBiryukov

See #35042.


git-svn-id: https://develop.svn.wordpress.org/trunk@36685 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:24:36 +00:00
Jeremy Felt 380fc2d093 Multisite: Use "Site Address (URL)" in site-new.php.
This uses the same string as single site and `site-info.php` when editing a site in multisite.

Fixes #35934.


git-svn-id: https://develop.svn.wordpress.org/trunk@36684 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:13:04 +00:00
Andrea Fercia 52c7d7581e Accessibility: improve accessibility of the Dashboard "Recent Comments" widget.
- Makes the list of comments a list
- Always displays the title of the post the comment relates to, linked to the post itself and no more to the Edit screen
- Headings: changes the visible one in "Recent Comments" and adds a hidden "View more comments" heading before the views links
- Adds the pending status indicator to Pingbacks and Trackbacks

Props rachelbaker, afercia.

Fixes #35392.

git-svn-id: https://develop.svn.wordpress.org/trunk@36683 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:06:05 +00:00
Jeremy Felt 8ff43d09f5 Multisite: Show the main site's domain and path in site-info.php
* Use the domain and path combination from `wp_blogs` when displaying the site address for the main site.\
* Update the text from "Site URL" to "Site Address (URL)" for all sites in `site-info.php` to better align with how we refer to this in single site.

Props flixos90, rachelbaker.
Fixes #35632.


git-svn-id: https://develop.svn.wordpress.org/trunk@36682 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:05:23 +00:00
Dominik Schilling (ocean90) e238cac0cc Media: Fix broken delete/trash functionality in the library after [36546].
Props imath.
See #34350.

git-svn-id: https://develop.svn.wordpress.org/trunk@36681 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 16:02:43 +00:00
Dominik Schilling (ocean90) 24863e1a6e External Libraries: Update jQuery to 1.12.1.
Release post: http://blog.jquery.com/2016/02/22/jquery-1-12-1-and-2-2-1-released/
Changelog: https://github.com/jquery/jquery/compare/1.12.0...1.12.1

Fixes #35380.

git-svn-id: https://develop.svn.wordpress.org/trunk@36680 602fd350-edb4-49c9-b593-d223f7449a82
2016-02-24 15:43:12 +00:00
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