Commit Graph

4532 Commits

Author SHA1 Message Date
Weston Ruter
7105787ced Customize: Allow users to more seamlessly create page-based nav menus during customization.
Introduces the ability to create stubs for the various post types to add to a given menu. This eliminates the need to leave the customizer to first create the post in the admin and then return to managing menus. Only the title of the newly-created post can be supplied; the post content will be blank and will need to be provided in the normal edit post screen outside the customizer, unless a plugin enables a post editing in the customizer experience. When a post is created and added to a nav menu in the customizer, the newly created post that is added to a menu is given the `auto-draft` status, and if the changes are not published, the `auto-draft` post will be automatically deleted within 7 days via `wp_delete_auto_drafts()`. However, if the customizer changes are saved, then these nav menu item `auto-draft` post stubs will be transitioned to `publish`.

Includes portions of code from the Customize Posts <https://github.com/xwp/wp-customize-posts> and Front-end Editor <https://github.com/iseulde/wp-front-end-editor> plugins.

For more information, see https://make.wordpress.org/core/2016/06/16/feature-proposal-content-authorship-in-menus-with-live-preview/

Props celloexpressions, westonruter, valendesigns, afercia, melchoyce, mapk, iseulde, mrahmadawais.
Fixes #34923.


git-svn-id: https://develop.svn.wordpress.org/trunk@38436 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-29 22:58:32 +00:00
Andrea Fercia
2936068f96 Accessibility: Improve the file upload inputs styling.
Though browsers implement `cursor: pointer` on this kind of controls a bit 
inconsistently, the `pointer` cursor styling makes more clear the button and
label are actionable controls.

Props Ankit K Gupta.
Fixes #35552.


git-svn-id: https://develop.svn.wordpress.org/trunk@38435 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-29 21:07:31 +00:00
Andrew Ozz
22ff75ac5e Editor: fix jumpiness on pressing backspace and delete in the Text editor.
Fixes #37690 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@38426 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 18:40:00 +00:00
Ella Iseulde Van Dorpe
99bc5e7fb6 Editor: Use Beacon API over sync request
See https://www.w3.org/TR/beacon/ for more information.



git-svn-id: https://develop.svn.wordpress.org/trunk@38425 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 18:28:52 +00:00
John Blackbourn
16bb82eb76 I18N: Correct various instances of incorrect usage of esc_attr_e().
Fixes #37457
Props henry.wright, afercia


git-svn-id: https://develop.svn.wordpress.org/trunk@38424 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 18:05:02 +00:00
swissspidy
536d18babb Upgrade/Install: After [37687], fix the number of params passed to the upgrade hooks.
`wp_version_check()`, `wp_update_plugins()` and `wp_update_themes()` are all originally hooked to the `upgrader_process_complete` action with zero arguments passed to them. Zero arguments should be passed when re-adding them after translation updates, otherwise the sky will fall.

Props ionutst, gitlost.
Fixes #37731.

git-svn-id: https://develop.svn.wordpress.org/trunk@38415 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 10:03:02 +00:00
Scott Taylor
5f7706e5e8 Admin: allow WP_Screen to be checked via autoload in convert_to_screen().
Props kraftbj.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38414 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 02:24:14 +00:00
Scott Taylor
20dae52ec9 Script Loader: autoload in load-{scripts|styles}.php.
Props JohnPBloch.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38412 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-28 00:06:45 +00:00
Scott Taylor
4225e71a6b Bootstrap: after r38409 and r38410, revert r38402 which reverted r38399.
This fixes the paths in `wp-vendor/` that were including `src`. I want to drop this in so we can find out what else will break.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38411 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 22:31:11 +00:00
Dion Hulse
e353179ce5 Bootstrap: Revert [38399] as it's broken /build/ and subsequently core.svn.wordpress.org.
The generated classmaps reference `/src/` files and operates in the assumption that the base directory is one level above `wp-settings.php`, which it isn't after our build processes are run.

See #36335


