Commit Graph

37619 Commits

Author SHA1 Message Date
Weston Ruter
191beede5e File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.

Built from https://develop.svn.wordpress.org/trunk@41864


git-svn-id: http://core.svn.wordpress.org/trunk@41698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 05:37:51 +00:00
Weston Ruter
8562e4bfac Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.

Built from https://develop.svn.wordpress.org/trunk@41863


git-svn-id: http://core.svn.wordpress.org/trunk@41697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-15 04:59:10 +00:00
Felix Arntz
e4550efbb7 Multisite: Return get_current_blog_id() value instead of hard-coded 1 in get_main_site_id() for non-multisite environments.
See #41936.

Built from https://develop.svn.wordpress.org/trunk@41862


git-svn-id: http://core.svn.wordpress.org/trunk@41696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:46:48 +00:00
Felix Arntz
5ea3d62192 Multisite: Take WP_Network::$blog_id into account in get_main_site_id().
When the `WP_Network::$blog_id` property is set manually, for example in the multisite bootstrap process, `get_main_site_id()` should use that value instead of running its own logic. The main logic for the function was therefore moved into the internal `WP_Network::get_main_site_id()` method, which is now being accessed by the function through the magic property handling for `WP_Network::$blog_id` (and its equivalent `WP_Network::$site_id`).

Props spacedmonkey, jeremyfelt.
Fixes #41936.

Built from https://develop.svn.wordpress.org/trunk@41861


git-svn-id: http://core.svn.wordpress.org/trunk@41695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-14 22:42:54 +00:00
Weston Ruter
24d304a0a1 Customize: Fix positioning of device-previewed window when publish settings are open.
* Update date control padding.
* Collapse publish settings section when opening panes for available widgets or nav menus.
* Remove save and cog buttons in mobile preview only mode.
* Move definition of `wp.customize.previewedDevice` to `wp.customize.state('previewedDevice')` for centralization, maintaining old alias.
* Remove unused CSS because the section is inside form now.

Props sayedwp, westonruter.
See #39896.
Fixes #42027, #42199.

Built from https://develop.svn.wordpress.org/trunk@41860


git-svn-id: http://core.svn.wordpress.org/trunk@41694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 21:21:55 +00:00
Helen Hou-Sandí
e48b16d96a File editor warning: Add a "Go back" button.
see #42100, #31779.

Built from https://develop.svn.wordpress.org/trunk@41859


git-svn-id: http://core.svn.wordpress.org/trunk@41693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 20:56:50 +00:00
Weston Ruter
d975dccac9 Code Editor: Fix syntax error in PHP 5.2 and PHP 5.3 after [41855].
See #41871.

Built from https://develop.svn.wordpress.org/trunk@41858


git-svn-id: http://core.svn.wordpress.org/trunk@41692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 19:43:49 +00:00
Mel Choyce
e5db49d607 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.

Built from https://develop.svn.wordpress.org/trunk@41857


git-svn-id: http://core.svn.wordpress.org/trunk@41691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:39:48 +00:00
Adam Silverstein
59c3c7ae14 Media Grid: Fix escape key sometimes failing to close details modal.
Fix an issue where the escape key would no longer close the attachment details modal after attempting to navigate over the navigation boundaries (by clicking the left arrow key on the first media item or clicking the right arrow key on the last media item). Remove a focus blur which caused the underlying Backbone View to not receive the 'keydown' event.

Props subrataemfluence, afercia.
Fixes #42180.

Built from https://develop.svn.wordpress.org/trunk@41856


git-svn-id: http://core.svn.wordpress.org/trunk@41690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 18:21:49 +00:00
Weston Ruter
22ecf792b5 Code Editor: Add unit tests for wp_enqueue_code_editor() and WP_Widget_Custom_HTML.
Props ryotsun.
See #12423.
Fixes #41871.

Built from https://develop.svn.wordpress.org/trunk@41855


