Commit Graph

35512 Commits

Author SHA1 Message Date
pento
2e9b3c22d8 General: Check to see that the PHP-XML module is enabled before using XML functions.
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
2016-10-24 04:44:07 +00:00
Gary Pendergast
1377523033 Menus: Add the menu-item-home class to the static front page.
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
2016-10-24 00:31:21 +00:00
Andrea Fercia
1574d89dfb Customize: Keep previously uploaded header images in place.
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
2016-10-23 19:56:43 +00:00
Andrea Fercia
e232ed28dc Accessibility: Improve the Tags meta box accessibility.
- 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
2016-10-23 18:15:07 +00:00
John Blackbourn
dcd129e5b8 REST API: Correct a documentation typo.
Props Zuige
Fixes #38458
See #38456


git-svn-id: https://develop.svn.wordpress.org/trunk@38879 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-23 15:55:53 +00:00
John Blackbourn
e02a26d1a5 REST API: Correct a documentation typo.
Props Zuige
Fixes #38458


git-svn-id: https://develop.svn.wordpress.org/trunk@38878 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-23 15:51:07 +00:00
Aaron D. Campbell
73a1aed2cd Shortcodes: Add new strip_shortcodes_tagnames filter.
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
2016-10-23 14:24:26 +00:00
Dominik Schilling (ocean90)
3a97668d06 Users: Use self_admin_url() for the email change confirmation link.
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
2016-10-23 14:01:53 +00:00
Tammie Lister
633c58b4e4 Twenty Seventeen: Renaming of directory structure
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
2016-10-23 12:28:27 +00:00
Tammie Lister
429527b0f3 Revert [38873]: Commit does not keep file history due to deleted directory
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
2016-10-23 12:22:25 +00:00
Tammie Lister
a5d69e176a Twenty Seventeen: Renaming of directory structure
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
2016-10-23 12:06:10 +00:00
Tammie Lister
9e253ab075 Twenty Seventeen: Remove whitelisting comments for PHP_Codesniffer
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
2016-10-23 11:05:14 +00:00
Pascal Birchler
4a65ecc64a Date/Time: Fix unit tests after [38804].
The tests for `date_i18n()` need to use a delta for comparing timestamps.

Fixes #38381. See #37910.

git-svn-id: https://develop.svn.wordpress.org/trunk@38871 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-23 07:18:21 +00:00
Peter Wilson
3f14125b2b Bundled theme: Add preconnect to fonts.gstatic.com in 2012-15 themes.
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
2016-10-23 01:55:49 +00:00
Peter Wilson
d792f370ef Emoji: Load polyfill responsibly.
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
2016-10-22 23:59:56 +00:00
David A. Kennedy
67d767514e Twenty Seventeen: Display featured image on static front page
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
2016-10-21 22:14:26 +00:00
David A. Kennedy
4b9833b656 Twenty Seventeen: Add theme support for customize selective refresh widgets
Props celloexpressions.

Fixes #38400.


git-svn-id: https://develop.svn.wordpress.org/trunk@38867 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 21:47:15 +00:00
David A. Kennedy
3e8333b0de Twenty Seventeen: Fix spacing issue on pages with comments
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
2016-10-21 20:50:36 +00:00
David A. Kennedy
90eddc0630 Twenty Seventeen: Add post author comment styles
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
2016-10-21 20:36:24 +00:00
Rachel Baker
39226db649 REST API: Allow comments to be created setting the user_agent parameter.
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
2016-10-21 18:27:18 +00:00
Dominik Schilling (ocean90)
ef43d7b0fa Revert [38859] due to an incomplete implementation.
See https://core.trac.wordpress.org/ticket/37128#comment:27.
See #37128.

git-svn-id: https://develop.svn.wordpress.org/trunk@38863 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 17:00:29 +00:00
Weston Ruter
2d7c2823b6 Customize: Revert part of [38859] which caused sections to get deactivated in the customizer.
See #37128.


git-svn-id: https://develop.svn.wordpress.org/trunk@38862 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 16:16:17 +00:00
John Blackbourn
f27fb3e91f Role/Capability: Add tests for the exist user capability.
See #38236