git-svn-id: https://develop.svn.wordpress.org/trunk@38402 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 14:36:42 +00:00
Scott Taylor
388690382c Bootstrap: Autoload classes using a Composer-generated PHP 5.2-compatible Autoloader.
* `wp-admin` and `wp-includes` are scanned for classes to autoload
* Several 3rd-party and Ryan McCue-shaped libraries are excluded when the classmap is generated, see `composer.json`: `autoload.exclude-from-classmap`
* `wp-vendor/autoload_52.php` is included at the top of `wp-settings.php` - no changes need to be made to unit tests to include the autoloader
* An avalanche of `require()` and `require_once()` calls that loaded class files have been removed from the codebase.

The following files have been added to `svn:ignore` - they are not 5.2-compatible and fail during pre-commit:
* src/wp-vendor/autoload.php
* src/wp-vendor/composer/autoload_real.php
* src/wp-vendor/composer/autoload_static.php
* src/wp-vendor/composer/ClassLoader.php

We favor these files instead:
* src/wp-vendor/autoload_52.php
* src/wp-vendor/composer/autoload_real_52.php
* src/wp-vendor/composer/ClassLoader52.php

When new PHP classes are added to the codebase, simply run `composer install` or `composer update` from the project root to update the autoloader.

The future is now.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38399 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 09:15:01 +00:00
Scott Taylor
f0af25bd80 Press This: the file for the WP_Press_This class should not produce side effects. Similar to what we did in r38355 for WP_Site_Icon, drop the instances of global instantiation for $wp_press_this via loading the file. The variable can be set inline when necessary. In most of those places, if the global is already set, the file does not load and stomp it currently.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38397 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 06:06:50 +00:00
Weston Ruter
a8b98b7924 Customize: Circumvent the customizer attempting to preview links to static assets (such as uploaded images).
The customizer's preview POST requests to static assets result in 405 Method Not Allowed responses.

Fixes #37828.


git-svn-id: https://develop.svn.wordpress.org/trunk@38396 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-27 06:04:42 +00:00
Scott Taylor
c6731b76ac List Tables: move _WP_List_Table_Compat into its own file.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38392 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 22:22:58 +00:00
Scott Taylor
8b431f6859 FTP: ensure that there is only one class named ftp, which is what is expected in the loading of this arcane library. This ensures that an autoload generator, something along the lines of Composer, won't hiccup when it gets to these files.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38380 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 18:46:17 +00:00
Scott Taylor
a581574b3a Upgrade/Install: wp-admin/includes/class-wp-upgrader-skins.php is unused, remove it. All of the same includes are loaded in class-wp-upgrader.php.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38379 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 18:24:40 +00:00
Scott Taylor
aad8b9805e Load: remove class-feed.php (There is no class named Feed or WP_Feed, it just loads other classes) and, instead, move the require calls to the only place they are ever included: inside fetch_feed(). This simplifies the include path.
Tested with this feed in a widget: `http://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml`.

See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38374 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 17:52:05 +00:00
wonderboymusic
223b79162c Load: remove session.php and, instead, move the 2 require calls to wp-settings.php. This simplifies the include path.
See #36335.


git-svn-id: https://develop.svn.wordpress.org/trunk@38373 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 17:43:03 +00:00
John Blackbourn
87c1b26ee7 Docs: Correct various documentation around object and stdClass types.
See #37770


git-svn-id: https://develop.svn.wordpress.org/trunk@38369 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 16:48:17 +00:00
Scott Taylor
4de1595d47 i18n: move is_rtl() to l10n.php (which loads way earlier). Load WP_Locale file in wp-settings.php. Retire wp-includes/locale.php - it only loaded the class and the one function, is_rtl(). If someone loaded this file for fun somewhere else, it would be a fatal error.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38364 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 10:19:26 +00:00
Scott Taylor
1ff3356d22 OEmbed: move _wp_oembed_get_object() to embed.php, where all of the other embed functions live. WP_oEmbed is then in a file by itself. Load class-oembed.php in wp-settings.php and remove extraneous include calls.
See #37827.


git-svn-id: https://develop.svn.wordpress.org/trunk@38361 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:48:32 +00:00
Scott Taylor
62fe5001ba Editor: improve word-count.js documentation.
Props jipmoors, andizer.
Fixes #37718.


