Commit Graph

35499 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90)
95fb8d8221 Upgrade: Add Twenty Seventeen to $_new_bundled_files.
This indicates that Twenty Seventeen should be installed with a WordPress upgrade.

See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38921 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:01:22 +00:00
Dominik Schilling (ocean90)
425589e77f Nav Menus: Update help text to include the two latest default themes, Twenty Sixteen and Twenty Seventeen.
See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38920 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 20:00:19 +00:00
Dominik Schilling (ocean90)
1f1a105820 Install: Update sidebars_widgets option for Twenty Seventeen to match its three sidebars.
See #38372.

git-svn-id: https://develop.svn.wordpress.org/trunk@38919 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 19:59:31 +00:00
David A. Kennedy
988e2d03b4 Twenty Seventeen: Refresh color patterns for changes in style.css
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
2016-10-25 19:59:11 +00:00
Jeremy Felt
13e2780b59 REST API: Adjust test_get_items_invalid_status_param_is_discarded() after [38911].
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
2016-10-25 19:33:34 +00:00
Jeremy Felt
1c034393f0 Options: Make $passed_default available in remaining default_option_{$option} filter.
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
2016-10-25 19:22:32 +00:00
Jeremy Felt
9543b9e259 Multisite: Replace get_blog_details() in wp-includes/ms-blogs.php with get_site().
Props flixos90.
See #37102.
Fixes #38351.


git-svn-id: https://develop.svn.wordpress.org/trunk@38915 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:49:03 +00:00
Jeremy Felt
148d7790d7 Multisite: Replace get_blog_details() in get_active_blog_for_user() with get_site().
Props flixos90.
Fixes #38355.


git-svn-id: https://develop.svn.wordpress.org/trunk@38914 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:05:20 +00:00
Jeremy Felt
764a31aaa9 Multisite: Introduce tests for get_active_blog_for_user().
Props flixos90.
See #38355.


git-svn-id: https://develop.svn.wordpress.org/trunk@38913 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 18:02:08 +00:00
Andrea Fercia
590a7de43b Menus: Improve the HTML semantics of the "Menu Settings" section.
- 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
2016-10-25 17:28:40 +00:00
Joe Hoyle
6d8e277152 REST API: Validate posts status enum
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
2016-10-25 17:12:18 +00:00
Joe Hoyle
57aec4798f Options: Add 'default' to register_setting
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
2016-10-25 17:07:20 +00:00
Tammie Lister
c388ff84ee Twenty Seventeen: Display scroll down arrow when no menu
This improves scrollability without a menu.

Props nnaimov, melchoyce, davidakennedy
Fixes #38392



