Commit Graph

5472 Commits

Author SHA1 Message Date
Sergey Biryukov
a8518be72b Network Admin: After [41923], move the second <p> tag to a new line for better readability.
See #41652.

git-svn-id: https://develop.svn.wordpress.org/trunk@41924 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 20:50:58 +00:00
Sergey Biryukov
76c2aa8c85 I18N: Remove hardcoded constant from a translatable string in network_step1().
Props ramiy.
Fixes #41652.

git-svn-id: https://develop.svn.wordpress.org/trunk@41923 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 20:01:36 +00:00
Sergey Biryukov
beeb0acd94 I18N: Combine two "Warning" strings in network_step1() and network_step2().
Props ramiy.
Fixes #38570.

git-svn-id: https://develop.svn.wordpress.org/trunk@41921 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 19:49:17 +00:00
Weston Ruter
349ccdf2d7 Customize: Fix visibility of overlay notifications in Safari.
Props sayedwp, westonruter.
Amends [41390].
See #35210, #42024, #42052.


git-svn-id: https://develop.svn.wordpress.org/trunk@41919 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:12:29 +00:00
Sergey Biryukov
88a6ebaa75 Plugins: Revert unintended change from [41915].
See #37430.

git-svn-id: https://develop.svn.wordpress.org/trunk@41916 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 18:00:54 +00:00
Sergey Biryukov
93a3fa4506 Plugins: After [41608], make the markup in WP_Plugin_Install_List_Table::no_items() a bit more readable.
See #37430.

git-svn-id: https://develop.svn.wordpress.org/trunk@41915 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:58:00 +00:00
Sergey Biryukov
dca34e10d5 Docs: Add @since entry for WP_Automatic_Updater::after_core_update(), introduced in [25841].
See #41017, #29086.

git-svn-id: https://develop.svn.wordpress.org/trunk@41914 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:47:34 +00:00
Weston Ruter
a7c6a25eba Widgets: Fix previewing embeds in Text widget by allowing parse-embed admin ajax requests with an empty post_ID just as WP_oEmbed_Controller::get_proxy_item_permissions_check() allows.
As of #34115 if there is no post context the oEmbed will be cached in an `oembed_cache` custom post type, so having a post as context is no longer a requirement for caching.

Props biskobe, westonruter.
See #34115, #40450.
Fixes #40854.


git-svn-id: https://develop.svn.wordpress.org/trunk@41913 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:39:46 +00:00
Sergey Biryukov
aa3e40c32c I18N: Remove <b> tag from a translatable string in post_submit_meta_box().
Props ramiy.
Fixes #41681.

git-svn-id: https://develop.svn.wordpress.org/trunk@41910 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:30:35 +00:00
Sergey Biryukov
c7e02480bb I18N: Remove <strong> tag from a translatable string in Theme_Upgrader::install_strings().
Props ramiy.
Fixes #41695.

git-svn-id: https://develop.svn.wordpress.org/trunk@41909 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:19:21 +00:00
Sergey Biryukov
8aaf0aa4bc I18N: Remove <code> tags from translatable strings in Core_Upgrader, Language_Pack_Upgrader, Plugin_Upgrader, Theme_Upgrader.
Props ramiy.
Fixes #41705.

git-svn-id: https://develop.svn.wordpress.org/trunk@41908 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 17:14:58 +00:00
Sergey Biryukov
129c9f42da I18N: Replace hardcoded file name in a translatable string in convert_to_screen() with a placeholder.
Props ramiy.
Fixes #41668.

git-svn-id: https://develop.svn.wordpress.org/trunk@41906 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:45:48 +00:00
Sergey Biryukov
facb2fe0ea I18N: Replace hardcoded file name in translatable strings in wp-admin/setup-config.php with a placeholder.
Props ramiy, danieltj.
Fixes #42161.

git-svn-id: https://develop.svn.wordpress.org/trunk@41904 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:26:10 +00:00
Konstantin Obenland
e27c43d386 Customize: Unstick filter pane in Theme selector
Prevents the filter pane from blocking the view of theme search results when it's open.
Users are now able to just scroll to view results.

Props rclations.
Fixes #42212.


git-svn-id: https://develop.svn.wordpress.org/trunk@41903 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 15:10:19 +00:00
Gary Pendergast
3afcaa1374 Dashboard: Ensure the "Dismiss" button on the Gutenberg callout is clickable.
Who likes z-index? We like z-index!

Props joemcgill.
See #41316.




git-svn-id: https://develop.svn.wordpress.org/trunk@41900 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:54:39 +00:00
Konstantin Obenland
043609bca4 Customize: Allow menu creation in locations pane
Adds a link to the menu creation workflow from the locations selector in the nav menu control.

Props bpayton, westonruter, Travel_girl, melchoyce, celloexpressions.
Fixes #36279.


git-svn-id: https://develop.svn.wordpress.org/trunk@41899 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 14:50:34 +00:00
Mel Choyce
6f326e407d Code Editors: Fix display of "help" cursor.
Props studionashvegas .
Fixes #42210.


git-svn-id: https://develop.svn.wordpress.org/trunk@41897 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 13:10:16 +00:00
Gary Pendergast
65585359c3 Dashboard: Remove a rogue comma introduced in [41895].
See #41316.



git-svn-id: https://develop.svn.wordpress.org/trunk@41896 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 12:39:00 +00:00
Gary Pendergast
5fa59cf197 Dashboard: Introduce a "Try Gutenberg" callout.
To encourage more people to try Gutenberg, this new Dashboard box allows site users to easily install and try out Gutenberg.

Props pento, melchoyce, joen, karmatosed.
Fixes #41316.



git-svn-id: https://develop.svn.wordpress.org/trunk@41895 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 10:03:39 +00:00
Weston Ruter
18057a93a2 Customize: Improve theme browsing UI on small screens.
Props Mahvash-Fatima, melchoyce, celloexpressions.
See #37661.
Fixes #42215.


git-svn-id: https://develop.svn.wordpress.org/trunk@41893 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-18 04:05:03 +00:00
Weston Ruter
ce7a93c235 Customize: Allow post/page stubs to be edited in WP Admin as "customization drafts" when changeset is saved as draft or scheduled.
* Update stubs to have draft status when changeset is saved as draft, instead of preventing auto-draft garbage collection by giving them a far-future `post_date`.
* Show notice in publish metabox when editing a customization draft indicating that it will be published automatically with its changeset; a link to Customizer is included.
* Include a new "Customization Draft" display post state in the post list table.
* Disconnect stubs from their changesets when they are updated with a status other than "Draft".
* Trash customization drafts when their related changeset is trashed or deleted.
* Add a `_customize_changeset_uuid` postmeta to stubs to link them with their associated changeset.
* Include `customize_changeset_uuid` as context when requesting to insert a new auto-draft.

Props westonruter, melchoyce.
See #39896, #39752, #34923.
Fixes #42220.


git-svn-id: https://develop.svn.wordpress.org/trunk@41887 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-17 20:14:56 +00:00
Helen Hou-Sandi
652c632355 Code Editors: Minor style improvements.
props melchoyce.
see #42214.


git-svn-id: https://develop.svn.wordpress.org/trunk@41882 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 21:35:15 +00:00
Andrea Fercia
d273fd8da1 Administration: Improve consistency of the "not found" strings.
Partially reverts [41608] restoring the original strings without the word `query`.

See #37430.
Fixes #42231.


git-svn-id: https://develop.svn.wordpress.org/trunk@41878 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 18:13:50 +00:00
Andrea Fercia
9dfb758afc Accessibility: Improve the File Editors interstitial warning.
The warning displayed upon first visit on the File Editors introduced in [41774]
needs to be the only perceivable content in the page for users of assistive
technologies. It looks like a modal but it's not exactly an ARIA dialog, not an
ARIA alert either, and needs some special treatment.

- constrains tabbing within the modal
- uses `wp.a11y.speak()` to make screen readers announce the modal message
- hides all the other page content from assistive technologies using `aria-hidden="true"`

This way, even if users miss the speak message, the warning is actually the only
perceivable content in the page.

Fixes #42110.


git-svn-id: https://develop.svn.wordpress.org/trunk@41876 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 17:58:07 +00:00
Sergey Biryukov
b0400815a5 Administration: Remove punctuation from the link text in "Site Address" option description.
Props Presskopp.
Fixes #42190.

git-svn-id: https://develop.svn.wordpress.org/trunk@41874 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 14:01:41 +00:00
Weston Ruter
8661837eb9 Customize: Use keydown instead of keyup for listening for enter key to add page stub via dropdown-pages control.
Fixes issue with Japanese input.

Props miyauchi.
Amends [38906].
See #34923.
Fixes #42233.


git-svn-id: https://develop.svn.wordpress.org/trunk@41873 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 07:56:28 +00:00
Weston Ruter
850db3c6a0 Widgets: Update preview for Gallery widget when one of its attachments is modified in the media modal, outside the customized state.
* Ensure that changes to captions are shown in preview when modified in media modal.
* Also keep `wp.customize.widgetsPreview.renderedWidgets` updated when widgets are added or removed.

See #41914, #37887, #40403.
Fixes #41979.


git-svn-id: https://develop.svn.wordpress.org/trunk@41872 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 06:45:09 +00:00
Weston Ruter
75034a401f Customize: Prevent theme details modal from being clipped in Safari.
Props afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41871 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-16 04:40:13 +00:00
Weston Ruter
97c5985748 Customize: Add 'save-request-params' event on wp.customize for plugins to inject/modify params in save requests.
Allows feature plugins, for example, to supply a `customize_changeset_title` param instead of having to wrap `wp.customize.previewer.query`.

Props dlh.
Fixes #42206.


git-svn-id: https://develop.svn.wordpress.org/trunk@41869 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:42:00 +00:00
Weston Ruter
0e8b17dd64 Widgets: Rename "Custom Menu" widget to "Navigation Menu".
Props gk.loveweb, ChrisHardie, ajayghaghretiya1, melchoyce.
Fixes #40442.


git-svn-id: https://develop.svn.wordpress.org/trunk@41868 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 22:22:59 +00:00
Weston Ruter
cabd02a137 File Editor: Move inline to external style to fix extra padding in RTL page direction.
Props afercia.
Fixes #42221.