git-svn-id: http://core.svn.wordpress.org/trunk@41689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 17:58:46 +00:00
Mel Choyce
af6d136163 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

Props sami.keijonen, Mirucon, helen.
Fixes #42111.

Built from https://develop.svn.wordpress.org/trunk@41854


git-svn-id: http://core.svn.wordpress.org/trunk@41688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 14:39:54 +00:00
Weston Ruter
8af4e6e3f9 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.

Built from https://develop.svn.wordpress.org/trunk@41853


git-svn-id: http://core.svn.wordpress.org/trunk@41687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 08:23:50 +00:00
Weston Ruter
d44acf01dc Code Editor: Remove keeping track of wp.codeEditor instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.

Built from https://develop.svn.wordpress.org/trunk@41852


git-svn-id: http://core.svn.wordpress.org/trunk@41686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 04:34:52 +00:00
Weston Ruter
0659de4e21 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.

Built from https://develop.svn.wordpress.org/trunk@41851


git-svn-id: http://core.svn.wordpress.org/trunk@41685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:39:47 +00:00
Gary Pendergast
95cfb7f5e4 Login: Swap bloginfo() usage for get_bloginfo().
[41843] introduced a use of `bloginfo()`, where it should be using `get_bloginfo()`.

Props dlh.
Fixes #34625.


Built from https://develop.svn.wordpress.org/trunk@41850


git-svn-id: http://core.svn.wordpress.org/trunk@41684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-13 02:10:48 +00:00
Boone Gorges
a1879766ed Bump 'posts' query cache incrementor when modifying postmeta.
This ensures that the `get_pages()` query cache doesn't go stale when
postmeta is modified.

Props spacedmonkey.
Fixes #40669.
Built from https://develop.svn.wordpress.org/trunk@41849


git-svn-id: http://core.svn.wordpress.org/trunk@41683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 15:20:47 +00:00
Boone Gorges
0fce77da25 Invalidate comment query cache when modifying comment meta.
Comment queries are sensitive to comment meta due to the `meta_query`
parameter, so the cache must be invalidated when comment meta is changed,
added, or deleted.

Props spacedmonkey.
See #40669.
Built from https://develop.svn.wordpress.org/trunk@41848


git-svn-id: http://core.svn.wordpress.org/trunk@41682 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 14:59:47 +00:00
Weston Ruter
3bfe1f6c21 Post WordPress 4.9 Beta 2 version bump.
Built from https://develop.svn.wordpress.org/trunk@41847


git-svn-id: http://core.svn.wordpress.org/trunk@41681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 06:25:48 +00:00
Weston Ruter
2601b16e76 WordPress 4.9 Beta 2.
Built from https://develop.svn.wordpress.org/trunk@41846


git-svn-id: http://core.svn.wordpress.org/trunk@41680 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:43:47 +00:00
Weston Ruter
39a2308a94 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.

Built from https://develop.svn.wordpress.org/trunk@41845


git-svn-id: http://core.svn.wordpress.org/trunk@41679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:17:49 +00:00
Gary Pendergast
af83fe7fb9 Editor: Improve the accuracy of the list of shortcodes that the word count ignores.
Previously, shortcodes were being counted when the `init` action fired, even though it's possible for shortcodes to be registered later than that.

By leaving the counting until just before the script is printed, we get a more accurate list of shortcodes.

Props ocean90.
Fixes #41917.


Built from https://develop.svn.wordpress.org/trunk@41844


git-svn-id: http://core.svn.wordpress.org/trunk@41678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 05:10:50 +00:00
Gary Pendergast
a9d38090ac Login: On the single site login screen, match the logo link text with the title.
Previously, the (W) logo on the single site login screen linked to wordpress.org, with an appropriate `title` attribute, but the link text was the blog name.

To fix this discrepency, the link text is now the same as the `title` attribute.

Props pento, obrienlabs, afercia, flixos90, lukecavanagh, and the infinite stack of bikesheds that WordPress is balanced upon.
Fixes #34625.