git-svn-id: https://develop.svn.wordpress.org/trunk@38861 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 14:11:10 +00:00
John Blackbourn
3808c8c21d Role/Capability: Improve the test which asserts that a user can edit their own profile.
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
2016-10-21 13:46:50 +00:00
Pascal Birchler
e4cbb7d031 General: Introduce a wp_list_sort() helper function.
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
2016-10-21 11:11:42 +00:00
Gary Pendergast
9d7e8fec8c Tests: Use a minimal theme for tests.
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
2016-10-21 11:02:37 +00:00
Sergey Biryukov
e7d639345f Remove an obsolete 1 == $total check in paginate_links().
`$total` cannot be a negative number since [4276].

Props jdgrimes.
Fixes #38421.

git-svn-id: https://develop.svn.wordpress.org/trunk@38857 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 10:45:21 +00:00
Pascal Birchler
5224e2bd84 I18N: Improve "Site Language" label for per-user language selection.
Renames the label to "Language" and adds an explanation of the feature to the help tab.

Props johnbillion, jorbin.
Fixes #38344.

git-svn-id: https://develop.svn.wordpress.org/trunk@38856 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 10:40:02 +00:00
Pascal Birchler
bb4da6448f Themes: After [38788], further improve the update button when there's no update package.
Prevents running shiny install when no package exists.


Fixes #37774.

git-svn-id: https://develop.svn.wordpress.org/trunk@38855 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 10:35:51 +00:00
Pascal Birchler
f508d80a1b List Tables: Do not show filter button when there are no filter options available.
Props juhise, dipesh.kakadiya, swissspidy.
Fixes #37407.

git-svn-id: https://develop.svn.wordpress.org/trunk@38854 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 10:32:55 +00:00
Weston Ruter
5fb3d3f279 Customize: Add sticky headers for panels and sections.
Includes autoprefixing of CSS.

Props delawski, celloexpressions.
See #35186.
Fixes #34343.


git-svn-id: https://develop.svn.wordpress.org/trunk@38853 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 06:36:57 +00:00
Gary Pendergast
2d6badf6ab Pings: Allow ping functions to accept WP_Post objects as well as post IDs.
This removes the use of several `global $wpdb` instances, as well as bringing the ping functions into line with other post-related functions, which will accept a post ID or `WP_Post` object.

Props dshanke.
Fixes #38202.



git-svn-id: https://develop.svn.wordpress.org/trunk@38852 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 05:59:34 +00:00
Gary Pendergast
9320e0775c Tests: Prevent Twenty Seventeen from interfering with Customizer ajax tests.
Missed in [38850].

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38851 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 05:50:54 +00:00
Gary Pendergast
90f8c9314a Tests: Prevent Twenty Seventeen from interfering with Customizer tests.
This was previously fixed in [38837], but it wasn't really the correct answer, to fix it in the theme. So, [38837] is reverted in this commit, and the Twenty Seventeen actions causing problems are unhooked before tests are run.

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38850 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 05:27:56 +00:00
Aaron Jorbin
a8aa7b0ca2 Cache API: introduce wp_cache_get_last_changed to improve DRY
One thing fairly common to the cache groups is a block of code to look to see when the cache was last changed, and if there isn't one, to set it for the current microtime(). It appears in 8 different places in core. This adds a new helper `wp_cache_get_last_changed` to DRY things up a bit.

Since `wp-includes/cache.php` isn't guaranteed to be loaded, this new function is in `wp-includes/functions.php`

Props spacedmonkey, desrosj.
Fixes #37464.



git-svn-id: https://develop.svn.wordpress.org/trunk@38849 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-21 02:53:19 +00:00
Aaron Jorbin
ce21d8210a Build/Test Tools: Allow Minimal Builds
Builds can hang or get very slow on copy when you have alot of files. Alot of files can suddenly appear when you are developing new themes or plugins. Often, it's nice to have a minimal build, especially if you are preparing a commit.

This adds a new flag `--minimal-copy` that can be added to any task which does a copy. These tasks include build, test, and copy. This flag will cause no plugins to be copied and only the twenty series of default themes to be copied. Everything else remains the same.

Fixes #38423.


git-svn-id: https://develop.svn.wordpress.org/trunk@38848 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 22:23:21 +00:00
David A. Kennedy
9aae3d9268 Twenty Seventeen: Replace inline control structure to improve code readability
Props vrundakansara, aaroncampbell.

Fixes #38384.