git-svn-id: https://develop.svn.wordpress.org/trunk@41865 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:50:43 +00:00
Weston Ruter
93bb527725 File Editor: Prevent the scrolling of current-file into view to also change initially-focused element in Chrome.
Props afercia.
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41864 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 05:36:10 +00:00
Weston Ruter
c8889350e7 Customize: Fix visibility of theme browser header in Safari.
Props benoitchantre, afercia.
See #42052, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41863 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-15 04:57:46 +00:00
Weston Ruter
a626ef6c81 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41860 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 21:20:42 +00:00
Helen Hou-Sandi
99cff48f61 File editor warning: Add a "Go back" button.
see #42100, #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41859 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 20:55:50 +00:00
Mel Choyce
e6908acb82 Settings: Widen time/day input fields on General Settings page, and move the preview onto the next line.
Props desrosj, afercia.
Fixes #41603.


git-svn-id: https://develop.svn.wordpress.org/trunk@41857 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 18:38:03 +00:00
Mel Choyce
99e6a95331 Improve File Credentials / Code Editor modal responsive styles.
Makes the modal full-width and height. 

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


git-svn-id: https://develop.svn.wordpress.org/trunk@41854 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 14:39:00 +00:00
Weston Ruter
5ea6f41597 Customize: Fix positioning of Preview button in mobile.
Props Mahvash-Fatima.
Fixes #42172.


git-svn-id: https://develop.svn.wordpress.org/trunk@41853 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 08:22:56 +00:00
Weston Ruter
27a33509fb Code Editor: Remove keeping track of wp.codeEditor instances since unused and no removal of instances upon deletion, leading to memory leak.
See #12423.


git-svn-id: https://develop.svn.wordpress.org/trunk@41852 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 04:33:26 +00:00
Weston Ruter
8bf9afb4f4 File Editors: Display list of theme/plugin files in scrollable directory tree.
Props WraithKenny, afercia, melchoyce, westonruter.
Amends [41721].
Fixes #24048.


git-svn-id: https://develop.svn.wordpress.org/trunk@41851 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-13 02:38:19 +00:00
Weston Ruter
88c2d8ba25 Customize: Prevent showing confirmation dialog when leaving Customizer after previewing theme switch without making any changes.
Fixes #42173.


git-svn-id: https://develop.svn.wordpress.org/trunk@41845 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 05:16:40 +00:00
Weston Ruter
bb63758be8 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41839 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 04:00:15 +00:00
Mel Choyce
4e13eb54c2 Customizer: Improve specificity of small-screen styles in Widgets panel.
Props mrasharirfan, celloexpressions.
Fixes #41614.


git-svn-id: https://develop.svn.wordpress.org/trunk@41837 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:52:42 +00:00
Mel Choyce
cf7cba3194 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41836 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-12 03:47:29 +00:00
Mel Choyce
9f7e06e855 Gallery Widget: Fix row spacing across major browsers.
Props petertoi .
Fixes #42188.


git-svn-id: https://develop.svn.wordpress.org/trunk@41834 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 21:13:33 +00:00
Mel Choyce
f6d84dbe31 Gallery Widget: Remove grey background behind gallery, and align images to the edge of the container.
Props Presskopp, benoitchantre, mrasharirfan.
Fixes #42101.


git-svn-id: https://develop.svn.wordpress.org/trunk@41833 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:44:18 +00:00
Weston Ruter
725a161456 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41832 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 19:37:10 +00:00
Mel Choyce
e700ea5afe 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41830 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 18:24:10 +00:00
Gary Pendergast
3b734f0e65 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@41829 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 12:05:21 +00:00
Weston Ruter
1c9c97fd02 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@41826 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:56:40 +00:00
Weston Ruter
1cff26c4b7 Customize: Add notice for when there are no nav menus created yet, prompting user to create one.
Props bpayton, melchoyce, westonruter.
Fixes #42116.


git-svn-id: https://develop.svn.wordpress.org/trunk@41823 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 05:27:05 +00:00
Dion Hulse
4b2b97a3b3 Upgrades: Remove the usage of each() from WP_Upgrader for PHP 7.2 compatibility.
Props chrisvendiadvertisingcom, dd32.
Fixes #41524


git-svn-id: https://develop.svn.wordpress.org/trunk@41821 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 04:23:49 +00:00
Weston Ruter
32e7a51a01 Plugin Editor: Revert superseded changes to activate_plugin() and plugin_sandbox_scrape().
Partially revert [41671], [41561], [41560].
See #21622.
Fixes #39766.


git-svn-id: https://develop.svn.wordpress.org/trunk@41819 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-11 00:02:30 +00:00
Weston Ruter
77c6dc7fd8 Customize: Fix vertical alignment of radio and checkbox inputs after [41740].
Props Shital Patel, subrataemfluence, sayedwp.
Amends [41740].
See #33085.
Fixes #42157.


git-svn-id: https://develop.svn.wordpress.org/trunk@41817 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 23:44:35 +00:00
Weston Ruter
89aef850c2 Widgets: Clear dirty flag on widgets admin screen when widget is deleted to prevent irrelevant confirmation prompt when leaving.
Props hazimayesh, felipeelia.
Amends [41352], [41813].
See #23120, #42127.
Fixes #41894.


git-svn-id: https://develop.svn.wordpress.org/trunk@41814 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 20:38:22 +00:00
Weston Ruter
6bbf13852b Widgets: Allow deletion even when widget form fails validity checks.
Props felipeelia.
Amends [41352].
See #23120.
Fixes #42127.


git-svn-id: https://develop.svn.wordpress.org/trunk@41813 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 18:06:24 +00:00
Mel Choyce
0bf42bf3b7 Customizer: Vertically center section arrows.
Props dualcube_subrata.
Fixes #42123.


git-svn-id: https://develop.svn.wordpress.org/trunk@41808 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 16:22:34 +00:00
Weston Ruter
f2f3a883d7 Customize: Improve behavior and extensibility of theme loading and searching.
* Introduce `WP_Customize_Themes_Section::$filter_type`, which has built-in functionality for `local` and `remote` filtering. When this set to `local`, all themes are assumed to be loaded from Ajax when the section is first loaded, and subsequent searching/filtering is applied to the loaded collection of themes within the section. This is how the core "Installed" section behaves - third-party sources with limited numbers of themes may consider leveraging this implementation. When this is set to `remote`, searching and filtering always triggers a new remote query via Ajax. The core "WordPress.org" section uses this approach, as it has over 5000 themes to search.
* Refactor `filterSearch()` to accept a raw term string as input. This enables a feature filter to be used on a section where `filter_type` is `local`.
* Refactor `filter()` on a theme control to check for an array of terms. Also sort the results by the number of matches. Rather than searching for an exact match, this will now search for each word in a search distinctly, allowing things like tags to rank in search results more accurately.
* Split `loadControls()` into two functions for themes section JS: `loadThemes()` to initiate and manage an Ajax request and `loadControls()` to create theme controls based on the results of the Ajax call. If third-party sections need to change the way controls are loaded, such as by using a custom control subclass of `WP_Customize_Theme_Control`, this allows them to use the core logic for managing the Ajax call and only override the actual control-creation process.
* Introduce `customize_load_themes` filter to facilitate loading themes from third-party sources (or modifying the results of the core sections).
* Bring significant improvements to the installed themes search filter.

Props celloexpressions.
Amends [41648].
See #37661.
Fixes #42049.


git-svn-id: https://develop.svn.wordpress.org/trunk@41807 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 07:08:51 +00:00
Gary Pendergast
33a0ff50b7 File Editor: Add support for more than one sub-directory level.
The theme and plugin editors now list all files in the selected theme or plugin, recursing through subdirectories as necessary.

Props WraithKenny, schlessera, chsxf, MikeHansenMe, Daedalon, valendesigns, westonruter, pento.
Fixes #6531.



git-svn-id: https://develop.svn.wordpress.org/trunk@41806 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 05:33:57 +00:00
Weston Ruter
5deddd9c62 File Editor: Increase robustness of fatal error checking when saving PHP file edits.
* Increase PHP execution time limit prior to issuing loopback requests where are themselves given timeouts to ensure PHP file can be reverted.
* Output scrape messages on success and failure so that absence of either can also be flagged as an error condition.
* Forward browser's HTTP Basic Auth credentials in loopback requests to admin and home URL.
* Display more helpful message when loopback request fails.

Amends [41721].
See #21622.
Fixes #42102.


git-svn-id: https://develop.svn.wordpress.org/trunk@41805 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 05:26:53 +00:00
Weston Ruter
52ef606823 Customize: Constrain focus when overlay notification is displayed.
* Restore previously-focused element when overlay notifications are dismissed.
* Allow notifications to be dismissed via keyboard.

Amends [41667].
See #42110, #35210, #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41803 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-10 03:33:57 +00:00
Weston Ruter
a4dab604fb Customize: Improve keyboard accessibility for publish settings section.
Props sayedwp.
See #39896.
Fixes #42027.


git-svn-id: https://develop.svn.wordpress.org/trunk@41802 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 23:00:39 +00:00
Weston Ruter
0e91bb3610 Customize: Add jsdoc for api.panel, api.section, api.control, and api.notifications collections.
Props shramee, westonruter.
Fixes #39930.


git-svn-id: https://develop.svn.wordpress.org/trunk@41799 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 18:55:44 +00:00
Weston Ruter
153dd26c1f Customize: Eliminate use of customize-loader in core so Customizer is opened consistently in top window.
* Open the door for future browser history feature in #28536, which is currently not feasible when customize-loader is used.
* Remove customizer-loader from being used on admin screens for Dashboard, Themes, non-shiny theme install/update.
* Keep the customize-loader functionality available for plugins, for the time being. It may become deprecated.
* Ensure `return` param in customizer links in Themes screen update to reflect `search` updated by `pushState`.
* Persist `return` when reloading Customizer due to theme switch, autosave restoration, or changeset trashing.
* Use `location.replace()` instead of changing `location.href` when trashing.
* Hide theme browser while Themes screen is loading when there is a `search` to prevent flash of unfiltered themes.
* Use throttling instead of debouncing when searching themes to ensure that screen is updated immediately on page load.
* Fix encoding and decoding of `search` param between URL and search field.
* Add support for dismissing autosaves when closing customize-loader, when it is used by plugins.
* Skip sending changeset UUID to customize-loader for population in browser location if changeset branching is not enabled.

See #28536.
Fixes #40254.


git-svn-id: https://develop.svn.wordpress.org/trunk@41797 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 16:03:35 +00:00
John Blackbourn
6c1ec3088a Users: Remove some links to the dashboard from My Sites for users who cannot access it.
See #41453