Built from https://develop.svn.wordpress.org/trunk@41843


git-svn-id: http://core.svn.wordpress.org/trunk@41677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:57:46 +00:00
Weston Ruter
da565a20b9 Twenty Seventeen: Fix positioning of edit shortcuts when partials are nested inside a frontpage panel.
Fixes #41557.

Built from https://develop.svn.wordpress.org/trunk@41842


git-svn-id: http://core.svn.wordpress.org/trunk@41676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:44:45 +00:00
Gary Pendergast
8cb9f6159a Build/Test Tools: Revert [41784].
[41784] was a workaround for a bug in PHPUnit 6.4. PHPUnit 6.4.1 has since been released, which includes a fix for this.

Fixes #42124.


Built from https://develop.svn.wordpress.org/trunk@41841


git-svn-id: http://core.svn.wordpress.org/trunk@41675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:28:46 +00:00
Weston Ruter
663c20388b Widgets: Update default link_type for Gallery widget from none to post for consistency with wp.media.galleryDefaults.
Props bor0.
See #41914.
Fixes #41985.

Built from https://develop.svn.wordpress.org/trunk@41840


git-svn-id: http://core.svn.wordpress.org/trunk@41674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:21:46 +00:00
Weston Ruter
434e3aba82 Customize: Add changeset locking in Customizer to prevent users from overriding each other's changes.
* Customization locking is checked when changesets are saved and when heartbeat ticks.
* Lock is lifted immediately upon a user closing the Customizer.
* Heartbeat is introduced into Customizer.
* Changes made to user after it was locked by another user are stored as an autosave revision for restoration.
* Lock notification displays link to preview the other user's changes on the frontend.
* A user loading a locked Customizer changeset will be presented with an option to take over.
* Autosave revisions attached to a published changeset are converted into auto-drafts so that they will be presented to users for restoration.
* Focus constraining is improved in overlay notifications.
* Escape key is stopped from propagating in overlay notifications, and it dismisses dismissible overlay notifications.
* Introduces `changesetLocked` state which is used to disable the Save button and suppress the AYS dialog when leaving the Customizer.
* Fixes bug where users could be presented with each other's autosave revisions.

Props sayedwp, westonruter, melchoyce.
See #31436, #31897, #39896.
Fixes #42024.

Built from https://develop.svn.wordpress.org/trunk@41839


git-svn-id: http://core.svn.wordpress.org/trunk@41673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 04:01:46 +00:00
Mel Choyce
f44ed386c1 Media: Fix an issue where audio players overflow playlist containers.
Props celloexpressions.
Fixes #41844.

Built from https://develop.svn.wordpress.org/trunk@41838


git-svn-id: http://core.svn.wordpress.org/trunk@41672 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:55:46 +00:00
Mel Choyce
a19f05ad63 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.

Built from https://develop.svn.wordpress.org/trunk@41837


git-svn-id: http://core.svn.wordpress.org/trunk@41671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:53:47 +00:00
Mel Choyce
7e6748ad61 Settings: Widen image size input fields on Media Settings page.
On narrower devices, input fields are too short to fit the number of default digits they contain. This widens the fields and also breaks each height and width attribute onto a new line for better usability, using some terrible CSS trickery. My apologies.

Props: Toru, Presskopp, desrosj, xkon, ryelle, melchoyce.
Fixes #34539.

Built from https://develop.svn.wordpress.org/trunk@41836


git-svn-id: http://core.svn.wordpress.org/trunk@41670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 03:48:47 +00:00
Gary Pendergast
5a8d166547 General: Remove .jshintrc and *.json from the 2-space-indent .editorconfig group.
JSON files don't need a particular indent style, this was just inherited from the jQuery `.editorconfig`, that we based ours on.

`package.json` is staying in the 2-space-indent group for now, due to npm 3 and 4 having issues. Upgrading to npm 5 will allow us to remove `package.json`, too.