git-svn-id: https://develop.svn.wordpress.org/trunk@38909 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 16:50:49 +00:00
Gary Pendergast
94201ff1f5 Tests: Fix a PHP notice introduced in [38907].
`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
2016-10-25 11:05:17 +00:00
Gary Pendergast
ee65fc1f80 Tests: Use a minimal theme for tests.
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
2016-10-25 10:24:57 +00:00
Weston Ruter
4e8410a886 Customize: Allow page stubs to be created via dropdown-pages controls in the Static Front Page section.
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
2016-10-25 06:30:27 +00:00
jeremyfelt
32fce2093c Multisite: Replace get_blog_details() with get_site() in is_user_member_of_blog().
Props flixos90.
Fixes #38358.


git-svn-id: https://develop.svn.wordpress.org/trunk@38905 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 06:01:03 +00:00
Jeremy Felt
0b0a009bfc Multisite: Replace get_blog_details() in ms_site_check() with get_site().
Props flixos90.
Fixes #38357.


git-svn-id: https://develop.svn.wordpress.org/trunk@38904 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:54:19 +00:00
Jeremy Felt
701dbe4271 Multisite: Replace get_blog_details() in add_user_to_blog() with get_site().
Adds tests for `add_user_to_blog()`.

Props flixos90.
Fixes #38356.


git-svn-id: https://develop.svn.wordpress.org/trunk@38903 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:48:22 +00:00
Jeremy Felt
9ae33a3be4 Multisite: Replace get_blog_details() with get_site() in get_dashboard_blog().
Props dipesh.kakadiya.
Fixes #38353.


git-svn-id: https://develop.svn.wordpress.org/trunk@38902 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 05:04:37 +00:00
Weston Ruter
e6425b0735 Customize: Prevent absent site icon link from outputting an empty string as href in customizer; use /favicon.ico as fallback.
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
2016-10-25 04:46:36 +00:00
Weston Ruter
31156b0bfb Customize: Skip attaching expansion event handlers to section containers with the cannot-expand class.
Props kkoppenhaver, celloexpressions.
Fixes #37980.


git-svn-id: https://develop.svn.wordpress.org/trunk@38900 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 04:36:00 +00:00
Dion Hulse
7e9848df2b Drop the requirement for the entry points to WordPress to be parsable by PHP4.
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
2016-10-25 03:14:31 +00:00
Dion Hulse
7aa09b6d24 Upgrade: Don't fail a core update just because readme.html or license.txt couldn't be modified.
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
2016-10-25 02:23:18 +00:00
Andrew Ozz
277bb681d7 TinyMCE: make keyboard shortcuts more discoverable by adding them to the buttons tooltips and in the Formats drop-down.
Props mor10, azaozz.
Fixes #38063.

git-svn-id: https://develop.svn.wordpress.org/trunk@38897 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 01:39:15 +00:00
Dion Hulse
7ae73a021a Revert the svn:ignore changes in [38394] which was missed in the original revert.
See #36335


git-svn-id: https://develop.svn.wordpress.org/trunk@38896 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 01:12:03 +00:00
Dion Hulse
3df3b11e98 HTTP: Call mbstring_binary_safe_encoding() before making a request with Requests to avoid issues with mbstring.func_overload.
Props SergeyBiryukov.
Fixes #38226.


git-svn-id: https://develop.svn.wordpress.org/trunk@38894 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 00:44:13 +00:00
Dion Hulse
cedd323452 Docs: Correct a number of typos/spelling mistakes in inline comments.
Props ottok.
Fixes #38464.


git-svn-id: https://develop.svn.wordpress.org/trunk@38893 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-25 00:37:50 +00:00
Tammie Lister
edf8779f71 Twenty Seventeen: Resolves the pin icon having variations
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
2016-10-24 22:29:42 +00:00
Andrew Ozz
c108fdc0ba TinyMCE: change the icon and tooltip for the remove link button in the inline link toolbar.
Props hardeepasrani, ocean90, magicroundabout, iseulde.
Fixes 37278.

git-svn-id: https://develop.svn.wordpress.org/trunk@38891 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 21:57:22 +00:00
Weston Ruter
a89aef0f6e Customize: Harden url matching to account for varying ports and ensuring matching base pathname for allowed urls
Fixes #38409.


git-svn-id: https://develop.svn.wordpress.org/trunk@38890 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 20:06:06 +00:00
Weston Ruter
b5bc4fde53 Customize: Fix live preview button in theme details modal so it includes target theme.
Fixes issue introduced in [38813].

Props celloexpressions.
See #37661.
Fixes #38475.


git-svn-id: https://develop.svn.wordpress.org/trunk@38889 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 19:14:26 +00:00
Tammie Lister
71cbe11ee3 Twenty Seventeen: iPad mini, iPhone 5 search form rendering issues fix
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
2016-10-24 19:10:59 +00:00
Weston Ruter
81c6e564fc Customize: Disable theme installation in multisite.
Props celloexpressions, iamfriendly.
Fixes #38370.


git-svn-id: https://develop.svn.wordpress.org/trunk@38887 602fd350-edb4-49c9-b593-d223f7449a82
2016-10-24 18:16:41 +00:00
David A. Kennedy
ad319b1b1f Twenty Seventeen: Fix smooth scrolling skip link
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
2016-10-24 17:58:18 +00:00
Tammie Lister
58075601c6 Twenty Seventeen: Fixes incorrect use of _x()
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
2016-10-24 17:26:45 +00:00
John Blackbourn
f948218d0f General: Correct the docs for the default HTTP status code used by wp_die().
See #37770


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