git-svn-id: https://develop.svn.wordpress.org/trunk@41796 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 15:21:51 +00:00
John Blackbourn
c8a0c7f7d8 Press This: Use "installation" when referring to the act of installing Press This.
Props Presskopp
Fixes #41620


git-svn-id: https://develop.svn.wordpress.org/trunk@41794 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-09 14:07:42 +00:00
Weston Ruter
6f4866bada Customize: Fix confusion related to visibility of Themes panel with drafted/scheduled changesets.
* Prevent autoloading an existing draft/future changeset when theme not active.
* Add missing notifications container to Themes panel.
* Remove deactivation of themes panel when selected status is not publish.
* Show notification in Themes panel when themes cannot be previewed and disable preview buttons.
* Reject installTheme call when theme preview not available.
* Return promise from installTheme and eliminate use of global events in favor of promises.

Props westonruter, melchoyce, zoonini.
See #37661, #39896.
Fixes #42126.



git-svn-id: https://develop.svn.wordpress.org/trunk@41788 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-07 05:59:45 +00:00
Sergey Biryukov
944d28b6e4 Editor: Fix JSHint errors after [41783].
See #42059.

git-svn-id: https://develop.svn.wordpress.org/trunk@41785 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 19:11:35 +00:00
Andrew Ozz
ef701b01e9 Editor:
- Fix keeping text selection and scroll position when there are embeds from URL.
- Add editor setting to disable keeping selection and scroll position.
- Remove dependency on Underscore.js.
- Fix error in the Text widget editor.

Props biskobe.
Fixes #42059, see #40854.

git-svn-id: https://develop.svn.wordpress.org/trunk@41783 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-06 17:43:11 +00:00
Weston Ruter
b7eac77fde Customize: Prevent color default control type from overriding template for ColorControl.
Amends [41771].
See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41778 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 14:35:30 +00:00
Weston Ruter
92a4302940 File Editors: Fix JSHint error after [41774].
See #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41775 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:42:58 +00:00
Helen Hou-Sandi
fcf8dfd376 File Editors: Introduce an interstitial warning upon first visit.
This is an effort to provide a speed bump before heading into something potentially destructive and some education for users on better alternatives, even as we make the file editors safer to use. Each user, including existing users, will be shown a one-time dismissible modal warning on their first visit to each of the theme and plugin file editors.

Copy tweaks to come.

props michelleweber, Ipstenu, melchoyce, adamsilverstein, westonruter, toddnestor, aryamaaru, ZaneMatthew, cliffseal, helen.
fixes #31779.


git-svn-id: https://develop.svn.wordpress.org/trunk@41774 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 04:24:52 +00:00
Weston Ruter
f23be16bd2 Customize: Add default control template for standard input types.
Re-use default template instead of introducing custom one for the Discard Changes button.

See #30738.


git-svn-id: https://develop.svn.wordpress.org/trunk@41771 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:55:11 +00:00
Sergey Biryukov
eb4f4bc87e Administration: Add .protected-post-excerpt class to password-protected post excerpts in the posts list.
Props Soean, mp518, slaFFik, SergeyBiryukov.
Fixes #41426.

git-svn-id: https://develop.svn.wordpress.org/trunk@41770 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:49:15 +00:00
Weston Ruter
fb28cd4663 Customize: Improve the menu creation flow.
Often, folks run into two issues when they create new menus: they click "Add a Menu" thinking it will add a new page to their menu, or they forget to assign their new menu to a location, and then wonder why it doesn't show up on their site.

This commit rearranges the order of items in the menu panel, and updates the flow for creating a menu by breaking it up into steps. Additionally, more help text has been added to guide people through the process of creating a menu.

Also adds default `type` lookups for Panel and Section instances. See #30741.

Props bpayton, obenland, westonruter, celloexpessions, afercia, melchoyce, zoonini, michelleweber.
Fixes #40104.


git-svn-id: https://develop.svn.wordpress.org/trunk@41768 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 02:21:22 +00:00
K. Adam White
e4726752ab Widgets: Fix jshint error in media widget.
git-svn-id: https://develop.svn.wordpress.org/trunk@41764 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:57:08 +00:00
Sergey Biryukov
c5d9fa67a2 Posts, Post Types: Introduce page_attributes_misc_attributes action that fires before the help hint text in the 'Page Attributes' meta box.
Props markcallen, MikeHansenMe.
Fixes #34034.

git-svn-id: https://develop.svn.wordpress.org/trunk@41763 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:54:22 +00:00
Konstantin Obenland
75ce48ef70 Widgets: Allow oEmbeds in video widget.
Opens up video embeds to all supported video oEmbed providers.

Props westonruter.
See #42039.


git-svn-id: https://develop.svn.wordpress.org/trunk@41759 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-05 00:21:27 +00:00
Gary Pendergast
5c2609bbdb Plugins: Tweak the plugin icons added in [41695].
- Remove plugins icons from the plugin list table, as there were performance issues loading the icons when the site had lots of plugins.
- Depending on which icons the plugin has uploaded, prefer them in this order: `svg`, `128x128`, `256x256`.
- Improve the style of the fallback icon for plugins that don't have an icon defined.

Props Travel_girl, danieltj, afercia, karmatosed,hugobaeta, empireoflight, brentjett, melchoyce, pento.
Fixes #30186.



git-svn-id: https://develop.svn.wordpress.org/trunk@41755 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 23:42:55 +00:00
John Blackbourn
645a550129 Users: Revert [41613], [41614], and [41623] as this feature needs some more work.
See #38741