Props netweb.
Fixes #40946.


Built from https://develop.svn.wordpress.org/trunk@41835


git-svn-id: http://core.svn.wordpress.org/trunk@41669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-12 01:58:45 +00:00
Mel Choyce
009c3a94bb Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.

Built from https://develop.svn.wordpress.org/trunk@41834


git-svn-id: http://core.svn.wordpress.org/trunk@41668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 21:14:51 +00:00
Mel Choyce
71aa62101f Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.

Built from https://develop.svn.wordpress.org/trunk@41833


git-svn-id: http://core.svn.wordpress.org/trunk@41667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:45:49 +00:00
Weston Ruter
2866a3cad2 Customize: Vary description for nav menu locations control based on whether it is shown during menu creation.
Also fix issue with initial visibility of notice when there are no menus.

Amends [41823].
Props bpayton, melchoyce, westonruter.
See #42116.
Fixes #42113.

Built from https://develop.svn.wordpress.org/trunk@41832


git-svn-id: http://core.svn.wordpress.org/trunk@41666 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:38:50 +00:00
Mel Choyce
e8922f416e TinyMCE: Remove "Unlink" icon from toolbar
Because "unlink" now appears contextually when editing a link, let's remove it from the toolbar.

Props azaozz, ahortin, swissspidy, afercia.
Fixes #36569.

Built from https://develop.svn.wordpress.org/trunk@41831


git-svn-id: http://core.svn.wordpress.org/trunk@41665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 19:14:46 +00:00
Mel Choyce
39f3764a4b Code Editors: Improve cursor interactions on warning notices.
Fixes an issue where hovering over the warning icon didn't work if there were multiple warnings on the same line of code. Also updates the cursor from "pointer" to "help" when hovering over warnings and errors.

Props joyously, obenland.
Fixes #42129.

Built from https://develop.svn.wordpress.org/trunk@41830


git-svn-id: http://core.svn.wordpress.org/trunk@41664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 18:25:46 +00:00
Gary Pendergast
a72be13ec0 Editor: Add the replace_editor filter.
This filter allows the Core editor to be replaced by an entirely different editor (coughcoughGUTENBERGcough).

Props azaozz, who is supposed to be on sabbatical right now.
Fixes #42119.


Built from https://develop.svn.wordpress.org/trunk@41829


git-svn-id: http://core.svn.wordpress.org/trunk@41663 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 12:06:48 +00:00
Pascal Birchler
8b4a8b6c15 Database: Add translators comment for error message in wpdb::prepare().
Props felipeelia.
Fixes #42142.

Built from https://develop.svn.wordpress.org/trunk@41828


git-svn-id: http://core.svn.wordpress.org/trunk@41662 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 08:35:47 +00:00
Weston Ruter
3ba66a0030 Widgets: Update video widget embed failure notice to indicate streams other than YouTube and Vimeo are allowed.
Amends [41759].
See #42039.

Built from https://develop.svn.wordpress.org/trunk@41827


git-svn-id: http://core.svn.wordpress.org/trunk@41661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 06:22:47 +00:00
Weston Ruter
43801ded60 Customize: Make sure saved state is initially false when restoring autosave revision so that Save button will be enabled.
Amends [41597].
Props sayedwp.
See #39896.
Fixes #42143.

Built from https://develop.svn.wordpress.org/trunk@41826


git-svn-id: http://core.svn.wordpress.org/trunk@41660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:57:48 +00:00
Weston Ruter
b2c816ff74 Customize: Correct docs for WP_Customize_Manager::changeset_uuid() after changes in [41626].
Props dlh.
Fixes #42174.

Built from https://develop.svn.wordpress.org/trunk@41825


git-svn-id: http://core.svn.wordpress.org/trunk@41659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:45:46 +00:00
Weston Ruter
3f2b453a4d Customize: Introduce WP_Customize_Manager::trash_changeset_post() to reduce duplication and ensure proper changeset trashing logic.
Trashing a changeset via `wp_trash_post()` does not have the desired result since it mutates `post_content` (via Kses) and the `post_name` (even though it is a UUID).

