Because term XML nodes now include termmeta and can thus be much larger, this
changeset also includes adds some newlines and indentation to make the XML
easier to read.
Props Chouby.
See #34062.
git-svn-id: https://develop.svn.wordpress.org/trunk@37240 602fd350-edb4-49c9-b593-d223f7449a82
- makes the mobile preview/customize toggle a button
- changes the "Close" link hidden text from 'Cancel' to 'Close the Customizer and go back to the previous page'
- adds a missing `type="button"` attribute
- removes unnecessary `keydown` events and `preventDefault()`: buttons don't need a keydown event and when they have a `type="button"` attribute there's no default action to prevent
Props Cheffheid, afercia.
Fixes#31487.
git-svn-id: https://develop.svn.wordpress.org/trunk@37230 602fd350-edb4-49c9-b593-d223f7449a82
By passing the `force_default` argument to `get_avatar()` instead of using `preg_replace`, we make it easier for developers to override the output.
Props henry.wright.
Fixes#34744.
git-svn-id: https://develop.svn.wordpress.org/trunk@37227 602fd350-edb4-49c9-b593-d223f7449a82
When multisite is not configured, the `_site_transient()` and `_site_option()` functions fallback to `_option()` and store network "meta/options" in `wp_options`.
Previously, those calls to `_option()` did not explicitly set the `autoload` parameter and anything assigned as a transient or option at the network level would be set to `autoload` by default, even though autoload is not yet a concept at the network option level.
This changes that behavior and forces the `autoload` setting to `no`. If `autoload` is desired, the single site option functions should be used.
Props thomaswm.
Fixes#22846.
git-svn-id: https://develop.svn.wordpress.org/trunk@37223 602fd350-edb4-49c9-b593-d223f7449a82
Prevents the modal from being displayed off screen, when there is only one
theme available and the menu is collapsed.
Props hardeepasrani for initial patch.
Fixes#36504.
git-svn-id: https://develop.svn.wordpress.org/trunk@37205 602fd350-edb4-49c9-b593-d223f7449a82
Previously, a deleted theme would remain in the list of allowed themes until manually cleared. This uses `WP_Theme::network_disable_theme()`, added in [37202].
Fixes#34182.
git-svn-id: https://develop.svn.wordpress.org/trunk@37203 602fd350-edb4-49c9-b593-d223f7449a82
* `WP_Theme::network_enable_theme()` can be used to enable a theme or array of themes on a network.
* `WP_Theme::network_disable_theme()` can be used to disable a theme or array of themes on a network.
* Use these new methods in the network admin vs direct `update_site_option()` calls.
* Add tests.
Props igmoweb.
Fixes#30594.
git-svn-id: https://develop.svn.wordpress.org/trunk@37202 602fd350-edb4-49c9-b593-d223f7449a82
Moving these functions to `wp-includes/capabilities.php` allows plugins to access more than just `is_super_admin()` and `get_super_admin()` from the front end without including a file via `wp-admin/`. Add an `is_multisite()` check to prevent use of these on single site environments now that they have left `ms.php`..
Props johnjamesjacoby.
Fixes#21788.
git-svn-id: https://develop.svn.wordpress.org/trunk@37200 602fd350-edb4-49c9-b593-d223f7449a82
Improper checking for 'Imagick::ALPHACHANNEL_UNDEFINED' and
'Imagick::ALPHACHANNEL_OPAQUE' caused fatal errors for some users
with Imagick when compiled against ImageMagick < 6.4.6, when these
constants were introduced. Fixes these compatibility checks.
Props gblsm.
Fixes#36501.
git-svn-id: https://develop.svn.wordpress.org/trunk@37192 602fd350-edb4-49c9-b593-d223f7449a82
* Following pattern of `wp_get_mime_types()`, introduce `wp_get_ext_types()` function. New function returns a filtered list of file types with their extensions.
* Use this function in new tests for `wp_ext2type()`.
Props borgesbruno.
Fixes#35987.
git-svn-id: https://develop.svn.wordpress.org/trunk@37189 602fd350-edb4-49c9-b593-d223f7449a82
`LEFT JOIN` ensures that `NOT EXISTS` queries will not miss posts that have
no taxonomy data whatsoever.
Props swissspidy, crstauf.
Fixes#36343.
git-svn-id: https://develop.svn.wordpress.org/trunk@37184 602fd350-edb4-49c9-b593-d223f7449a82
Also, flip the "Selective Refresh" and "Smart Image Resizing" section and remove script enqueues which are no longer used.
Props joemcgill, melchoyce, ocean90.
Fixes#36173.
git-svn-id: https://develop.svn.wordpress.org/trunk@37175 602fd350-edb4-49c9-b593-d223f7449a82
Also, replace the generic `.alignright` class with a more specific class to avoid styling issues with themes which have padding/margin attached to `.alignright`.
Props azaozz, imath.
Fixes#36461.
git-svn-id: https://develop.svn.wordpress.org/trunk@37174 602fd350-edb4-49c9-b593-d223f7449a82
This disables the concatenation of remaining enqueued scripts once `wp_add_inline_script()` is invoked, which allows us to reliably print these scripts and their before/after inline scripts in the desired order.
Props gitlost, azaozz, swisspidy, ocean90.
Fixes#36392.
git-svn-id: https://develop.svn.wordpress.org/trunk@37171 602fd350-edb4-49c9-b593-d223f7449a82
Theme support for `customize-selective-refresh-widgets` can be added _after_ the logic for registering the settings for incoming widgets that have been changed. This is due to themes adding the theme support in `after_setup_theme` which is also the action where `WP_Customize_Widgets::register_settings()` is called. If these both happen at priority 10, which one is called first depends on which one was added first. The other issue is that at the time that `WP_Customize_Widgets::register_settings()` is called at `after_setup_theme`, it is called before `widgets_init` and thus no widgets are yet registered. This means that any settings registered at this point will always have a `refresh` transport even if the theme supports `customize-selective-refresh-widgets`, since the `WP_Widget` instance is not visible yet to see if it supports selective refresh.
The fix: Defer `WP_Customize_Widgets::register_settings()` from `after_setup_theme` to `widgets_init` at priority 95 when the widget objects have all been registered. Also, ensure that the preview filter for `sidebars_widgets` is added before the sidebars are iterated for adding the controls.
Props westonruter.
Fixes#36389.
git-svn-id: https://develop.svn.wordpress.org/trunk@37166 602fd350-edb4-49c9-b593-d223f7449a82
Percent signs are reserved characters in URIs. As such, it was impossible for
plugins to route requests to trashed posts, as happens in bbPress. The new
`__trashed` suffix should be sufficiently unique.
Also adds a test that demonstrates that the `__trashed` suffix can be
appended to slugs that contain the suffix somewhere other than the end of
the string.
Props netweb, ericlewis.
Fixes#11863.
git-svn-id: https://develop.svn.wordpress.org/trunk@37165 602fd350-edb4-49c9-b593-d223f7449a82
We goofed, and parameters accessed through the REST API's methods
were slashed (inconsistently, even). This unslashes the data, so
you get the un-messed-with data that was sent.
Props joehoyle.
Fixes#36419.
git-svn-id: https://develop.svn.wordpress.org/trunk@37163 602fd350-edb4-49c9-b593-d223f7449a82
Replace the use of a `.screen-reader-text` element with an `aria-label` attribute to make the text easier to translate.
Props dimadin, ocean90.
See #35001.
Fixes#36410.
git-svn-id: https://develop.svn.wordpress.org/trunk@37162 602fd350-edb4-49c9-b593-d223f7449a82
You know what's wrong with the Moderate Comment Screen? It doesn't win anymore. Well, I'm going make the Moderate Comment screen win. It's going to win by showing the urls that are linked to from every anchor. It's going to win by having those urls be a lighter shade of gray than the surrounding text. Spammy links aren't going to be able to hide in commas. Spammy links aren't going to win. The Moderate Comment Screen is going to win and we are going to make the Moderate Comment Screen Great Again.
Fixes#36380
Props rachelbaker, mikeschroder, adamsilverstein, boonebgorges, melchoyce, ocean90, jorbin, pento
git-svn-id: https://develop.svn.wordpress.org/trunk@37161 602fd350-edb4-49c9-b593-d223f7449a82
Adds `aria-describedby` attributes to the modal form fields after it
was partly restored in [37154].
Fixes#33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37160 602fd350-edb4-49c9-b593-d223f7449a82
- Restore the bottom half of the modal.
- Make it always expanded and remove the toggle. It is used as advanced link options now, no need to have simple mode.
Props iseulde, adamsilverstein, azaozz.
Fixes#36359.
git-svn-id: https://develop.svn.wordpress.org/trunk@37154 602fd350-edb4-49c9-b593-d223f7449a82
Improves alignment with nav menus in the Customizer, fixing regression introduced in [36908].
See #35273.
Props sidati, westonruter.
Fixes#36353.
git-svn-id: https://develop.svn.wordpress.org/trunk@37153 602fd350-edb4-49c9-b593-d223f7449a82
Allow controls to specify the primary element to receive focus by adding a `control-focus` class.
Props adamsilverstein, westonruter.
Fixes#36337.
git-svn-id: https://develop.svn.wordpress.org/trunk@37152 602fd350-edb4-49c9-b593-d223f7449a82
The codex says that taxonomy names "should only contain lowercase letters and the underscore character", but that's not enforced. It's too late to enforce it, since some plugins haven't been following it and the official phpdoc doesn't mention this restriction.
git-svn-id: https://develop.svn.wordpress.org/trunk@37133 602fd350-edb4-49c9-b593-d223f7449a82
Takes into account whether the control supports `flex_width` and/or
`flex_height` and adjusts destination measurements accordingly.
Fixes#36318.
git-svn-id: https://develop.svn.wordpress.org/trunk@37113 602fd350-edb4-49c9-b593-d223f7449a82
We are escaping arguments, not commands, so we'd better use the semantically correct function, even though they are similar.
git-svn-id: https://develop.svn.wordpress.org/trunk@37094 602fd350-edb4-49c9-b593-d223f7449a82
The parsing of defaults assumes that $args will be an array. This solves it for Custom Logo the same way it is solved for custom-header and custom-background.
Props obenland.
Fixes#36332.
git-svn-id: https://develop.svn.wordpress.org/trunk@37092 602fd350-edb4-49c9-b593-d223f7449a82
When not misspelled, this hook is useful (and needed) for backward compatibility.
Unprops swissspidy.
Fixes#34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@37084 602fd350-edb4-49c9-b593-d223f7449a82
Allows themes to specify the desired width and height of logos, and whether
that is flexible or not. Has the benefit of not having to generate a logo-sized
file for every image uploaded.
Props westonruter, celloexpressions.
Fixes#36255.
git-svn-id: https://develop.svn.wordpress.org/trunk@37077 602fd350-edb4-49c9-b593-d223f7449a82
This reverts part of [34659] due to excessive canonical problems it's caused in 4.4.x.
Remove the unit tests which are no longer supported.
This also removes the `is_feed()` code to avoid confusion - only pages & embeds will be redirected.
Merges [36280] and [36281] to trunk.
Props dd32.
See #21602, #35344.
git-svn-id: https://develop.svn.wordpress.org/trunk@37075 602fd350-edb4-49c9-b593-d223f7449a82
Also clarify that the `$args` parameters can accept a string (the default) in addition to an array.
Props ramiy.
See #36296.
git-svn-id: https://develop.svn.wordpress.org/trunk@37069 602fd350-edb4-49c9-b593-d223f7449a82
Also fixes inline `@see` formatting in appropriate places (summaries should not contain tags or markdown).
Props ramiy.
See #36296.
git-svn-id: https://develop.svn.wordpress.org/trunk@37068 602fd350-edb4-49c9-b593-d223f7449a82
Also add several missing at `@access` tags to other method DocBlocks and clarify parameter docs for `WP_Widget::form_callback()`.
Props raimy.
See #36298.
git-svn-id: https://develop.svn.wordpress.org/trunk@37064 602fd350-edb4-49c9-b593-d223f7449a82
Fixes issue where the Customizer preview window can appear to momentarily bounce to the top when being refreshed. Regression from [36532].
See #31195.
Fixes#36276.
git-svn-id: https://develop.svn.wordpress.org/trunk@37060 602fd350-edb4-49c9-b593-d223f7449a82
* Marks optional parameters as such
* Improves existing parameter descriptions for clarity
* Syntax improvements
See #36300.
git-svn-id: https://develop.svn.wordpress.org/trunk@37050 602fd350-edb4-49c9-b593-d223f7449a82
Resolves bug introduced in [r34572], in which editing a Post via the XMLRPC API with a draft post_status, where the post_status changes from draft->publish with a future post_date set for the publish action, will have the future post_date disregarded and the Post will be published immediately. The expected behavior is that the post_date is used to schedule the Post to be published in the future.
Fixes#35874.
Props redsweater, rachelbaker, DrewAPicture
git-svn-id: https://develop.svn.wordpress.org/trunk@37043 602fd350-edb4-49c9-b593-d223f7449a82
Ensures that `$flex_width` and `$flex_height` as specified on `WP_Customize_Cropped_Image_Control` will be honored when a crop is saved.
See #36255.
Fixes#34851.
git-svn-id: https://develop.svn.wordpress.org/trunk@37042 602fd350-edb4-49c9-b593-d223f7449a82
In [36533] CURIEs were added to the API responses for the link relation URIs, this makes
it a lot easier for clients to look up links by relation. That patch was functional, but
broke on edge cases such as embedded responses and collection items with links in the items.
This patch instead takes a less obtrusive approach by creating a new `get_compact_response_links`
to compliment `get_response_links` making both old and new functionality available.
Also the regex for curie relations has been relaxed to `.+` as rel names can have any uri-valid charector in it.
Fixes#34729.
git-svn-id: https://develop.svn.wordpress.org/trunk@37041 602fd350-edb4-49c9-b593-d223f7449a82
* Introduces `customize-selective-refresh-widgets` theme support feature and adds to themes.
* Introduces `customize_selective_refresh` arg for `WP_Widget::$widget_options` and adds to all core widgets.
* Remove `selective_refresh` from being a component that can be removed via `customize_loaded_components` filter.
* Add `WP_Customize_Widgets::get_selective_refreshable_widgets()` and `WP_Customize_Widgets::is_widget_selective_refreshable()`.
* Fix default `selector` for `Partial` instances.
* Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
* Re-initialize ME.js when refreshing `Twenty_Fourteen_Ephemera_Widget`.
See #27355.
Fixes#35855.
git-svn-id: https://develop.svn.wordpress.org/trunk@37040 602fd350-edb4-49c9-b593-d223f7449a82
Updates .dashicons-googleplus (f462) and adds three new icons, .dashicons-move (f545), .dashicons-laptop (f547), and .dashicons-paperclip (f546).
Props liljimmi, melchoyce, empireoflight, aargh-a-knot.
See #34221.
git-svn-id: https://develop.svn.wordpress.org/trunk@37036 602fd350-edb4-49c9-b593-d223f7449a82
Adds example output to the DocBlock description based on default argument values.
Props ramiy for the initial patch.
See #32246.
git-svn-id: https://develop.svn.wordpress.org/trunk@37032 602fd350-edb4-49c9-b593-d223f7449a82
Confusion abound, the API index is the generic term `url` to display the `site_url`. New `home` key will display the `home_url` in the index as well.
Fixes#35647.
git-svn-id: https://develop.svn.wordpress.org/trunk@37031 602fd350-edb4-49c9-b593-d223f7449a82
When the browser test for diversity emoji was added in [36160], it included a workaround for Chrome not being able to compare `Uint8ClampedArray` objects directly, by converting them to a string. Unfortunately, Safari doesn't support the `Uint8ClampedArray.toString()` method correctly, so the test was incorrectly failing in Safari.
Fixes#36266 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@37028 602fd350-edb4-49c9-b593-d223f7449a82
When the `xmlrpc_enabled` filter was initially introduced in [21509], it was effectively intended to replace the `enable_xmlrpc' UI option, which only controlled whether authenticated XML-RPC methods were enabled, such as for publishing actions. This change clarifies the expected behavior and adds information about ways to more granularly control XML-RPC method and request behavior with related hooks.
Part props mensmaximus.
See #21509. Fixes#36055.
git-svn-id: https://develop.svn.wordpress.org/trunk@37025 602fd350-edb4-49c9-b593-d223f7449a82
- Remove `***` and `___` text pattern and support for spaces in `---`. The only `<hr>` text pattern is 3 or more dashes, no spaces.
- Remove the `*`, `**`, `_`, and `__` text patterns for bold and italic.
Fixes#33300;
git-svn-id: https://develop.svn.wordpress.org/trunk@37023 602fd350-edb4-49c9-b593-d223f7449a82
- Add back the bottom box-shadow on the Apply button.
- Shrink `.mce-btn.mce-primary` to compensate for the bottom box-shadow.
- Tighten up/reduce the margins between the buttons.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37004 602fd350-edb4-49c9-b593-d223f7449a82
- Remove bottom box-shadow from the Apply button so it matches the rest.
- Change the tooltip for the cogwheel button to Link options.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@37001 602fd350-edb4-49c9-b593-d223f7449a82
HHVM does not currently support loading URLs in its port of Imagick.
Fixes `test_wp_crop_image_url()` failure introduced in [36916].
See #35973.
git-svn-id: https://develop.svn.wordpress.org/trunk@36996 602fd350-edb4-49c9-b593-d223f7449a82
- Add role=dialog and an aria-labelledby attribute to the modal container.
- Change the modal title to h1.
- Remove one ` ` that gets read out as `blank` by screen readers.
- Replace the Cancel link with a button.
- Clean up unused CSS.
Props afercia.
Fixes#30468.
git-svn-id: https://develop.svn.wordpress.org/trunk@36991 602fd350-edb4-49c9-b593-d223f7449a82
Eliminates JS logic (from [36698]) which attempted to do pure JS update while waiting for the selective refresh response to return. The duplicate JS logic lacked a re-implementation of the `image_downsize()` functionality available in PHP, and so the JS preview logic would fail to properly preview images that didn't have the exact theme image size generated. To keep the code DRY and to eliminate the momentary display of an improperly-sized image, the duplicated JS logic is now removed.
See #27355.
See #33755.
Fixes#36096.
git-svn-id: https://develop.svn.wordpress.org/trunk@36990 602fd350-edb4-49c9-b593-d223f7449a82
Due to the "exclude" support added in WP 4.4, single dashes were being
converted to "NOT LIKE '%%'" clauses, causing all searches to fail.
Props RomSocial, swissspidy.
Fixes#36195.
git-svn-id: https://develop.svn.wordpress.org/trunk@36989 602fd350-edb4-49c9-b593-d223f7449a82
When passed an invalid `'taxonomy'`, `get_terms()` will return a `WP_Error`
object. This object should not be blindly cast to an array. Instead, an empty
array should be returned, to indicate that no matching terms have been found.
Props virgodesign, sebastian.pisula.
Fixes#36227.
git-svn-id: https://develop.svn.wordpress.org/trunk@36988 602fd350-edb4-49c9-b593-d223f7449a82
- Remove unused user setting for wpLink.
- Remove redundant text and variable from wp_link_dialog().
Props afercia, azaozz.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36985 602fd350-edb4-49c9-b593-d223f7449a82
- Add audible confirmation when a link has been selected or inserted in the editor for both the inline dialog and the modal.
- Do not auto-search when the URL field is empty or already contains an URL.
- Remove a few redundant `tabindex`.
Props afercia, azaozz.
See #33301.
git-svn-id: https://develop.svn.wordpress.org/trunk@36984 602fd350-edb4-49c9-b593-d223f7449a82
This ensures that no variables changed in the process of introducing `wp-admin/term.php`, improving overall backward compatibility.
Props Chouby for initial patch.
Fixes#34988.
git-svn-id: https://develop.svn.wordpress.org/trunk@36969 602fd350-edb4-49c9-b593-d223f7449a82
The plugin details modal can be invoked from several screens. There's now a new
`.open-plugin-details-modal` CSS class to be used in combination with the
`.thickbox` CSS class that adds everything needed for accessibility.
- Adds an ARIA role `dialog` and an `aria-label` attribute to the modal
- Adds a `title` attribute to the iframe inside the modal
- Constrains tabbing within the modal
- Restores focus back in a proper place when closing the modal
Also, improves a bit the native Thickbox implementation: it should probably be
replaced with some more modern tool but at least keyboard focus should be moved
inside the modal.
Fixes#33305.
git-svn-id: https://develop.svn.wordpress.org/trunk@36964 602fd350-edb4-49c9-b593-d223f7449a82