git-svn-id: https://develop.svn.wordpress.org/trunk@41753 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 22:16:21 +00:00
westonruter
0cc238c7c7 Customize: Allow controls to be created with pre-instantiated Setting object(s), or even with plain Value object(s).
* Allow passing settings in keyed object (e.g. `settings: { default: 'id' }  ), or as an array (e.g. `settings: [ 'id' ]`) with first being default; again, `Setting`/`Value` objects may be supplied instead of IDs.
* Allow a single setting to be supplied with just a single `setting` param, either a string or a `Setting`/`Value` object.
* Update `changeset_status` and `scheduled_changeset_date` to be added dynamically with JS and simply passing of `api.state()` instances as `setting`.
* Introduce a `data-customize-setting-key-link` attribute which, unlike `data-customize-setting-link`, allows passing the setting key (e.g. `default`) as opposed to the setting ID.
* Allow `WP_Customize_Control::get_link()` to return `data-customize-setting-key-link` when setting is not registered.
* Eliminate `default_value` from `WP_Customize_Date_Time_Control` since now comes from supplied `Value`.
* Export status choices as `wp.customize.settings.changeset.statusChoices`.
* Export date and time formats as `wp.customize.settings.dateFormat` and `wp.customize.settings.timeFormat` respectively.

Props westonruter, sayedwp.
See #39896, #30738, #30741, #42083.
Fixes #37964, #36167.


git-svn-id: https://develop.svn.wordpress.org/trunk@41750 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 20:01:12 +00:00
Mike Schroder
0cf7fbf654 Media: Store video creation date in meta.
When able to be parsed, store the created date for a video file from meta,
since this is useful separately from the dates on the file itself.

Introduces `wp_get_media_creation_timestamp()` to read the timestamp from
getID3 and a `wp_read_video_metadata` filter analogous to
`wp_read_image_metadata`.

Fixes #35218.
Props stevegrunwell, joemcgill, desrosj, blobfolio, mikeschroder.

git-svn-id: https://develop.svn.wordpress.org/trunk@41746 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 19:31:51 +00:00
Sergey Biryukov
5c928c9c0e Media: Improve the preview of transparent images in Edit Image modal by using CSS3 to show a checkered background.
Props powerzilly, stevepuddick.
Fixes #41966. See #41948.

git-svn-id: https://develop.svn.wordpress.org/trunk@41742 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 18:34:44 +00:00
John Blackbourn
bd6ee706d0 Security: Add a referrer policy header to the admin and login screens.
This sets a referrer policy of `same-origin` which adds hardening by preventing a referrer being sent from the admin area or login screens to other origins. This helps prevent unwanted exposure of potentially sensitive information that may be contained within URLs.

This change introduces a new filter, `admin_referrer_policy`, for filtering the referrer policy header value. The header can be disabled if necessary by removing the `wp_admin_headers` action from the `admin_init` and `login_init` hooks.

Props joostdevalk
Fixes #42036


git-svn-id: https://develop.svn.wordpress.org/trunk@41741 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 18:24:17 +00:00
westonruter
b1faca5ca8 Customize: Improve accessibility of markup for base WP_Customize_Control and WP_Customize_Nav_Menu_Control with proper use of label elements and inclusion of aria-describedby.
See #33085.
Props valendesigns, afercia, westonruter.


git-svn-id: https://develop.svn.wordpress.org/trunk@41740 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 18:11:08 +00:00
Weston Ruter
a0a2a4a105 Customize: Fix theme details modal by updating logic in getPreviousTheme and getNextTheme to not rely on DOM traversal and manually constructing control IDs.
Amends [41726].
See #42083, #37661.


git-svn-id: https://develop.svn.wordpress.org/trunk@41739 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 16:48:50 +00:00
Joe McGill
59c0329461 Customizer: Minimize duplicate header crops in the media library.
This adds `Custom_Image_Header::get_previous_crop()`, which finds any
previously cropped headers created from the same base image and replaces
that attachment rather than creating a new attachment.

After updating a crop, the replaced images is also removed from the list
of previous header images in the Customizer.

See #21819.


git-svn-id: https://develop.svn.wordpress.org/trunk@41732 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 14:58:07 +00:00
Weston Ruter
3f1de03834 Customize: Improve usability of Customize JS API.
* Eliminate need to pass both ID and instance in calls to `Values#add()` for panels, sections, controls, settings, partials, and notifications.
* Eliminate need to supply `content` param when constructing a `Control`.
* Unwrap the `options.params` object passed in constructors to just pass a flat `options`. (Back-compat is maintained.)
* Add support for `templateId` param for `Control` to override which template is used for the content.
* Remove unused `previewer` being supplied in `Control` instances.
* Rename `classes` to `containerClasses` on `Notification`.
* Automatically supply `instanceNumber` to improve stable sorting.
* Use `api.Notifications` for notifications in settings instead of `api.Value`.

See #30741.
Fixes #42083.


git-svn-id: https://develop.svn.wordpress.org/trunk@41726 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 06:47:37 +00:00
Weston Ruter
3fcfefd05c File Editors: Introduce sandboxed live editing of PHP files with rollbacks for both themes and plugins.
* Edits to active plugins which cause PHP fatal errors will no longer auto-deactivate the plugin. Supersedes #39766.
* Introduce sandboxed PHP file edits for active themes, preventing accidental whitescreening of a user's site when introducing a fatal error.
* After writing a change to a PHP file for an active theme or plugin, perform loopback requests on the file editor admin screens and the homepage to check for fatal errors. If a fatal error is encountered, roll back the edited file and display the error to the user to fix and try again.
* Introduce a secure way to scrape PHP fatal errors from a site via `wp_start_scraping_edited_file_errors()` and `wp_finalize_scraping_edited_file_errors()`.
* Moves file modifications from `theme-editor.php` and `plugin-editor.php` to common `wp_edit_theme_plugin_file()` function.
* Refactor themes and plugin editors to submit file changes via Ajax instead of doing full page refreshes when JS is available.
* Use `get` method for theme/plugin dropdowns.
* Improve styling of plugin editors, including width of plugin/theme dropdowns.
* Improve notices API for theme/plugin editor JS component.
* Strip common base directory from plugin file list. See #24048.
* Factor out functions to list editable file types in `wp_get_theme_file_editable_extensions()` and `wp_get_plugin_file_editable_extensions()`.
* Scroll to line in editor that has linting error when attempting to save. See #41886.
* Add checkbox to dismiss lint errors to proceed with saving. See #41887.
* Only style the Update File button as disabled instead of actually disabling it for accessibility reasons.
* Ensure that value from CodeMirror is used instead of `textarea` when CodeMirror is present.
* Add "Are you sure?" check when leaving editor when there are unsaved changes.

Supersedes [41560].
See #39766, #24048, #41886.
Props westonruter, Clorith, melchoyce, johnbillion, jjj, jdgrimes, azaozz.
Fixes #21622, #41887.


git-svn-id: https://develop.svn.wordpress.org/trunk@41721 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 00:19:16 +00:00
Felix Arntz
d54e80111a Multisite: Replace calls to refresh_blog_details() with clean_blog_cache().
Fixes #42077. See #40201.


git-svn-id: https://develop.svn.wordpress.org/trunk@41717 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 19:04:57 +00:00
John Blackbourn
d72e4fd9aa Plugins: Introduce a singular and plural form for the plugin deletion error message.
Props eddhurst, SergeyBiryukov

Fixes #38918


git-svn-id: https://develop.svn.wordpress.org/trunk@41713 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 17:12:41 +00:00
Andrea Fercia
d3f5e2b5dc Accessibility: Change all the #f00 and red to the official WordPress accent red.
WordPress should exclusively use colors from the official colors palette, see
https://make.wordpress.org/design/handbook/design-guide/foundations/colors/
Partially addresses accessibility color contrast ratio issues.

See #35622.


git-svn-id: https://develop.svn.wordpress.org/trunk@41711 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 16:01:57 +00:00
Andrea Fercia
679f45c906 Customize: Fix invalid HTML and aria-describedby values.
- fixes invalid HTML and duplicate IDs
- as per the Accessibility coding standards, all new code must use explicitly associated form labels
- properly escapes a few HTML attributes

Props celloexpressions, afercia.
Fixes #42054.


git-svn-id: https://develop.svn.wordpress.org/trunk@41709 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 15:43:22 +00:00
Sergey Biryukov
fb06fab2e8 Posts, Post Types: Simplify the wording in post locking notice.
Props munyagu.
Fixes #42023.

git-svn-id: https://develop.svn.wordpress.org/trunk@41706 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 15:10:38 +00:00
Sergey Biryukov
609318a22d Comments: Change IP references in moderation option labels and email notifications to IP address for clarity.
Props mako09, gk.loveweb, bradparbs.
Fixes #40382.

git-svn-id: https://develop.svn.wordpress.org/trunk@41704 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 13:08:48 +00:00
Weston Ruter
bebc4cde6f Customize: Update dashboard welcome link to point to themes panel in the customizer instead of themes admin screen.
Props celloexpressions.
Fixes #42050.


git-svn-id: https://develop.svn.wordpress.org/trunk@41699 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 04:12:51 +00:00
Weston Ruter
2e5f329cc9 Customize: Provide validation feedback for invalid Custom Link URLs in nav menu items.
Props RMarks, EGregor, umangvaghela123, andrew.taylor, celloexpressions, westonruter, voldemortensen.
Fixes #32816.


git-svn-id: https://develop.svn.wordpress.org/trunk@41697 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 03:43:01 +00:00
Gary Pendergast
942482993d Plugins: Add plugin icons to the plugin list tables.
To mirror theme list table behaviour, the plugin icon now appears next to plugins in the plugin list tables. For plugins that don't have an icon, or non-W.org plugins, a fallback dashicon is shown.

Props melchoyce, afercia, paulwilde, pento, obenland.
Fixes #30186.



git-svn-id: https://develop.svn.wordpress.org/trunk@41695 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 00:24:31 +00:00
Weston Ruter
88db798f62 Customize: Add button in Publish Settings to discard unsaved changes (including drafted and scheduled), reverting Customizer to the last published state.
Props westonruter, melchoyce.
Amends [41667].
See #39896, #21666.


git-svn-id: https://develop.svn.wordpress.org/trunk@41694 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-03 00:21:06 +00:00
John Blackbourn
19c0a55711 Docs: Standardise the format used for documenting parameters passed by reference.
See #35974, #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41688 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 22:13:04 +00:00
John Blackbourn
dd33fc9301 Docs: Remove & prefixes from parameter documentation to avoid doc parsing errors.
Props sudar for the original patch.

See #35974


git-svn-id: https://develop.svn.wordpress.org/trunk@41686 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 22:01:23 +00:00
Andrea Fercia
e2c4ae805f Quick/Bulk Edit: Improve the inline error messages styling.
- uses the core `notice` styles for the Quick Edit form inline error messages
- adds missing periods at the end of a few error messages

Props ocean90, karmatosed, melchoyce, afercia.
Fixes #35496.


git-svn-id: https://develop.svn.wordpress.org/trunk@41684 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 21:51:09 +00:00
Andrea Fercia
02588452f7 Accessibility: List Tables: use aria-current for the views current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.


git-svn-id: https://develop.svn.wordpress.org/trunk@41683 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 19:43:02 +00:00
Andrea Fercia
54153520f2 Accessibility: Improve the Dashboard Nearby Events widget wp.a11y.speak() messages.
Avoids to announce the "city updated" message on page load.

Fixes #42037.


git-svn-id: https://develop.svn.wordpress.org/trunk@41682 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 19:24:24 +00:00
Weston Ruter
64f0d4a544 Customize: Fix jumping behavior upon scrolling up when a sticky header has its description expanded.
Props delawski.
See #34343, #41879.
Fixes #41850.


git-svn-id: https://develop.svn.wordpress.org/trunk@41679 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 18:54:22 +00:00
Weston Ruter
ba07b22cb5 Customize: Fix positioning of outer section (e.g. publish settings) on large screen sizes.
Also fix preview link CSS for desktop and mobile.

Props sayedwp, bduclos.
See #39896.
Fixes #42051.


git-svn-id: https://develop.svn.wordpress.org/trunk@41677 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 18:39:10 +00:00
Weston Ruter
32a6ac3918 Customize: Improve styling of date/time Customizer control.
* Let date `legend` be screen reader text when time is not included.
* Skip rendering containers for label (title) and description when not supplied in registered control.
* Fix margins and padding.

Amends [41670].
Props westonruter, afercia, sayedwp.
Fixes #42022.


git-svn-id: https://develop.svn.wordpress.org/trunk@41672 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 17:33:10 +00:00
Weston Ruter
e8e027e7a6 Plugin Editor: Remove plugins_loaded from being re-triggered in plugin_sandbox_scrape().
Props jdgrimes.
Amends [41560].
Fixes #39766.


git-svn-id: https://develop.svn.wordpress.org/trunk@41671 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 17:06:46 +00:00
Weston Ruter
ef14cd1952 Customize: Fix WP_Customize_Date_Time_Control to be re-usable for plugins and custom settings.
* Allow time fields to be omitted by constructing with `timeIncluded` as `false`.
* Ensure `reportValidity` is only called on a control when it is in an expanded section.
* Rename "ampm" to "meridian".
* Improve accessibility and fix HTML validation and style issues for both the date/time control and the preview link control.
* Fix styling of dropdowns and clean CSS.
* Improve accessibility of nav menus component.

Props westonruter, afercia, sayedwp, melchoyce.
Amends [41626].
See #39896.
Fixes #42022.


git-svn-id: https://develop.svn.wordpress.org/trunk@41670 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 04:11:50 +00:00
Weston Ruter
3fbb8ed287 Customize: Add infrastructure for trashing/reverting of unpublished changes; introduce full-screen OverlayNotification for trashing and theme install/preview.
* Introduce a new `wp.customize.previewer.trash()` JS API to trash the current changeset, along with logic to `WP_Customize_Manager` to handle deleting changeset drafts.
* Add `trashing` to `wp.customize.state` which is then used to update the UI.
* UI for trashing is pending design feedback. One possibility is to add a new trash button to Publish Settings section that invokes `wp.customize.previewer.trash()`.
* Improve logic for managing the visibility and disabled states for publish buttons.
* Prevent attempting `requestChangesetUpdate` while processing and bump processing while doing `save`.
* Update `changeset_date` state only if sent in save response.
* Merge `ThemesSection#loadThemePreview()` into `ThemesPanel#loadThemePreview()`.
* Remove unused `autosaved` state.
* Start autosaving and prompting at beforeunload after a change first happens. This is key for theme previews since even if a user did not make any changes, there were still dirty settings which would get stored in an auto-draft unexpectedly.
* Allow `Notification` to accept additional `classes` to be added to `container`.
* Introduce `OverlayNotification` and use for theme installing, previewing, and trashing. Such overlay notifications take over the entire window.

Props westonruter, celloexpressions.
See #37661, #39896, #21666, #35210.


git-svn-id: https://develop.svn.wordpress.org/trunk@41667 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 03:36:18 +00:00
Jeremy Felt
e02c481487 Multisite: Use get_current_blog_id() instead of $wpdb->blogid.
`get_current_blog_id()` is more appropriate for determining the ID of the current site in most cases. This eliminates the need for the global `$wpdb` in several functions and is better than the implicit global used in admin pages.

Props bnap00, spacedmonkey.
Fixes #41684.


git-svn-id: https://develop.svn.wordpress.org/trunk@41661 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-02 01:43:48 +00:00
Andrea Fercia
7a414342df Accessibility: Improve the Theme Details modal accessibility.
- sets the modal content to `role="document"` to make screen readers switch back to browse mode
- standardizes the Themes screen and Customizer modals interaction
- Themes screen modal: sets initial focus on the modal overlay instead of the primary button, avoiding to "skip" content for keyboard and screen reader users

Fixes #42055.


git-svn-id: https://develop.svn.wordpress.org/trunk@41658 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-01 13:47:29 +00:00
Andrew Ozz
a0692f9597 Editor: Use editor.$ to improve removeSelectionMarker().
See #42029

git-svn-id: https://develop.svn.wordpress.org/trunk@41656 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-01 10:32:58 +00:00
Andrew Ozz
d36c32e299 Editor: pass the DOM library instance instead of a (fake) editor instance to getCursorMarkerSpan().
See #42029

git-svn-id: https://develop.svn.wordpress.org/trunk@41655 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-01 09:41:23 +00:00
Felix Arntz
75c4cb98f4 Multisite: Display correct roles in Network > Site Users screen for sites other than the main site.
Props jeremyfelt.
Fixes #42013.


git-svn-id: https://develop.svn.wordpress.org/trunk@41652 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-30 03:19:26 +00:00
Weston Ruter
743494b654 Customize: Remove unused JS variables to fix JSHint.
Amends [41649].
See #37661, #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41650 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 22:03:15 +00:00
Weston Ruter
d2540cfa06 Customize: Improve interactions between the Themes panel and Publish Settings section.
* Deactivate the Themes panel immediately after changing selected status to non-publish.
* Animate publish settings button into view with publish button when collapsing Themes panel.
* Deactivate publish settings section and hide publish settings button entirely when customizer state is clean.
* Harden access of Themes panel in case it was removed by plugin.
* Fix throttling of `renderScreenshots` calls in `ThemesSection`.

Amends [41648], [41626].
See #37661, #39896, #34843.


git-svn-id: https://develop.svn.wordpress.org/trunk@41649 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 21:51:42 +00:00
Weston Ruter
c35fe07703 Customize: Introduce a new experience for discovering, installing, and previewing themes within the customizer.
Unify the theme-browsing and theme-customization experiences by introducing a comprehensive theme browser and installer directly accessible in the customizer. Replaces the customizer theme switcher with a full-screen panel for discovering/browsing and installing themes available on WordPress.org. Themes can now be installed and previewed directly in the customizer without entering the wp-admin context. Also includes an extensible framework for browsing and installing themes from other sources.

Also includes CSS auto-prefixing added via `grunt precommit:css`.

For details, see: https://make.wordpress.org/core/2016/10/03/feature-proposal-a-new-experience-for-discovering-installing-and-previewing-themes-in-the-customizer/

Previously [38813] but reverted in [39140].
Fixes #37661, #34843, #38666.
Props celloexpressions, folletto, westonruter, karmatosed, melchoyce, afercia.


git-svn-id: https://develop.svn.wordpress.org/trunk@41648 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 20:12:19 +00:00
Andrew Ozz
b076026362 Editor: improve attaching a callback on editor init.
See #42029

git-svn-id: https://develop.svn.wordpress.org/trunk@41646 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 19:11:08 +00:00
Andrew Ozz
6b72687e10 Editor: Improve keeping text selection when switching between Visual and Text modes.
Props biskobe.
See #42029.

git-svn-id: https://develop.svn.wordpress.org/trunk@41645 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 17:49:43 +00:00
Sergey Biryukov
3edd5dac38 I18N: Use a consistent pattern for translator comments for placeholders in wp-admin/includes/dashboard.php.
See #41974.

git-svn-id: https://develop.svn.wordpress.org/trunk@41641 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 11:43:27 +00:00
Sergey Biryukov
13b5f8272a I18N: Use a consistent pattern for translator comments for placeholders in Customizer and widget strings.
Props danieltj, Rahmohn.
Fixes #41974.

git-svn-id: https://develop.svn.wordpress.org/trunk@41640 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-29 11:41:06 +00:00
Gary Pendergast
d93dcaf75f Setup: Hide database errors while testing the table prefix.
If DB errors are shown during installation, the table prefix test will also show an error, even though we're deliberately trying to generate that error.

Fixes #40655.



git-svn-id: https://develop.svn.wordpress.org/trunk@41631 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-28 07:57:22 +00:00
Gary Pendergast
98cdd162b2 Post Editor: Keep text selection between Visual and Text modes
When switching between post editor modes, the current cursor position and selection is now preserved. This allows authors to switch modes without losing the context of where they were in the document.

Props biskobe.
Fixes #41962.



git-svn-id: https://develop.svn.wordpress.org/trunk@41630 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-28 06:44:09 +00:00
Gary Pendergast
f5c4c69bf1 Database: Don't quote placeholders in queries going through $wpdb->prepare()
To bring Core into line with the changes to `$wpdb->prepare()` in WordPress 4.8.2, query placeholders shouldn't be quoted.

Props jrf, johnjamesjacoby.
Fixes #41983.



git-svn-id: https://develop.svn.wordpress.org/trunk@41628 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-28 04:31:05 +00:00
Weston Ruter
a92bb89f4f Customize: Introduce drafting and scheduling for Customizer changesets.
* Incorporates code from the Customize Snapshots and Customize Posts feature plugins.
* Adds a new Publish Settings section for managing the changeset status, scheduled date, and frontend preview link.
* Updates Publish button to reflect the status selected in the Publish Settings (including Save Draft and Schedule).
* Deactivates the Themes section when a non-publish status selected, and deactivates the Publish Settings section when previewing a theme switch.
* Introduces an `outer` section type (`wp.customize.OuterSection` in JS) for the Publish Settings section to use and for available widgets and available nav menu panels to use in the future. These sections can be expanded while other sections are expanded.
* Introduces `WP_Customize_Date_Time_Control` in PHP and `wp.customize.DateTimeControl` in JS for managing a date/time value.
* Keeps track of scheduled time and proactively publish from the client when the time arrives, as opposed to waiting for WP Cron.
* Auto-publishes a scheduled changeset when attempting to access one that missed its schedule.
* Starts a new changeset if attempting to save a changeset that was previously publish.
* Adds `force` arg to `requestChangesetUpdate()` to force an update request even when there are no pending changes.
* Adds utils methods for `getCurrentTimestamp` and `getRemainingTime`.
* Adds new state values for `selectedChangesetStatus`, `changesetDate`, `selectedChangesetDate`.
* Fixes logic for when to short-circuit check to close Customizer when there are unsaved changes.
* Adds getter methods for `autosaved` and `branching` parameters, with the latter applying the `customize_changeset_branching` filter.
* Call to `establish_loaded_changeset` on the fly when `changeset_uuid()` is called if no changeset UUID was specififed.
* De-duplicates logic for dismissing auto-draft changesets.
* Includes unit tests.

Builds on [41597].
Props sayedwp, westonruter, melchoyce, JoshuaWold, folletto, stubgo, karmatosed, dlh, paaljoachim, afercia, johnregan3, utkarshpatel, valendesigns.
See #30937.
Fixes #39896, #28721, #39275.


git-svn-id: https://develop.svn.wordpress.org/trunk@41626 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 22:24:37 +00:00
Andrea Fercia
def5c946f5 Accessibility: Update and standardize the admin screen-reader-text CSS class.
Given the new WordPress browsers support policy, the `screen-reader-text` css
class used in the admin can be updated to use modern CSS and correct syntax. See
https://github.com/wpaccessibility/a11ythemepatterns/blob/master/read-more-links/style.css

Worth noting the `clip` property is deprecated and kept for IE11 and Edge.

- uses `clip-path` for modern browsers
- keeps `clip` for old browsers and update its value to a correct syntax
- resets `clip-path` to `none` where the class is used to dynamically reveal elements
- removes an old rule that made `screen-reader-text` completely invisible in the help tabs `#screen-meta`
- standardizes the rule across CSS files

Fixes #40970.


git-svn-id: https://develop.svn.wordpress.org/trunk@41622 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 17:26:58 +00:00
Andrea Fercia
3e27644b97 Accessibility: Improve the sidebar toggles in the Widgets screen.
- uses button elements for the toggles
- uses `aria-expanded` on the toggles to communicate to assistive technologies the panels expanded/collapsed state
- adds the "circular focus" style to the toggles to give users a clear indication of the currently focused element
- standardizes CSS class names to `.toggle-indicator` and `.handlediv` as these names are already used across the admin for similar controls

Props monikarao, xavortm, mihai2u, Kopepasah.
Fixes #37013.


git-svn-id: https://develop.svn.wordpress.org/trunk@41621 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 16:28:59 +00:00
John Blackbourn
e5e17a4eff Taxonomy: Introduce a back_to_items taxonomy label.
This is used after updating a taxonomy term in the link to return to the term listing screen.

Props benoitchantre

Fixes #41898


git-svn-id: https://develop.svn.wordpress.org/trunk@41618 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 14:38:40 +00:00
John Blackbourn
301ecdabe4 Options, Meta APIs: Require a confirmation link in an email to be clicked when a user attempts to change the network
admin email address on Multisite.

This mirrors the same functionality for the site admin email address and user profile email address.

Fixes #41254


git-svn-id: https://develop.svn.wordpress.org/trunk@41617 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 14:16:21 +00:00
John Blackbourn
1507df9d59 Users: Introduce the concept of a large site in order to speed up the Users screen when there are many users.
Calling the `count_users()` function is expensive, regardless of the counting strategy that's used, and it gets
slower the more users there are on a site. In order to speed up the Users screen in the admin area, calling
`count_users()` can be avoided entirely while still displaying the total count for users.

This introduces some new functions:

* `wp_is_large_user_count()`
* `wp_get_active_user_count()`
* `wp_update_active_user_count()`

A corresponding `wp_is_large_user_count` filter is also introduced.

Props tharsheblows, johnbillion

Fixes #38741


git-svn-id: https://develop.svn.wordpress.org/trunk@41613 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 13:03:03 +00:00
Pascal Birchler
0c1d3f62f3 Upgrade/Install: Fix updating plugins on the Add Plugins screen.
Props imath.
Fixes #41407.


git-svn-id: https://develop.svn.wordpress.org/trunk@41612 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 11:59:01 +00:00
Pascal Birchler
135ca36a69 Upgrade/Install: Show new version number when updating a theme on Multisite.
Props afragen.
Fixes #40764.


git-svn-id: https://develop.svn.wordpress.org/trunk@41611 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 09:43:07 +00:00
Pascal Birchler
0becc4b8db Plugins: Fix version number in docblock after [41608].
Props ocean90.
See #37430.


git-svn-id: https://develop.svn.wordpress.org/trunk@41609 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 08:51:25 +00:00
Pascal Birchler
dfaa7de8fb Plugins: Improve error messages on plugins screen.
This unifies the layout and wording of error messages on both the plugins screen and the themes screen.

Props tinkerbelly, juhise, Ankit K Gupta, m1tk00, swissspidy, mrahmadawais, danieltj.
Fixes #37430.


git-svn-id: https://develop.svn.wordpress.org/trunk@41608 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 08:45:46 +00:00
Dion Hulse
2ff224a044 Standardise on performing api.WordPress.org requests over SSL when possible, falling back to non-SSL when appropriate.
This also standardises the `User-Agent` used when communicating with WordPress.org, allowing for more consistent version detection.

Fixes #42004.


git-svn-id: https://develop.svn.wordpress.org/trunk@41605 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-27 07:59:14 +00:00
Weston Ruter
9cbcab9457 Customize: Dismiss all autosaved auto-drafts for user and not just the one suggested when dismissing restoration notification.
Amends [41597].
See #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41603 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-26 20:32:46 +00:00
Mel Choyce
6cf89abee8 Customizer: Improve small-screen styles in Widgets panel.
Props mrasharirfan, mrahmadawais.
Fixes #41614.


git-svn-id: https://develop.svn.wordpress.org/trunk@41602 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-26 19:04:47 +00:00
Pascal Birchler
f8f263cdb9 Permalinks: Change structure tag button state more reliably.
Changes the highlighted tag buttons accordingly when selecting one of the commong permalink settings.

Deprecates `options_permalink_add_js()` as that JavaScript isn't added inline anymore.

Fixes #29872.


git-svn-id: https://develop.svn.wordpress.org/trunk@41598 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-26 08:23:07 +00:00
westonruter
2f878162a1 Customize: Extend changesets to support autosave revisions with restoration notifications, and introduce a new default linear history mode for saved changesets (with a filter for opt-in to changeset branching).
* Autosaved changes made on top of `auto-draft` changesets get written on top of the `auto-draft` itself, similar to how autosaves for posts will overwrite post drafts.
* Autosaved changes made to saved changesets (e.g. `draft`, `future`) will be placed into an autosave revision for that changeset and that user.
* Opening the Customizer will now prompt the user to restore their most recent auto-draft changeset; if notification is dismissed or ignored then the auto-draft will be marked as dismissed and will not be prompted to user in a notification again.
* Customizer will no longer automatically supply the `changeset_uuid` param in the `customize.php` URL when branching changesets are not active.
* If user closes Customizer explicitly via clicking on X link, then autosave auto-draft/autosave will be dismissed so as to not be prompted again.
* If there is a changeset already saved as a `draft` or `future` (UI is forthcoming) then this changeset will now be autoloaded for the user to keep making additional changes. This is the linear model for changesets.
* To restore the previous behavior of the Customizer where each session started a new changeset, regardless of whether or not there was an existing changeset saved, there is now a `customize_changeset_branching` hook which can be filtered to return `true`.
* `wp.customize.requestChangesetUpdate()` now supports a second with options including `autosave`, `title`, and `date`.
* The window `blur` event for `customize.php` has been replaced with a `visibilitychange` event to reduce autosave requests when clicking into preview window.
* Adds `autosaved` and `branching` args to `WP_Customize_Manager`.
* The `changeset_uuid` param for `WP_Customize_Manager` is extended to recognize a `false` value which causes the Customizer to defer identifying the UUID until `after_setup_theme` in the new `WP_Customize_Manager::establish_loaded_changeset()` method.
* A new `customize_autosaved` query parameter can now be supplied which is passed into the `autosaved` arg in `WP_Customize_Manager`; this option is an opt-in to source data from the autosave revision, allowing a user to restore autosaved changes.

Props westonruter, dlh, sayedwp, JoshuaWold, melchoyce.
See #39896.


git-svn-id: https://develop.svn.wordpress.org/trunk@41597 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-26 07:37:02 +00:00
Weston Ruter
d6a58eec48 Code Editors: Update the current file highlight to use notice styling.
Improves color contrast and readability, and reuses a core design pattern.

Props kekkakokkers, monopine, Travel_girl, afercia, melchoyce, karmatosed.
Fixes #31604.


git-svn-id: https://develop.svn.wordpress.org/trunk@41595 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-25 21:45:57 +00:00
Weston Ruter
666912edf9 Widgets: Introduce Gallery widget for displaying image galleries.
* Galleries are managed in the widget in the same way they are managed in the post editor, both using the media manager.
* Gallery widget is merged from the Core Media Widgets v0.2.0 feature plugin and it extends `WP_Widget_Media` in the same way as is done for image, audio, and video widgets.
* Model syncing logic is updated to support booleans and arrays (of integers).
* Placeholder areas in media widgets are now clickable shortcuts for selecting media.
* Image widget placeholder is updated to match gallery widget where clicking preview is shortcut for editing media.

Props westonruter, joemcgill, timmydcrawford, m1tk00, obenland, melchoyce.
See #32417.
Fixes #41914.


git-svn-id: https://develop.svn.wordpress.org/trunk@41590 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-25 06:27:32 +00:00
Andrea Fercia
8b16d8976f Accessibility: CodeMirror editing areas minor improvements.
- properly labels all the code editor areas (Theme/Plugin, Custom HTML widget, Additional CSS), whether CodeMirror is enabled or disabled
- adds `role="textbox"` and `aria-multiline="true"` to the CodeMirror editing area to allow assistive technologies properly identify it as a textarea
- standardizes the "keyboard trap" help text across the admin and keeps it as a list for better readability
- use the Help text elements as target for `aria-describedby`, to make screen readers read out the help text when focusing the editors
- fixes the `aria-expanded` attribute usage in the Customizer "Additional CSS" help toggle
- moves focus to the CodeMirror editing area when clicking on the associated label
- in the Plugin editor screen: changes a `<big>` element to `<h2>` for better semantics and consistency with the Theme editor screen
- also, removes a few textdomain leftovers, see `better-code-editing` and `default`

Props westonruter, melchoyce, afercia.
Fixes #41872.


git-svn-id: https://develop.svn.wordpress.org/trunk@41586 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-24 15:59:56 +00:00
Sergey Biryukov
be2166126d Plugins: Restore "Clear List" button functionality for recently active plugins.
Props obenland.
Fixes #41080.

git-svn-id: https://develop.svn.wordpress.org/trunk@41585 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-24 15:15:35 +00:00
Andrew Ozz
27f3b55999 Retire Press This and extract it to a plugin. First run.
Props kraftbj, azaozz.
See #41689.

git-svn-id: https://develop.svn.wordpress.org/trunk@41584 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-24 14:21:42 +00:00
Weston Ruter
5346347de7 Customize: Remove unnecessary call to refresh() a CodeMirror instance upon focus in Code Editor control.
This also fixes an issue with the cursor not being set in the expected location with an `inputStyle=contenteditable`.

Props afercia.
See #41897.
Fixes #41900.


git-svn-id: https://develop.svn.wordpress.org/trunk@41582 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-23 18:45:49 +00:00
Sergey Biryukov
81551b9e36 Posts, Post Types: Pass $post parameter to post_submitbox_start, attachment_submitbox_misc_actions, media_submitbox_misc_sections, audio_submitbox_misc_sections filters.
Props sebastian.pisula, SergeyBiryukov.
Fixes #36206.

git-svn-id: https://develop.svn.wordpress.org/trunk@41581 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-23 17:06:40 +00:00
Sergey Biryukov
bc23b8840d Quick/Bulk Edit: Remove duplicate inline-edit-{$screen->post_type} CSS class from Quick Edit table rows.
Props ibachal.
Fixes #41906.

git-svn-id: https://develop.svn.wordpress.org/trunk@41576 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-23 11:01:45 +00:00
Andrew Ozz
5c14c97f9d Plupload: also delete plupload.full.min.js when updating.
See #41755.

git-svn-id: https://develop.svn.wordpress.org/trunk@41571 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 20:47:58 +00:00
Sergey Biryukov
b4e9d5a125 Media: Improve the preview of transparent images in Attachment Details modal by using CSS3 to show a checkered background.
Props powerzilly, stevepuddick.
Fixes #41948.

git-svn-id: https://develop.svn.wordpress.org/trunk@41569 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 19:56:14 +00:00
Sergey Biryukov
40d47b90cb Admin CSS: Autoprefixer for [41329].
See #39662.

git-svn-id: https://develop.svn.wordpress.org/trunk@41568 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 19:50:57 +00:00
Sergey Biryukov
3dff531717 Help/About: Tweak Help tabs on Users screen for consistency with Posts screen.
Props bnap00, Arena94.
Fixes #40553.

git-svn-id: https://develop.svn.wordpress.org/trunk@41566 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 18:30:10 +00:00
Sergey Biryukov
0c66c82b7c Taxonomy: Convert tag cloud in Tags meta box to a list (<ul>) for better semantics and accessibility.
An unordered list allows screen reader users to know in advance how many tags are within the list.

Props audrasjb, afercia.
Fixes #40187.

git-svn-id: https://develop.svn.wordpress.org/trunk@41563 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 11:27:44 +00:00
Weston Ruter
8412ff1f44 Plugin Editor: Use include_once instead of include in plugin_sandbox_scrape() to fix unit tests broken with [41560].
See #39766.


git-svn-id: https://develop.svn.wordpress.org/trunk@41561 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 02:00:33 +00:00
Weston Ruter
f07591d1fd Plugin Editor: Improve reliability of detecting PHP fatal errors when editing an active plugin.
* Invalidate PHP opcache after file is updated to ensure `include` will ''include'' the written changes.
* Define `WP_ADMIN` when activating plugin in sandbox so plugin code targeting admin will be loaded.
* Do actions that get triggered when loading the admin to ensure plugin code runs that could cause errors on plugin editor screen (and lock out access).
* Fix ability to re-activate a plugin after editing a PHP file other than the main plugin file, and ensure PHP fatal error will be displayed in such cases.
* Consolidate duplicated code into `plugin_sandbox_scrape()` and re-use in `activate_plugin()`.
* Show an error notice instead of a success notice when a file is updated but a plugin was deactivated due to a fatal error.
* Update style of warning when editing an active plugin to be styled as an actual warning notice.

See #12423, #21622.
Fixes #39766.


git-svn-id: https://develop.svn.wordpress.org/trunk@41560 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-22 01:35:09 +00:00
Adam Silverstein
e92db998d2 Revisions: correct a timezone display issue.
When preparing the data for the revisions screen, add ' +0000' to the gmt date string before passing it thru `strtotime`.

Props biranit, nacin, buley.
Fixes #25365.


git-svn-id: https://develop.svn.wordpress.org/trunk@41559 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-21 23:32:25 +00:00
Weston Ruter
a91d3980df Customize: Introduce extensible code editor Customizer control for CodeMirror.
* Adds `WP_Customize_Code_Editor_Control` and `wp.customize.CodeEditorControl()`.
* Control respects user preference for syntax highlighting, showing a textarea when user opts out.
* Code editor control takes the ad hoc code for Additional CSS and makes it reusable and extensible, for Additional CSS in core and plugins to use (such as Jetpack).
* Replace `settings` arg in `wp_enqueue_code_editor()` with separate args for `codemirror`, `csslint`, `jshint`, and `htmlhint`.
* Prefix `codemirror` script and style handles with `wp-` to prevent collisions, as also the object is exported as `wp.CodeMirror` in JS.
* Reduce indent size in Customizer code editor instances and Custom HTML widget to use tab size of 2 instead of 4 to save on space.

See #12423, #38707, #35395.
Fixes #41897.


git-svn-id: https://develop.svn.wordpress.org/trunk@41558 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-21 23:03:06 +00:00
Adam Silverstein
52bdeee37d Login: Password reset - add hide icon & confirm weak password checkbox.
Extends the password features added in 4.3 to the password reset flow.

Props johnbillion, manolis09, umesh.nevase, Nikschavan.



git-svn-id: https://develop.svn.wordpress.org/trunk@41556 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-21 21:28:07 +00:00
Andrew Ozz
8436a4f117 Remove SWFUpload,
- Refactor swfupload.js to output a simple upload form, and handlers.js.
- Delete the SWFUpload plugins directory and swfupload.swf.
- Remove flash cookies "hack" from async-upload.php.

See #41752.

git-svn-id: https://develop.svn.wordpress.org/trunk@41554 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-21 16:34:31 +00:00
Dominik Schilling (ocean90)
187f352e9d Taxonomy/Users: Use correct escaping function for URLs.
git-svn-id: https://develop.svn.wordpress.org/trunk@41522 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 21:13:32 +00:00
John Blackbourn
64e8c4952a Filesystem API: Ensure filenames are valid before attempting to unzip them to ensure malformed file paths don't cause issues.
git-svn-id: https://develop.svn.wordpress.org/trunk@41457 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 14:35:09 +00:00
John Blackbourn
fa4713e898 General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
Props kawauso, Mte90 for initial patches

Fixes #13377


git-svn-id: https://develop.svn.wordpress.org/trunk@41399 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 10:10:35 +00:00
Dominik Schilling (ocean90)
7be5b80976 Taxonomy/Users: Provide a fallback for incorrect HTTP referrers.
git-svn-id: https://develop.svn.wordpress.org/trunk@41398 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 09:12:27 +00:00
Weston Ruter
ce69e660bd Customize: Add notifications API to sections and panels.
* Adds a `notifications` property to instances of `wp.customize.Panel` and `wp.customize.Section`.
* Adds a `setupNotifications()` method to `Panel`, `Section`, and `Control`.
* Adds a `getNotificationsContainerElement()` method to the `Panel` and `Section` classes, like `Control` has.
* Replace hard-coded notification in header media section with a notification.
* Limit rendering notifications to panels and sections that are expanded, and to controls that have an expanded section.

See #34893, #35210, #38778.
Fixes #38794.


git-svn-id: https://develop.svn.wordpress.org/trunk@41390 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 05:39:37 +00:00
Weston Ruter
eab65862b0 Customize: Show notification error with "Your homepage displays" control when homepage and posts page are set to be the same (but not empty).
* Show global error notiafication when saving is blocked due to client-side setting invalidity.
* Refactor `wp.customize.Notifications#render()` to ensure a notification re-renders if its `message` or data changes but its `code` does not.

Props MatheusGimenez, sixhours, westonruter, karmatosed, aocean90, zoonini, michelleweber, melchoyce.
See #35210.
Fixes #21492.


git-svn-id: https://develop.svn.wordpress.org/trunk@41389 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-19 00:45:23 +00:00
Weston Ruter
2d1ac710e2 Code Editor: Remove scrollIntoView of editor's cursor line upon focus to prevent jumping issues for editor scroll position.
See #41850, #41879.


git-svn-id: https://develop.svn.wordpress.org/trunk@41385 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-17 03:57:09 +00:00
Weston Ruter
dced797c3f Code Editor: Scroll the cursor line into view instead of the entire editor when focused.
See #41850.
Fixes #41879.


git-svn-id: https://develop.svn.wordpress.org/trunk@41384 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-17 03:34:47 +00:00
Sergey Biryukov
9bdad8906a Taxonomy: Allow for adding custom list table views to taxonomy screens.
Props eventualo, mariovalney, riddhiehta02, llemurya.
Fixes #30829.

git-svn-id: https://develop.svn.wordpress.org/trunk@41378 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-13 15:19:02 +00:00
Weston Ruter
dbace684e2 Editor: Add CodeMirror-powered code editor with syntax highlighting, linting, and auto-completion.
* Code editor is integrated into the Theme/Plugin Editor, Additional CSS in Customizer, and Custom HTML widget. Code editor is not yet integrated into the post editor, and it may not be until accessibility concerns are addressed.
* The CodeMirror component in the Custom HTML widget is integrated in a similar way to TinyMCE being integrated into the Text widget, adopting the same approach for integrating dynamic JavaScript-initialized fields.
* Linting is performed for JS, CSS, HTML, and JSON via JSHint, CSSLint, HTMLHint, and JSONLint respectively. Linting is not yet supported for PHP.
* When user lacks `unfiltered_html` the capability, the Custom HTML widget will report any Kses-invalid elements and attributes as errors via a custom Kses rule for HTMLHint.
* When linting errors are detected, the user will be prevented from saving the code until the errors are fixed, reducing instances of broken websites.
* The placeholder value is removed from Custom CSS in favor of a fleshed-out section description which now auto-expands when the CSS field is empty. See #39892.
* The CodeMirror library is included as `wp.CodeMirror` to prevent conflicts with any existing `CodeMirror` global.
* An `wp.codeEditor.initialize()` API in JS is provided to convert a `textarea` into CodeMirror, with a `wp_enqueue_code_editor()` function in PHP to manage enqueueing the assets and settings needed to edit a given type of code.
* A user preference is added to manage whether or not "syntax highlighting" is enabled. The feature is opt-out, being enabled by default.
* Allowed file extensions in the theme and plugin editors have been updated to include formats which CodeMirror has modes for: `conf`, `css`, `diff`, `patch`, `html`, `htm`, `http`, `js`, `json`, `jsx`, `less`, `md`, `php`, `phtml`, `php3`, `php4`, `php5`, `php7`, `phps`, `scss`, `sass`, `sh`, `bash`, `sql`, `svg`, `xml`, `yml`, `yaml`, `txt`.

Props westonruter, georgestephanis, obenland, melchoyce, pixolin, mizejewski, michelleweber, afercia, grahamarmfield, samikeijonen, rianrietveld, iseulde.
See #38707.
Fixes #12423, #39892.


git-svn-id: https://develop.svn.wordpress.org/trunk@41376 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-13 06:07:48 +00:00
Weston Ruter
594a41666b Customize: Add global notifications area.
* Displays an error notification in the global area when a save attempt is rejected due to invalid settings. An error notification is also displayed when saving fails due to a network error or server error.
* Introduces `wp.customize.Notifications` subclass of `wp.customize.Values` to contain instances of `wp.customize.Notification` and manage their rendering into a container.
* Exposes the global notification area as `wp.customize.notifications` collection instance.
* Updates the `notifications` object on `Control` to use `Notifications` rather than `Values` and to re-use the rendering logic from the former. The old `Control#renderNotifications` method is deprecated.
* Allows notifications to be dismissed by instantiating them with a `dismissible` property.
* Allows `wp.customize.Notification` to be extended with custom templates and `render` functions.
* Triggers a `removed` event on `wp.customize.Values` instances _after_ a value has been removed from the collection.

Props delawski, westonruter, karmatosed, celloexpressions, Fab1en, melchoyce, Kelderic, afercia, adamsilverstein.
See #34893, #39896.
Fixes #35210, #31582, #37727, #37269.


git-svn-id: https://develop.svn.wordpress.org/trunk@41374 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-12 07:02:49 +00:00
Weston Ruter
6406fb561a Customize: Add rightward-facing back button to Themes section header to improve navigation (since the section slides in from the left).
Also serves to prototype for an upward-facing arrow in this location for a Publish Settings section.

Props melchoyce, westonruter.
See #39896, #40278, #21666.


git-svn-id: https://develop.svn.wordpress.org/trunk@41368 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-11 05:22:22 +00:00
Weston Ruter
7aa34b77e9 Customize: Re-use homepage settings help tab text from Reading Options admin screen in description for corresponding Customizer section.
Also remove "Static" reference in template name, missed in [41363].

See #41829.


git-svn-id: https://develop.svn.wordpress.org/trunk@41364 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-10 17:07:50 +00:00
Weston Ruter
d0dbcf5913 Customize: Rename "Static front page" to just "Homepage".
Props danieltj, melchoyce.
Fixes #41828.


git-svn-id: https://develop.svn.wordpress.org/trunk@41363 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-10 16:19:53 +00:00
Andrea Fercia
3d04cc37a5 Administration: Admin menu: Improve vertical spacing and alignment of menu items with counters.
Props pauldechov, JDTrower.

Fixes #41317.


git-svn-id: https://develop.svn.wordpress.org/trunk@41362 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-10 13:39:13 +00:00
Andrea Fercia
798c1894f4 Administration: Admin menu: Use aria-current for the current active page.
The `aria-current` attribute is a simple, effective way to communicate to assistive
technologies which the current item within a set of items is. While the admin menu
structure isn't 100% ideal (the top-level item is repeated also as a sub-item)
adding `aria-current="page"` to the sub-items gives an important feedback to
assistive technologies users.

This change introduces `aria-current` for the first time in core. Worth noting
there are other places where it can be used to improve accessibility. These should
be addressed in separate tickets and patches.

Fixes #41589.


git-svn-id: https://develop.svn.wordpress.org/trunk@41359 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-09 14:49:53 +00:00
Andrea Fercia
c997d1283f Administration: Thickbox: Fix conflicts with the Plugin details and native Thickbox modals.
The Plugin details modal custom implementation in the Plugins page conflicts with
other Thickbox instances added by plugins. Thickbox shows its age and has been
modified over time to suit core needs. However, WordPress should do its best to
not create conflicts with the native Thickbox styles and functionalities. Plugin
authors should be able to use `add_thickbox()` in any admin page as documented, 
without having to worry about potential errors.

- fixes a JavaScript error when closing a native Thickbox modal in the Plugins page
- avoids to override the native Thickbox modal styles
- uses a CSS class to target the Plugin details modal and remove a pile of overqualified CSS selectors

Fixes #41417.


git-svn-id: https://develop.svn.wordpress.org/trunk@41356 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-09 14:13:28 +00:00
Sergey Biryukov
50ddbc9946 Docs: Remove "to to" dittography from inline comments.
Props birgire.
See #41841.

git-svn-id: https://develop.svn.wordpress.org/trunk@41354 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-09 13:48:47 +00:00
Weston Ruter
f5c342ce76 Widgets: Add dirty state tracking for widgets on admin screen.
* Mark a widget as dirty when a field input triggers a `change` or `input` event; clear dirty state when widget is successfully saved.
* Disable Save button and re-label "Saved" when widget not dirty.
* Show AYS dialog when leaving widgets admin screen with unsaved changes.
* When widgets are dirty, expand all unsaved widgets at AYS check and focus on first one.
* Change "Close" link to "Done"; hide link when widget is dirty and reveal when saved.
* The "Done" link persistently appears in the Customizer even after making a change (when the widget is dirty) because changes are autosaved into the changeset.
* Prevent saving widget when form fails `checkValidity`.
* Fix frequency of triggering of `change` event on the rich Text widget's `textarea` limited now to when there are actual changes.
* Add a class of `widget-dirty` to widget containers when the widget has unsaved changes.

Props westonruter, timmydcrawford, melchoyce.
Fixes #41610, #23120.


git-svn-id: https://develop.svn.wordpress.org/trunk@41352 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 19:10:59 +00:00
Sergey Biryukov
357532ab64 Docs: Remove "the the" dittography from inline comments.
Props Presskopp.
Fixes #41835.

git-svn-id: https://develop.svn.wordpress.org/trunk@41350 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 18:20:22 +00:00
Felix Arntz
4705b3f27e Multisite: Use get_network() in populate_network() to check whether a network with the given ID already exists.
When multisite is setup already, e.g. in a multi network environment, this change gives a performance benefit over the direct SQL query that was previously used. The SQL query remains in place for when setting up multisite initially as the network API is not available at that point.

Props spacedmonkey.
Fixes #41805.


git-svn-id: https://develop.svn.wordpress.org/trunk@41348 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 16:32:39 +00:00
John Blackbourn
7f3deb9988 Embeds: Remove support for oEmbedded videos from Vine.
* Vine effectively shut down in December 2016.
* The oEmbed endpoint no longer works and returns a 404.
* Developer documentation for Vine has been removed.

Fixes #41817


git-svn-id: https://develop.svn.wordpress.org/trunk@41347 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 15:00:33 +00:00
Andrew Ozz
085b1411bd Text widget: add the Add Media button and enable the wpview plugin to show embedded media previews in the editor.
Props westonruter, azaozz.
See #40854.

git-svn-id: https://develop.svn.wordpress.org/trunk@41344 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-08 10:56:10 +00:00
Weston Ruter
dd7ffeb4de Widgets: Use word-wrap: break-word for available widget descriptions.
Props metodiew.
Fixes #36207.


git-svn-id: https://develop.svn.wordpress.org/trunk@41339 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-06 18:27:51 +00:00
Andrea Fercia
849cf3efb7 Themes: Prevent the Themes search field default action after [40572].
Props boonebgorges.
Fixes #41803.


git-svn-id: https://develop.svn.wordpress.org/trunk@41337 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-05 17:25:23 +00:00
Dominik Schilling (ocean90)
5f06aaca1c I18N: Allow numbers in locales during installation.
The current regex was a bit to strict for locales like `pt_PT_ao90` which were already supported by `wp_get_installed_translations()`.

Fixes #41794.

git-svn-id: https://develop.svn.wordpress.org/trunk@41335 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 19:29:50 +00:00
Andrew Ozz
b1d9cac1fc Plupload: remove the reinstated plupload.js from the list of old files.
Props afercia.
See #41755.

git-svn-id: https://develop.svn.wordpress.org/trunk@41332 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-04 10:21:33 +00:00
Andrea Fercia
207d79af50 Accessibility: Improve the color picker UI accessibility, interaction, and generated markup.
- Refactors the UI controls around the Iris color picker to output valid and semantic markup
- Simplifies the way elements visibility gets toggled
- Properly associates the visually hidden label with the color input field
- Makes the toggle button a real button
- Adds `aria-expanded` to the toggle button
- Keeps focus on the toggle button instead of moving it to the color input field
- Adds `aria-label` attributes to give better context to some controls
- Removes a redundant title attribute
- Keeps the toggle button text to "Select Color" instead of changing it to "Current Color" when a color is selected
- Slightly improves the responsive view
- CSS clean-up

Fixes #39662.


git-svn-id: https://develop.svn.wordpress.org/trunk@41329 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-03 16:01:18 +00:00
Andrew Ozz
55938f0664 Plupload:
- Update to 2.1.9.
- Include the non-minified plupload.js and moxie.js.
- Remove support for Flash and Silverlight, the available runtime options are `html5` and `html4`.
- Delete plupload.flash.swf and plupload.silverlight.xap.

Fixes #41755.

git-svn-id: https://develop.svn.wordpress.org/trunk@41328 602fd350-edb4-49c9-b593-d223f7449a82
2017-09-01 12:27:49 +00:00
Joe McGill
06329dc35e Media: Ensure 'media_handle_upload()' returns 'WP_Error' on failure.
This fixes an issue where failures when inserting the attachment post via
`wp_insert_attachment()` would result in a return value of `0` instead of a
`WP_Error` object, as documented. This is addressed by passing `true` as the 
fourth param (added in WP 4.7.0) when calling `wp_insert_attachment()`.

Props mrasharirfan, flixos90.
Fixes #41726.


git-svn-id: https://develop.svn.wordpress.org/trunk@41323 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-30 15:03:08 +00:00
Sergey Biryukov
481e055db2 Docs: Correct description for view_mode_post_types filter added in [35357].
Props birgire.
Fixes #41730.

git-svn-id: https://develop.svn.wordpress.org/trunk@41317 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 19:26:03 +00:00
Ian Dunn
a794678af4 Dashboard: Discontinue nonessential logging of Events API requests.
These log entries are only useful when troubleshooting unexpected results from the API, which is not common. The vast majority of users are better served by not having their logs cluttered with noise.

For the rare situations where troubleshooting is necessary, it can be achieved by a plugin (see #41217 for an example).

Props Howdy_McGee, dd32.
Fixes #41217.


git-svn-id: https://develop.svn.wordpress.org/trunk@41316 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-25 18:11:04 +00:00
Scott Taylor
1d4fa31a99 Docs: improve JS docs for bookmarklet.js
Props andizer, ireneyoast.
Fixes #41547.


git-svn-id: https://develop.svn.wordpress.org/trunk@41313 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:54:22 +00:00
Scott Taylor
eda1561563 Docs: improve JS docs for tags.js
Props atimmer, jipmoors.
Fixes #41069.


git-svn-id: https://develop.svn.wordpress.org/trunk@41311 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:51:19 +00:00
Scott Taylor
aec50e2859 Docs: improve JS docs for editor-expand.js
Props IreneYoast, terwdan.
Fixes #41068.


git-svn-id: https://develop.svn.wordpress.org/trunk@41310 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-24 17:47:58 +00:00
Mel Choyce
f3363250d7 Widgets: Add grey background behind image widgets.
When an image in the image widget isn't full-width, it looks like it's floating. This adds a grey background behind images to help ground them in the widget.

Props mrasharirfan.
Fixes #41630.


git-svn-id: https://develop.svn.wordpress.org/trunk@41309 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-23 17:14:25 +00:00
John Blackbourn
3eff05cb88 Widgets: Correctly strip slashes from widget and sidebar names to allow namespaced widgets to function correctly.
Fixes #27770

Props jdgrimes


git-svn-id: https://develop.svn.wordpress.org/trunk@41292 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 14:51:47 +00:00
John Blackbourn
9990abec14 Plugins: Introduce singular capabilities for activating and deactivating individual plugins.
This introduces the following meta capabilities:

* `activate_plugin`
* `deactivate_plugin`
* `deactivate_plugins`

The singular `activate_plugin` and `deactivate_plugin` capabilities are used along with the corresponding plugin name when
determining whether or not a user can activate or deactivate an individual plugin.

The plural `deactivate_plugins` capability is used in place of the existing `activate_plugins` capability when determining
whether a user can deactivate plugins.

Each of these new meta capabilities map to the existing `activate_plugins` primitive capability, which means there is no
change in existing behaviour, but plugins can now filter the capabilities required to activate and deactivate individual
plugins.

Fixes #38652 


git-svn-id: https://develop.svn.wordpress.org/trunk@41290 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 14:01:36 +00:00
John Blackbourn
8df2151660 General: Improve terminology used when referring to installations of WordPress and its extensions.
"Install" is not a noun, and while it might be acceptable to use the verb as a noun, it is not correct. Using the correct
noun, "installation", increases clarity, especially for non-native English speakers.

This change fixes the usage in user-facing text and in developer documentation.

Fixes #41620


git-svn-id: https://develop.svn.wordpress.org/trunk@41289 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 11:51:11 +00:00
John Blackbourn
0613540ea2 Media: Rename several attachment related parameters from $post_id to $attachment_id for clarity, and improve related
documentation.

See #41017


git-svn-id: https://develop.svn.wordpress.org/trunk@41288 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 11:11:23 +00:00
Drew Jaynes
8ceaf1e3a4 Docs: Add a missing return description for the deprecated get_screen_icon() function.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@41275 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-20 04:03:55 +00:00