Props dlh.
See #39896, #42030.
Fixes #42175.

Built from https://develop.svn.wordpress.org/trunk@41824


git-svn-id: http://core.svn.wordpress.org/trunk@41658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:42:49 +00:00
Weston Ruter
c6f2ff7a8e Customize: Add notice for when there are no nav menus created yet, prompting user to create one.
Props bpayton, melchoyce, westonruter.
Fixes #42116.

Built from https://develop.svn.wordpress.org/trunk@41823


git-svn-id: http://core.svn.wordpress.org/trunk@41657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 05:28:52 +00:00
Weston Ruter
36f8e77b49 Customize: Prevent outputting value attribute if already supplied among input_attrs.
This allows for `input[type=button]` controls to be added without producing illegal HTML.

Amends [41740].
See #30738, #33085.

Built from https://develop.svn.wordpress.org/trunk@41822


git-svn-id: http://core.svn.wordpress.org/trunk@41656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:26:48 +00:00
Dion Hulse
b35cf2f529 Upgrades: Remove the usage of each() from WP_Upgrader for PHP 7.2 compatibility.
Props chrisvendiadvertisingcom, dd32.
Fixes #41524

Built from https://develop.svn.wordpress.org/trunk@41821


git-svn-id: http://core.svn.wordpress.org/trunk@41655 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 04:24:50 +00:00
Gary Pendergast
fd247bc2e4 Database: When parsing the host, leave the port and socket as null if they're not defined.
This fixes a change in behaviour introduced by [41629].

The host is set to an empty string when it isn't defined, this continues existing behaviour. In particular, the mysqli library treats a `null` host as being the same as `localhost`, which is not always the intended behaviour.

Props birgire, markjaquith, pento.
Fixes #41722.


Built from https://develop.svn.wordpress.org/trunk@41820


git-svn-id: http://core.svn.wordpress.org/trunk@41654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:10:47 +00:00
Weston Ruter
3609d0c4c5 Plugin Editor: Revert superseded changes to activate_plugin() and plugin_sandbox_scrape().
Partially revert [41671], [41561], [41560].
See #21622.
Fixes #39766.

Built from https://develop.svn.wordpress.org/trunk@41819


git-svn-id: http://core.svn.wordpress.org/trunk@41653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-11 00:03:48 +00:00
Gary Pendergast
80fd3cad0d Database: Fix a test failing on MySQL 5.7 and MariaDB 10.2.
On newer versions of MySQL, an error was being thrown when creating a table with an index that we wanted to be silently truncated.

To avoid this, the test now tries to use a newer InnoDB file format where available, and skips the test when that happens.

Props pento, danielbachhuber, straussd.
Fixes #41716.


Built from https://develop.svn.wordpress.org/trunk@41818


git-svn-id: http://core.svn.wordpress.org/trunk@41652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:46:47 +00:00
Weston Ruter
5bde734323 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.

Built from https://develop.svn.wordpress.org/trunk@41817


git-svn-id: http://core.svn.wordpress.org/trunk@41651 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 23:45:51 +00:00
Weston Ruter
c1ede53374 Customize: Fix string translations for singular vs plural after [41812].
Props felipeelia, tobifjellner, SergeyBiryukov.
See #42112.
Fixes #42170.

Built from https://develop.svn.wordpress.org/trunk@41816


git-svn-id: http://core.svn.wordpress.org/trunk@41650 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 21:04:49 +00:00
Weston Ruter
5123283cf7 Customize: Improve and clarify help text for Themes panel.
Props michelleweber, melchoyce, celloexpressions.
See #37661.
Fixes #42047.

Built from https://develop.svn.wordpress.org/trunk@41815


git-svn-id: http://core.svn.wordpress.org/trunk@41649 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-10 20:53:49 +00:00