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
Add preconnect hinting for `https://fonts.gstatic.com` in the bundled themes using Google fonts. WordPress versions 4.7+ include a crossorigin attribute, earlier versions will not.
Props leobaiano, swissspidy, peterwilsoncc.
Fixes#37171.
git-svn-id: https://develop.svn.wordpress.org/trunk@38870 602fd350-edb4-49c9-b593-d223f7449a82
Improve performance of Emoji tests and loading of the polyfill.
Reduces the number of tests to determine browser support for emoji to those most likely to fail. Adds the defer flag to the loaded scripts for browsers lacking support.
Props superpoincare for perf testing, peterwilsoncc.
Fixes#37817.
git-svn-id: https://develop.svn.wordpress.org/trunk@38869 602fd350-edb4-49c9-b593-d223f7449a82
This improves UX, since an image added will be displayed on front end as opposed to not at all. This fix added the front page's featured image above the front page content, similar to how it's handled in the other panels. Also it removed code that was setting the front page's featured image as a fallback to the custom header, and updated the conditions that add the `has-header-image` to remove reference to the front page's featured image.
Props laurelfulford.
Fixes#38402.
git-svn-id: https://develop.svn.wordpress.org/trunk@38868 602fd350-edb4-49c9-b593-d223f7449a82
This effected the two column layout on pages. The entry content and comment areas needed to be floated and cleared properly.
Props laurelfulford.
Fixes#38388.
git-svn-id: https://develop.svn.wordpress.org/trunk@38866 602fd350-edb4-49c9-b593-d223f7449a82
Currently, it's hard to output an SVG in the comment function without a lot of extra effort. So this adds a simple border to the author avatar and removes previous code related to SVGs and/or Genericons.
Props laurelfulford.
Fixes#38403.
git-svn-id: https://develop.svn.wordpress.org/trunk@38865 602fd350-edb4-49c9-b593-d223f7449a82
As of WordPress 4.3 the `wp_new_comment()` function has been updated to allow the comment_agent value to be set when a comment is created. The comments API endpoint now allows the comment author's user agent to be set when creating a comment.
Also, the `readonly` property on the `author_user_agent` parameter in the schema was removed.
Props rabmalin for the initial patch.
Fixes#38425.
git-svn-id: https://develop.svn.wordpress.org/trunk@38864 602fd350-edb4-49c9-b593-d223f7449a82
All users can edit their own profile, as this ability is not linked to an explicit capability. Technically, it should map to the `exist` capability, which will be addressed at a later date.
See #31518
git-svn-id: https://develop.svn.wordpress.org/trunk@38860 602fd350-edb4-49c9-b593-d223f7449a82
In addition to `wp_list_filter()` for filtering a list of objects, and `wp_list_pluck()` for plucking a certain field out of each object in a list, this new function can be used for sorting a list of objects by specific fields. These functions are now all contained within the new `WP_List_Util()` class and `wp_list_sort()` is used in various parts of core for sorting lists.
Props flixos90, DrewAPicture, jorbin.
Fixes#37128.
git-svn-id: https://develop.svn.wordpress.org/trunk@38859 602fd350-edb4-49c9-b593-d223f7449a82
New default themes require workarounds being added to several unit tests, as they often alter default WordPress behaviour. To avoid ongoing maintenance issues, this change switches to a minimal theme when running tests.
This change also removes the old workarounds for default themes.
Fixes#31550.
git-svn-id: https://develop.svn.wordpress.org/trunk@38858 602fd350-edb4-49c9-b593-d223f7449a82