git-svn-id: https://develop.svn.wordpress.org/trunk@38358 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 09:24:34 +00:00
Scott Taylor
a02d79cf73 Site Icon: There is no good reason for class-wp-site-icon.php to drop a global instance of itself whenever the file is loaded. The lone use of the global instance of WP_Site_Icon is in an AJAX action that provides virtually no way to override - the file is loaded immediately before the global is used.
Let us remove the `$wp_site_icon` global. I will fall on the sword if this comes back to bite us (waiting with bated breath).

See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38355 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-25 19:08:38 +00:00
Sergey Biryukov
47e8c055ef Administration: Underline links in the admin footer for better accessibility.
Props Presskopp.
Fixes #37529.

git-svn-id: https://develop.svn.wordpress.org/trunk@38347 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-24 15:42:13 +00:00
Scott Taylor
3aee745492 AJAX: add a new function, wp_doing_ajax(), which can replace... (wait for it...) DOING_AJAX checks via the constant.
Props Mte90, sebastian.pisula, swissspidy.
Fixes #25669.


git-svn-id: https://develop.svn.wordpress.org/trunk@38334 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:32:18 +00:00
Scott Taylor
b1de6df8b4 Media: remove function_exists() call for ini_get() in _load_image_to_edit_path().
Props dd32.
Fixes #37681.


git-svn-id: https://develop.svn.wordpress.org/trunk@38333 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 14:23:41 +00:00
Sergey Biryukov
934ffcf5b1 I18N: Remove unnecessary context for two strings on "Add New User" screen.
Props ramiy.
Fixes #37784.

git-svn-id: https://develop.svn.wordpress.org/trunk@38329 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 12:53:54 +00:00
Sergey Biryukov
afd7e3b16d I18N: Allow for WordPress Plugin/Theme Directory URLs to be localized.
Props ramiy.
Fixes #37501.

git-svn-id: https://develop.svn.wordpress.org/trunk@38325 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 01:18:53 +00:00
Sergey Biryukov
e408cbe86d I18N: Replace unnecessary context with a translator comment for %s Sites string in network_step1().
Props ramiy.
Fixes #37777.

git-svn-id: https://develop.svn.wordpress.org/trunk@38323 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:16:43 +00:00
Sergey Biryukov
aca32f8771 I18N: Replace unnecessary context with a translator comment for %s KB string on Network Settings screen.
Props ramiy.
Fixes #37496.

git-svn-id: https://develop.svn.wordpress.org/trunk@38322 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-23 00:10:49 +00:00
Sergey Biryukov
f2a91f6157 I18N: Add translator comments for Edit Site: %s string in network admin.
Props ramiy.
Fixes #37776.

git-svn-id: https://develop.svn.wordpress.org/trunk@38320 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 23:52:56 +00:00
Scott Taylor
46d7304d4a Nav Menus: remove unnecessary variable assignment in wp_nav_menu_item_post_type_meta_box().
See #37771.


git-svn-id: https://develop.svn.wordpress.org/trunk@38311 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 20:57:41 +00:00
Drew Jaynes
b4fca4a558 Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names.

Props ramiy.
See #37748.


git-svn-id: https://develop.svn.wordpress.org/trunk@38307 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 18:24:48 +00:00
Sergey Biryukov
f9491ed8f6 Common CSS: Allow for .nav-tab-wrapper class to be used on elements other than h3 to increase flexibility for custom settings pages.
Props ramiy, afercia.
Fixes #37257.

git-svn-id: https://develop.svn.wordpress.org/trunk@38306 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 16:32:11 +00:00
Sergey Biryukov
8673ec7459 Multisite: Fix copy/paste issue in id attribute for a dismissible message on Sites screen.
Props imath.
Fixes #37764.

git-svn-id: https://develop.svn.wordpress.org/trunk@38305 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 14:21:15 +00:00
Scott Taylor
45cd115bf6 Media: add a function, wp_get_additional_image_sizes(), that wraps the retrieval of the global $_wp_additional_image_sizes. Removes 6 global imports.
See #37699.


git-svn-id: https://develop.svn.wordpress.org/trunk@38303 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 04:36:42 +00:00
Weston Ruter
4c137392c8 Customize: Ensure a newly-added custom link nav menu item has the appropriate CSS class names.
For nav menu items of the `custom` type, their `object` should also be set to `custom`, so that the `menu-item-custom` class name will be added.

Props vishalkakadiya.
Fixes #37575.


