This brings the custom colors CSS in line with the stylesheet. Some selectors were missing since many changes occurred in `style.css` a few days before the original merge to Core.
Props celloexpressions, laurelfulford.
Fixes#38389.
git-svn-id: https://develop.svn.wordpress.org/trunk@38918 602fd350-edb4-49c9-b593-d223f7449a82
Previously, if an invalid post status was assigned to a media object, the object would be returned with an unchanged status. After [38911], an error response is returned.
The assertion in test_get_items_invalid_status_param_is_discarded() needs to be updated to account for the expected error response. The test name has been changed to `test_get_items_invalid_status_param_is_error_response()`.
Fixes#38417.
git-svn-id: https://develop.svn.wordpress.org/trunk@38917 602fd350-edb4-49c9-b593-d223f7449a82
Pass `false` as the `$passed_default` value when the `default_option_{$option}` filter is applied in `update_option` as no default is ever passed.
This resolves an error in tests where the 3rd parameter is not available to `filter_default_option()`.
Fixes#38176.
git-svn-id: https://develop.svn.wordpress.org/trunk@38916 602fd350-edb4-49c9-b593-d223f7449a82
- removes the previous markup based on a definition list
- groups checkboxes in `fieldset` elements with a `legend`
- simplifies the CSS lowering selectors specificity
Props xavortm.
Fixes#38023.
git-svn-id: https://develop.svn.wordpress.org/trunk@38912 602fd350-edb4-49c9-b593-d223f7449a82
Currently we are using a different validate callback, so the `enum` is not interpretted. We just have to fallback to the result of `rest_validate_request_arg` in our custom wrapper function.
Fixes#38417.
git-svn-id: https://develop.svn.wordpress.org/trunk@38911 602fd350-edb4-49c9-b593-d223f7449a82
Add a `default` argument to `register_setting` that will be used an the default option value viet `get_option()` in the event of no other option being specified. This means (if chosen) developers can define their default once via `register_option` and not have to duplicate the value every time they make a call to `get_option()`.
Props rmccue, jorbin, jtsternberg.
Fixes#38176.
git-svn-id: https://develop.svn.wordpress.org/trunk@38910 602fd350-edb4-49c9-b593-d223f7449a82
`WP_DEFAULT_THEME` was being defined in the wrong location.
Also, if WordPress has the original "default" theme installed, ensure that our test theme overrides it.
Props swissspidy for daring to dive into Themes of WordPress Past.
See #31550, #38457.
git-svn-id: https://develop.svn.wordpress.org/trunk@38908 602fd350-edb4-49c9-b593-d223f7449a82
This functionality was originally added in [38858], using `symlink()` to put a link to the theme in WordPress' `themes` directory. Unfortunately, not all installs have write access to the `themes` directory, causing unit tests to fail.
The new method is to add the test theme directory to `$wp_theme_directories`, and fix the handful of tests that don't expect `$wp_theme_directories` to have multiple entries.
The test install/bootstrap routines now also check that `WP_DEFAULT_THEME` is defined, in case the tests are being run on a system that hasn't upgraded its' `wp-tests-config.php`.
See #31550.
Fixes#38457.
git-svn-id: https://develop.svn.wordpress.org/trunk@38907 602fd350-edb4-49c9-b593-d223f7449a82
This ability was previously added to nav menus via the available page items panel. The "Add New Page" button only appears when the `allow_addition` control param is supplied as `true`. Code is adapted from the Customize Posts feature plugin.
Props celloexpressions, westonruter.
See #38013, #34923.
Fixes#38164.
git-svn-id: https://develop.svn.wordpress.org/trunk@38906 602fd350-edb4-49c9-b593-d223f7449a82
An empty string causes some browsers to use the current URL as the `href`. When using `history.replaceState()` Chrome will re-fetch the favicon with each call, meaning that `customize.php` gets hit with wasted requests which tax the server.
Fixes#38377.
git-svn-id: https://develop.svn.wordpress.org/trunk@38901 602fd350-edb4-49c9-b593-d223f7449a82
Previously we ensured that the entry points to WordPress were parsable by PHP4 in order to display a friendly not-supported-php error message.
However, for the last two years the main entry points have not actually parsed, and we've only added extra parse errors since it last worked in 3.9, so it's time we just remove this 'feature'.
The PHP version checks are still there for PHP 5.0/5.1, and so it's inplace when we eventually drop PHP 5.2 support.
See #29489.
git-svn-id: https://develop.svn.wordpress.org/trunk@38899 602fd350-edb4-49c9-b593-d223f7449a82
A number of locked down installs remove `readme.html` or make it inaccessible which would result in an update failure.
Props polevaultweb for the initial patch.
Fixes#31420.
git-svn-id: https://develop.svn.wordpress.org/trunk@38898 602fd350-edb4-49c9-b593-d223f7449a82
This fixes the pin icon having variations in position and size depending on screen and device.
Props metodiew, mbelchev, davidakennedy
Fixes#38407
git-svn-id: https://develop.svn.wordpress.org/trunk@38892 602fd350-edb4-49c9-b593-d223f7449a82
On the these devices, there is an issue with the button rendering for the search form. This resolves that.
Props Caspie, alex27, davidakennedy
Fixes#38396
git-svn-id: https://develop.svn.wordpress.org/trunk@38888 602fd350-edb4-49c9-b593-d223f7449a82
The link was scrolling too far. The main problem was that the `menuTop` variable lost it's initial definition of `0`, so all future subtractions were failing.
Props tywayne.
Fixes#38448.
git-svn-id: https://develop.svn.wordpress.org/trunk@38886 602fd350-edb4-49c9-b593-d223f7449a82
There is an incorrect use in twentyseventeen_posted_on(). This fixes that.
Props ocean90, dineshc, mbelchev, davidakennedy
Fixes#38383
git-svn-id: https://develop.svn.wordpress.org/trunk@38885 602fd350-edb4-49c9-b593-d223f7449a82
There are a handful of places where we don't check that the XML functions exist before we use them. Ubuntu's PHP 7 packages don't include PHP-XML by default, increasing the chance of this causing issues.
Props kraftbj, markoheijnen.
Fixes#37122.
git-svn-id: https://develop.svn.wordpress.org/trunk@38883 602fd350-edb4-49c9-b593-d223f7449a82
When a site is using a static front page, and that page is in a menu, it isn't given the CSS class `menu-item-home`, contrary to the developer documentation.
Props christophherr.
Fixes#35272.
git-svn-id: https://develop.svn.wordpress.org/trunk@38882 602fd350-edb4-49c9-b593-d223f7449a82
On the Header Image section, the previously uploaded images disappeared off-screen
when using the keyboard to navigate and the remove "X" button got keyboard focus.
Changing the off-screen CSS technique used for the "X" buttons fixes it.
- improves the focus style on the previously uploaded and suggested images
- removes a `tabindex="0"` attribute from the current header image
Fixes#38156.
git-svn-id: https://develop.svn.wordpress.org/trunk@38881 602fd350-edb4-49c9-b593-d223f7449a82
- changes the "X" links in buttons, improves their color contrast ratio and focus style
- adds screen reader text "Remove item: + tagname"
- uses `wp.a11y.speak()` to give screen reader users feedback when adding/removing tags
- makes the `tagcloud-link` toggle a button, with an `aria-expanded` attribute to indicate the tag cloud collapsed/expanded state
- changes colors for the autocomplete highlighted option in order to have a better color contrast ratio
- reduces the font size for the autocomplete on Press This
- removes CSS related to the old `suggest.js` from Press This
Props joedolson, cgrymala, azaozz, afercia.
Fixes#27555.
git-svn-id: https://develop.svn.wordpress.org/trunk@38880 602fd350-edb4-49c9-b593-d223f7449a82
With the new `strip_shortcodes_tagnames` filter you can specify which shortcodes are stripped by `strip_shortcodes()`. The default is all registered shortcodes.
Props DylanAuty, orvils, swissspidy.
Fixes#37767.
git-svn-id: https://develop.svn.wordpress.org/trunk@38877 602fd350-edb4-49c9-b593-d223f7449a82
Prevents sending users to wp-admin/profile.php if they only have access to wp-admin/user/profile.php.
Props dave.pullig.
Fixes#38451.
git-svn-id: https://develop.svn.wordpress.org/trunk@38876 602fd350-edb4-49c9-b593-d223f7449a82
This changes components directory to be called template-parts. Changes reflected in all files that call those sections.
Props bronsonquick, dd32
Fixes#38375
git-svn-id: https://develop.svn.wordpress.org/trunk@38875 602fd350-edb4-49c9-b593-d223f7449a82
The last commit to change directory structure for Twenty Seventee, didn't keep the file history so reverting in favour of doing that.
Props Ocean90
git-svn-id: https://develop.svn.wordpress.org/trunk@38874 602fd350-edb4-49c9-b593-d223f7449a82
This changes components directory to be called template-parts. Changes reflected in all files that call those sections.
Props bronsonquick, dd32
Fixes#38375
git-svn-id: https://develop.svn.wordpress.org/trunk@38873 602fd350-edb4-49c9-b593-d223f7449a82
Some comments to whitelist PHP_CodeSniffer errors were left in the theme as on GitHub it intergrated with Travis testing. Those are now removed in this patch.
props davidakennedy
git-svn-id: https://develop.svn.wordpress.org/trunk@38872 602fd350-edb4-49c9-b593-d223f7449a82