git-svn-id: https://develop.svn.wordpress.org/trunk@38847 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 22:17:35 +00:00
David A. Kennedy
4e786dcead Twenty Fifteen, Twenty Seventeen: Add documentation to filters in themes.
Documents a missing one Twenty Fifteen and all four missing ones in Twenty Seventeen.

Props brainstormforce.

Fixes #38382.


git-svn-id: https://develop.svn.wordpress.org/trunk@38846 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 20:33:38 +00:00
Boone Gorges
7babaafdbb Comments: Fix description for reverse_top_level argument in wp_list_comments().
It's a boolean, not a string. Introduced in [25567].

Props bcole808.
Fixes #38371.

git-svn-id: https://develop.svn.wordpress.org/trunk@38845 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 18:58:26 +00:00
Boone Gorges
12c72a7906 Query: Allow the prefix used for search term exclusion to be filtered.
[38792] allowed `WP_Query`'s hyphen-as-exclusion-prefix feature to be
disabled via filter. A more general solution is to allow the prefix to
be filtered; returning an empty value from a filter callback works to
disable the feature.

Props dlh.
Fixes #38099.

git-svn-id: https://develop.svn.wordpress.org/trunk@38844 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 18:41:22 +00:00
Boone Gorges
993d6fb898 Tests: Skip strip_invalid_text() test for big5 charset on MariaDB.
MariaDB doesn't support the tested configuration.

Props ocean90.
Fixes #33171.

git-svn-id: https://develop.svn.wordpress.org/trunk@38843 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 18:29:28 +00:00
Gary Pendergast
dad515b2a8 Tests: Fix ajax tests that fail when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38842 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 10:47:23 +00:00
Gary Pendergast
cf52caaac8 Twenty Seventeen: Remove some whitespace accidentally introduced in [38837].
See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38841 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 09:26:54 +00:00
John Blackbourn
29cfd0b336 oEmbed: Remove the oEmbed provider unit tests.
This reverts [38454] along with its follow-up commits, [38512], [38514], and [38692]. These tests are currently not pass
ing, and maybe they never will. The tests are in a group which does not run by default without a flag, making them quest
ionably useful.

We can re-visit this at a later date.

See #32360


git-svn-id: https://develop.svn.wordpress.org/trunk@38840 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 09:15:10 +00:00
Gary Pendergast
69623c6f43 Themes: Twenty Seventeen is now the default theme.
It's party time!

Fixes #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38839 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 09:12:39 +00:00
Gary Pendergast
b0e625bfdf Tests: Fix tests that don't pass when Twenty Seventeen is the default theme.
There are some tests who's outcome can be affected by the default theme, so we need to ensure the Twenty Seventeen functionality is unhooked while the tests are running.

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38838 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 09:06:11 +00:00
Gary Pendergast
420b6af50a Twenty Seventeen: Fix a PHP warning on fresh installs.
When setting the `transport` parameter on Customizer settings, we need to ensure the setting exists, particularly on new sites.

See #38372.



git-svn-id: https://develop.svn.wordpress.org/trunk@38837 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 09:03:09 +00:00
Gary Pendergast
c19e66bf87 Build: Ignore JSHint errors in Twenty Seventeen's third party libraries.
`html5.js` and `jquery.scrollTo.js` are external libraries, so don't need to be checked by JSHint.

Props kadamwhite.
Fixes #38376.



git-svn-id: https://develop.svn.wordpress.org/trunk@38836 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 05:43:09 +00:00
Rachel Baker
5a33080de0 REST API: Fix comment option leak causing another test failure.
Set the 'comment_whitelist' option back to the default when tearing down wpAllowComment tests.

See #38373.

git-svn-id: https://develop.svn.wordpress.org/trunk@38835 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 05:24:39 +00:00
Rachel Baker
72418d4bc1 REST API: Fix test failures.
- Fix leak in setup_notify_comment() test help by removing the comment_flood_filter.
- Correct uses of $term_taxonomy_id -> $term_id in Category and Tags routing.
- Temporarily remove the metadata tests for canola.jpg as that file does not have an exifdata.  Will need to update the test.

Props jorbin, rmccue, nacin
See #38373.

git-svn-id: https://develop.svn.wordpress.org/trunk@38834 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-20 05:12:26 +00:00