git-svn-id: https://develop.svn.wordpress.org/trunk@38301 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 03:11:51 +00:00
Weston Ruter
99b6d24042 Docs: Update jsdoc in customize-nav-menus.js to remove references to Menu Customizer plugin.
Also fix `@param` for `updateAssignedLocationsInSectionTitle`.

Props gma992, westonruter.
Fixes #37520.


git-svn-id: https://develop.svn.wordpress.org/trunk@38300 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-22 00:55:42 +00:00
Scott Taylor
d911ef44dc Media: when calling pathinfo(), also pass a PATHINFO_* constant to avoid array notices for unset keys.
Props JaworskiMatt.
Fixes #37608.


git-svn-id: https://develop.svn.wordpress.org/trunk@38294 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 23:35:50 +00:00
Scott Taylor
a26f7f7d28 Media: Add some docs to media-gallery.js RIP.
Props jipmoors.
Fixes #37717.


git-svn-id: https://develop.svn.wordpress.org/trunk@38293 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-20 22:58:34 +00:00
John Blackbourn
e784e65d68 Permalinks: Correct the documentation for the get_sample_permalink filter, and improve the documentation for the get_sample_permalink() function.
Props sebastian.pisula for the original patch
Fixes #37682


git-svn-id: https://develop.svn.wordpress.org/trunk@38272 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-17 18:29:47 +00:00
Dominik Schilling (ocean90)
a93c94c6b2 About Page: Add release video and move images to CDN.
Props jerrysarcastic, rosso99, petya, hugobaeta, jerrysarcastic.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38267 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-16 17:57:06 +00:00
Dominik Schilling
e8f182885a About Page: Enhance responsive images.
* Add `srcset` and `sizes` to the mobile image for streamlined updates.
* Modify the order of image candidate strings in each `srcset` to address a bug in iOS8 where the first candidate will always be selected when using `w` descriptors, see #35030.

Props joemcgill.
Fixes #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38257 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 19:27:22 +00:00
Drew Jaynes
19a85950ad Docs: Add a period missed in an argument description in [38253] for #36338.
git-svn-id: https://develop.svn.wordpress.org/trunk@38254 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:43:42 +00:00
Drew Jaynes
77aa4a8b72 Docs: Add documentation for all arguments accepted by export_wp().
Props theMikeD for the initial patch.
Fixes #36338.


git-svn-id: https://develop.svn.wordpress.org/trunk@38253 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-13 17:42:05 +00:00
Dominik Schilling
97c4e332b5 About Page: Fix punctuation errors in two strings.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38248 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-11 20:50:38 +00:00
Dominik Schilling
defc92a66e About Page: Third pass for 4.6.
* Adjust strings.
* Make strings translatable.
* Improve margin between copy and images.

Props Ipstenu, SergeyBiryukov, Presskopp, jeremyfelt, afragen, helen, Clorith, macmanx, DrewAPicture, voldemortensen, jorbin, MattyRob, ocean90.
See #37246.

git-svn-id: https://develop.svn.wordpress.org/trunk@38244 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 23:32:27 +00:00
Dominik Schilling
1ca2426e77 Upgrader: Rename class-wp-automatic-upgrader.php to class-wp-automatic-updater.php.
The class is named `WP_Automatic_Updater` not `WP_Automatic_Upgrader` like all the other upgrader classes. 

Introduced in [37409].
See #37628.

git-svn-id: https://develop.svn.wordpress.org/trunk@38242 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 19:50:18 +00:00
Andrew Ozz
a0a6262f17 Update/Install error messages: do not escape from the template, escape the error message string before inserting it.
Props swissspidy, ocean90.
Fixes #37623 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@38240 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-10 19:02:09 +00:00
Drew Jaynes
fbb173fe7c Update/Install: Provide basic back-compat styling for the .update-message CSS class in the plugins list table.
This change restores only the margin and padding styles for the `.update-message` class when used by plugins in the context of adding arbitrary rows to the list table. The inline-update colors and icon styles were not restored, expressly with a wide variety of plugin use-cases in mind.

Props ovann86, rahulsprajapati, ocean90, DrewAPicture.
Props helen for review.
See #37504.


git-svn-id: https://develop.svn.wordpress.org/trunk@38237 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-09 22:44:07 +00:00