Commit Graph

5849 Commits

Author SHA1 Message Date
Helen Hou-Sandí
60431ae239 Permalinks: Slightly lengthen the truncated slug for display.
This brings it closer to the width of the input so there is less jumping around of buttons. We can afford the space now that other buttons in the space are typically no longer there.

fixes #18306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 19:29:24 +00:00
Drew Jaynes
3f747a6395 Revisions: Also pass the $revision post object to the wp_prepare_revision_for_js filter, introduced in [34541].
Props helen.
Fixes #28627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 18:33:28 +00:00
Drew Jaynes
a134491455 Docs: Document the $revision_data parameter passed to the wp_prepare_revision_for_js filter with a hash notation.
The hook was introduced in [34541].

See #28627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 18:03:26 +00:00
Boone Gorges
0e7c1d3b14 Use wp_installing() instead of WP_INSTALLING constant.
The `WP_INSTALLING` constant is a flag that WordPress sets in a number of
places, telling the system that options should be fetched directly from the
database instead of from the cache, that WP should not ping wordpress.org for
updates, that the normal "not installed" checks should be bypassed, and so on.

A constant is generally necessary for this purpose, because the flag is
typically set before the WP bootstrap, meaning that WP functions are not yet
available.  However, it is possible - notably, during `wpmu_create_blog()` -
for the "installing" flag to be set after WP has already loaded. In these
cases, `WP_INSTALLING` would be set for the remainder of the process, since
there's no way to change a constant once it's defined. This, in turn, polluted
later function calls that ought to have been outside the scope of site
creation, particularly the non-caching of option data. The problem was
particularly evident in the case of the automated tests, where `WP_INSTALLING`
was set the first time a site was created, and remained set for the rest of the
suite.

The new `wp_installing()` function allows developers to fetch the current
installation status (when called without any arguments) or to set the
installation status (when called with a boolean `true` or `false`). Use of
the `WP_INSTALLING` constant is still supported; `wp_installing()` will default
to `true` if the constant is defined during the bootstrap.

Props boonebgorges, jeremyfelt.
See #31130.
Built from https://develop.svn.wordpress.org/trunk@34828


git-svn-id: http://core.svn.wordpress.org/trunk@34793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 15:06:28 +00:00
Drew Jaynes
aa6fbdaa92 Docs: Add a missing DocBlock summary for wp_list_widget_controls_dynamic_sidebar().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 03:06:24 +00:00
Drew Jaynes
b1b2ec30e2 Docs: Add missing DocBlock summaries for five functions in wp-admin/includes/template-functions.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 03:03:25 +00:00
Drew Jaynes
0b332f6d7a Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:55:24 +00:00
Drew Jaynes
4c2203b370 Docs: Add missing summaries for functions in wp-admin/includes/misc.php.
Also restructures the summary for `update_home_siteurl()`.

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:52:24 +00:00
Drew Jaynes
2de4cc7149 Docs: Add missing DocBlock summaries for a multitude of functions in wp-admin/includes/media.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:44:25 +00:00
Drew Jaynes
3866a8cf58 Docs: Add missing method summaries for the deprecated WP_User_Search class, including prepare_query(), query(), prepare_vars_for_template_usage(), do_paging(), and get_results().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34787 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:35:25 +00:00
Drew Jaynes
1f1c2335ad Docs: Add missing summaries for three deprecated admin functions: dropdown_categories(), dropdown_link_categories(), and wp_dropdown_cats().
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-05 02:29:26 +00:00
Drew Jaynes
6650dfea4f Docs: Document the plugin data array returned by get_plugin_data() with a hash-notation.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-04 19:06:27 +00:00
Drew Jaynes
b453c9e976 Users: Don't pass the current WP_Users_List_Table or WP_MS_Users_List_Table instance to the users_list_table_query_args filter after all.
After some discussion, it was decided that Multisite vs single site context can just as easily be derived using available functions like `is_network_admin()`, `get_current_screen()`, etc., rendering the second parameter moot. The hook was introduced in [34796].

Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 21:49:24 +00:00
Drew Jaynes
b38569a5fc Users: Introduce the users_list_table_query_args filter, for modifying the WP_User_Query arguments used within the prepare_items() methods in the users list tables.
The current list table is passed as a second parameter, `$this`, and can take the form of either a `WP_Users_List_Table` or `WP_MS_Users_List_Table` instance depending on the context in which the filter was evaluated.

Props juliobox for the initial patch.
Fixes #25360.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34761 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-03 07:24:25 +00:00
John Blackbourn
9bc54c9442 Remove the unnecessary dynamic prefix used in the plugin_action_links filter name, and in those of its brethren. This way, network_admin_plugin_action_links gets listed as a separate filter.
Fixes #34117

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


git-svn-id: http://core.svn.wordpress.org/trunk@34751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 23:44:26 +00:00
John Blackbourn
815635548a Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115

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


git-svn-id: http://core.svn.wordpress.org/trunk@34748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 22:46:28 +00:00
Jeremy Felt
54512d64cb MS: Use *_network_option() functions throughout core.
Replaces all uses of `*_site_option()` with the corresponding "network" function.

This excludes one usage in `wp-admin/admin-footer.php` that needs more investigation.

Props spacedmonkey.
See #28290.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 19:08:26 +00:00
Drew Jaynes
769ad80521 Docs: Also clarify the expected element types depending on the value of $action in the hook doc for the plugins_api filter.
See [34763] for context.

See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:52:25 +00:00
Drew Jaynes
8478a1341b Docs: Clarify the expected replacement element type if replacing the object or array in plugins_api() via the plugins_api hook.
If the `$action` type is 'query_plugins' or 'plugin_information', the API will return an object, thus an object should be passed if replacing it. For 'hot_tags' and 'hot_categories', the same logic applies, but with arrays instead.

See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34728 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:48:25 +00:00
Scott Taylor
da1c938a5c Plugins: on the Install page, move the name of each plugin into the <h4> to accommodate screen readers.
Props afercia, ChrisMKindred.
Fixes #32400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34725 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 04:16:27 +00:00
Dominik Schilling
18413f3e81 Upgrader: Clear plugin/theme caches directly after a plugin/theme has been installed.
`wp_update_plugins()` and `wp_update_themes()` are both hooked into `upgrader_process_complete` with priority 10. But at this stage the caches in `get_plugins()`, `search_theme_directories()`, and `wp_get_themes()` aren't refreshed yet so both functions couldn't fetch any translations for the new plugin/theme.
To reset the caches `wp_clean_themes_cache()` and `wp_clean_plugins_cache()` are now hooked into `upgrader_process_complete` with priority 9.

Fixes #34029.
Built from https://develop.svn.wordpress.org/trunk@34751


git-svn-id: http://core.svn.wordpress.org/trunk@34716 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 21:21:25 +00:00
Jeremy Felt
7c7eee01ef MS: Remove registration of ID column in Sites and Users list tables.
Reverts a portion of [34289] and leaves the render for the column behind. A plugin can register these fields for display via filter.

Fixes #18661.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:58:24 +00:00
Dominik Schilling
113a9d4517 Language Upgrader: Re-use the automatic upgrader skin if the parent upgrader is using it.
Prevents broken Ajax responses when `Language_Pack_Upgrader::async_upgrade()` gets triggered during a shiny update.

Fixes #34048.
Built from https://develop.svn.wordpress.org/trunk@34748


git-svn-id: http://core.svn.wordpress.org/trunk@34713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 20:25:26 +00:00
Andrea Fercia
0acededa82 In wp_comment_reply() change the H5 headings in fieldset legends for better accessibility.
Also, add a "Edit Comment" legend before the Quick Edit form to pair it with "Reply to Comment" and "Add new Comment" and move the Name, Email, and URL fields after the Comment textarea.

Props joedolson, afercia.

Fixes #33757.
Built from https://develop.svn.wordpress.org/trunk@34743


git-svn-id: http://core.svn.wordpress.org/trunk@34708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 14:52:25 +00:00
Dion Hulse
dc9203d753 Rewrite insert_with_markers() to use flock() when available, significant cleanup of the function too.
The call to `flock()` is an exclusive advisory lock, which in my testing only PHP respects (apache continues to read it).
Not all filesystems support locking (remote NFS mounts for example) so this offers minimal benefit to those platforms, but offers much better protection against file corruption on systems which do support it.
The call is blocking, so a second process will wait for the first to complete before writing if supported.

See #31767

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


git-svn-id: http://core.svn.wordpress.org/trunk@34704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 07:46:27 +00:00
Dion Hulse
a4c41f6ee4 Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized.
Fixes #33478

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


git-svn-id: http://core.svn.wordpress.org/trunk@34703 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:43:25 +00:00
Dion Hulse
d8aaf01b97 Updates: SSH2 Transport: Use a work around to avoid a bug where PHP's SSH2 extension fails to list the contents of the / directory.
This fixes issues where SSH2 with chrooted environments runs into a `Unable to locate WordPress Content directory (wp-content).` error.

The workaround is to simply list the contents of the `/./` directory instead of `/`.

Fixes #33919

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


git-svn-id: http://core.svn.wordpress.org/trunk@34702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:40:25 +00:00
Dion Hulse
9caa7c4ba7 Press This: Make the regular expressions for matching images easier to read by not requiring escaping.
Fixes #32878

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


git-svn-id: http://core.svn.wordpress.org/trunk@34700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:16:25 +00:00
Dion Hulse
731b51ee7f Updates: Try a more compatible method to detect if a file exists when using the FTP Extension.
This change causes it to list the parent directories files, and assets that the node exists within the returned listing, this is a little more compatible than relying upon the FTP server to correctly filter the returned resultset to the specific file/node being requested.
Fixes #28013

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


git-svn-id: http://core.svn.wordpress.org/trunk@34697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 05:09:25 +00:00
Scott Taylor
594a208753 Post List Table: Ensure that edit.php with no query string produces the proper markup and links in the date column header.
Add 2 methods to `WP_List_Table`, `->get_orderby()` and `->get_order()`. Override the methods in `WP_Posts_List_Table`.

`WP_Posts_List_Table` calls `wp_edit_posts_query()` in `->prepare_items()` which is a wrapper for `wp()`. As such, we can obtain `orderby` and `order` via `get_query_var()`, instead of the URL.

Fixes #25493.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-01 02:10:25 +00:00
Drew Jaynes
8b4c499664 Docs: There are quite alot of typos in core inline comments.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34681 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 04:13:48 +00:00
Drew Jaynes
5ec1077a38 Widgets: Introduce a delete_widget action, which fires after a widget has been marked for deletion.
Props afercia for the initial patch.
Fixes #27444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34678 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 03:21:26 +00:00
Scott Taylor
882c34d555 List Tables: only hide bulk actions when there are no items, don't hide all of the extra table nav.
Fixes #33824.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34671 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-30 00:47:27 +00:00
Gary Pendergast
cf173408cd Permalinks: Add pretty permalinks for unattached attachments.
Previously, unattached attachments would have unsightly `/?attachment_id=1` URLs. As we've moved away from attachments being specifically attached to posts, instead being Media items, this has made the unattached URLs a more common occurrence.

We can breath easy once more, knowing that the world is a little bit safer from the horror of unnecessarily ugly URLs.

Props SergeyBiryukov, wonderboymusic, pento.

Fixes #1914.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34654 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-29 09:42:26 +00:00
Jeremy Felt
5397416276 MS: Delete rewrite_rules when updating a switched site's URL.
Previously, rewrite rules could be flushed and regenerated in the context of another site. Deleting the rules when in a switched state allows for them to be generated properly on the next page view.

Fixes #33816.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 23:24:27 +00:00
Helen Hou-Sandí
e976f9b503 Edit: Remove the redundant "View Post" button-link and link the sample permalink.
Previously there were two persistent "View Post" links on an edit screen: next to the permalink and in the toolbar. This would then become three links after a post was published or updated, as a link is also included in the admin notice. This is a lot of redundancy and visual noise for a flow that is not your primary action upon starting to edit a post. The "View Post" link next to the sample permalink was particularly bad because it is styled like a button, but unlike a button, does not keep you on the current screen.

Because the permalink is now linked, there is no highlighted slug that you can click to edit, but rather just the "Edit" button.

props scribu, lessbloat, sabreuse, SergeyBiryukov, DrewAPicture, helen.
see #18306.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34634 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 20:10:26 +00:00
John Blackbourn
2571b6dcec Correct the logic used when determining whether to display the 'Mine' link on post list tables. It should only be shown when the count for the user's posts differs for the total count of posts. is_multi_author() cannot be used because it only considers Posts.
Fixes #19609

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


git-svn-id: http://core.svn.wordpress.org/trunk@34631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 19:15:24 +00:00
Scott Taylor
8bb4c2c2e9 Theme Editor: ensure that files named index.php in theme subfolders are not labeled as "Main Index Template"
Props MikeHansenMe, wonderboymusic, bravokeyl, Shelob9.
Fixes #27201.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-28 03:11:24 +00:00
Drew Jaynes
a908b87996 Docs: Improve the hook documentation for the plugins_api_args filter.
Standardizes the hook doc summary and expands on the expected type for the `$args` parameter.

See #34035. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 23:03:24 +00:00
Drew Jaynes
9c46e6605e Docs: Improve the hook documentation for the themes_api filter.
Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the `$action` type.

Also updates the expected types on the `$override` parameter.

See #34036. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 23:01:24 +00:00
Drew Jaynes
0d447249c3 Docs: Normalize the data table spacing in the themes_api() DocBlock following a typo fix in [34649].
See #34036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:49:24 +00:00
Drew Jaynes
ad33a92b6b Docs: Fix two typos in the DocBlock description for themes_api():
* The fourth `$action` type is 'feature_list'
* The first `$action` type in the data table should be 'query_themes'

See #34036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34613 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:47:25 +00:00
Drew Jaynes
b27d14ccf3 Docs: Adjust the themes_api() DocBlock description to clarify the "second" available hook, themes_api, and add new information for the "third" hook, themes_api_result.
See #34036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:45:25 +00:00
Drew Jaynes
ed719e4d32 Docs: Improve the hook documentation for the plugins_api filter.
Standardizes the hook doc summary and expands on expected behavior when short-circuiting the request, which is dependent on the `$action` type.

See #34035. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:29:24 +00:00
Drew Jaynes
e7294234b9 Docs: Adjust the plugins_api() DocBlock description to clarify the "second" available hook, plugins_api, and add new information for the "third" hook, plugins_api_result.
See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:23:24 +00:00
Drew Jaynes
61196c4862 Docs: Update the DocBlock summary for plugins_api() to reflect the "WordPress.org" Plugins API.
See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:07:24 +00:00
Drew Jaynes
5b07b691f7 Docs: Further improve documentation for plugins_api().
* Adds a matrix-like data table demonstrating which arguments are available for the different `$action` types
* Adjusts the return types to accommodate an `array` for the 'hot_tags' `$action` choice

Props ocean90.
See #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 22:00:25 +00:00
Drew Jaynes
b6de1478fd Docs: Vastly improve documentation for themes_api().
Adds:
* A hash notation with descriptions for all accepted arguments
* A matrix-like data table demonstrating which arguments are available for the different `$action` types
* A better summary and description with linked hooks
* An improved return description with a link to external information

Props ocean90.
See #34036.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 21:52:25 +00:00
Scott Taylor
f78170934a Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 19:11:26 +00:00
Drew Jaynes
ccef2fc743 Docs: Add documentation for the $browse, $user, $search, $author, $tag, $installed_plugins, and $page parameters in plugins_api().
Props ocean90.
Fixes #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 18:13:48 +00:00
Weston Ruter
7493641f86 Customize: Prevent showing "Front Page" and "Posts Page" states for pages in list table when show_on_front is not "page".
Changing the `show_on_front` option back to "posts" also resets the `page_on_front` and `page_for_posts` options when updating via the Reading settings page. In the Customizer, however, this is not the case as these other options remain unchanged. This change accounts for this difference in behavior.

Fixes #34004.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-26 20:54:25 +00:00
Drew Jaynes
ae91c35cb3 Docs: Add much-needed (and awesome) hash-notation-style documentation for the $args parameter in the plugins_api() DocBlock.
Also fixes up some formatting in the DocBlock summary and description, and adds a link to the function reference, where supplementary information on return object structs and formatting will live.

Props ocean90.
Fixes #34035.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-26 15:13:25 +00:00
Scott Taylor
75b1dde362 Posts List Table: check is_multi_author() before attempting to set ->user_posts_count. Also, don't show "Mine" when the count is the same as "All."
Fixes #19609.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-26 06:51:26 +00:00
John Blackbourn
aa35e473f7 callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead.
Fixes #34032

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


git-svn-id: http://core.svn.wordpress.org/trunk@34530 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 23:58:25 +00:00
Drew Jaynes
3229785656 Docs: Fix the syntax for a mid-file sectional comment in wp-admin/includes/dashboard.php.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 22:51:24 +00:00
Drew Jaynes
115c382132 Docs: Remove an inline comment duplicated by the DocBlock summary for wp_dashboard_trigger_widget_control().
Props tyxla.
Fixes #34014.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 22:50:26 +00:00
Weston Ruter
208330f2dc Customizer: Defer embedding widget controls to improve DOM performance and initial load time.
The Menu Customizer feature includes a performance technique whereby the controls for nav menu items are only embedded into the DOM once the containing menu section is expanded. This commit implements the same DOM deferral for widgets but goes a step further than just embedding the controls once the widget area's Customizer section is expanded: it also defers the embedding of the widget control's form until the widget is expanded, at which point the `widget-added` event also fires to allow any additional widget initialization to be done. The deferred DOM embedding can speed up initial load time by 10x or more. This DOM deferral also yields a reduction in overall memory usage in the browser process.

Includes changes to `wp_widget_control()` to facilitate separating out the widget form from the surrounding accordion container; also includes unit tests for this previously-untested function. Also included are initial QUnit tests (finally) for widgets in the Customizer.

Fixes #33901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 21:02:27 +00:00
Boone Gorges
4e051fa421 After [35461], remove 'page_comments' from database.
* Don't set as part of initial schema.
* Delete as part of the `$unusedoptions` routine.

Props ocean90.
See #8071.
Built from https://develop.svn.wordpress.org/trunk@34562


git-svn-id: http://core.svn.wordpress.org/trunk@34526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 20:50:25 +00:00
Boone Gorges
18d6b3c8dc Force comment pagination on single posts.
Previously, the 'page_comments' toggle allowed users to disable comment
pagination. This toggle was only superficial, however. Even with
'page_comments' turned on, `comments_template()` loaded all of a post's
comments into memory, and passed them to `wp_list_comments()` and
`Walker_Comment`, the latter of which produced markup for only the
current page of comments. In other words, it was possible to enable
'page_comments', thereby showing only a subset of a post's comments on a given
page, but all comments continued to be loaded in the background. This technique
scaled poorly. Posts with hundreds or thousands of comments would load slowly,
or not at all, even when the 'comments_per_page' setting was set to a
reasonable number.

Recent changesets have addressed this problem through more efficient tree-
walking, better descendant caching, and more selective queries for top-level
post comments. The current changeset completes the project by addressing the
root issue: that loading a post causes all of its comments to be loaded too.

Here's the breakdown:

* Comment pagination is now forced. Setting 'page_comments' to false leads to evil things when you have many comments. If you want to avoid pagination, set 'comments_per_page' to something high.
* The 'page_comments' setting has been expunged from options-discussion.php, and from places in the codebase where it was referenced. For plugins relying on 'page_comments', we now force the value to `true` with a `pre_option` filter.
* `comments_template()` now queries for an appropriately small number of comments. Usually, this means the `comments_per_page` value.
* To preserve the current (odd) behavior for comment pagination links, some unholy hacks have been inserted into `comments_template()`. The ugliness is insulated in this function for backward compatibility and to minimize collateral damage. A side-effect is that, for certain settings of 'default_comments_page', up to 2x the value of `comments_per_page` might be fetched at a time.
* In support of these changes, a `$format` parameter has been added to `WP_Comment::get_children()`. This param allows you to request a flattened array of comment children, suitable for feeding into `Walker_Comment`.
* `WP_Query` loops are now informed about total available comment counts and comment pages by the `WP_Comment_Query` (`found_comments`, `max_num_pages`), instead of by `Walker_Comment`.

Aside from radical performance improvements in the case of a post with many
comments, this changeset fixes a bug that caused the first page of comments to
be partial (`found_comments` % `comments_per_page`), rather than the last, as
you'd expect.

Props boonebgorges, wonderboymusic.
Fixes #8071.
Built from https://develop.svn.wordpress.org/trunk@34561


git-svn-id: http://core.svn.wordpress.org/trunk@34525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 20:40:25 +00:00
John Blackbourn
a729efa688 Implement 'Recently Active' functionality for network-wide plugins in the Network Admin.
Fixes #20468
Thanks to WordCamp RI attendees for testing!

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


git-svn-id: http://core.svn.wordpress.org/trunk@34515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 19:16:27 +00:00
John Blackbourn
c69ec5a19a Introduce a send_update_notification_email which controls whether an update notification email is sent for background updates. This filter allows control over each of the update types (plugin, theme, translation) and compliments the automatic_updates_send_debug_email and send_core_update_notification_email filters.
Fixes #33932
Props ronalfy

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


git-svn-id: http://core.svn.wordpress.org/trunk@34507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 14:29:23 +00:00
Scott Taylor
8a8e6557d0 Revisions: add a 'wp_prepare_revision_for_js' filter.
Props jtsternberg, adamsilverstein.
Fixes #28627.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 14:04:24 +00:00
Boone Gorges
fd946a9b5a Pinking shears.
Built from https://develop.svn.wordpress.org/trunk@34534


git-svn-id: http://core.svn.wordpress.org/trunk@34498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 04:44:25 +00:00
Boone Gorges
8b4a5d1ec0 Introduce metadata for taxonomy terms.
Adds a new table to the database schema (`wp_termmeta`), and a set of
`*_term_meta()` API functions. `get_terms()` and `wp_get_object_terms()`
now also support 'meta_query' parameters, with syntax identical to other
uses of `WP_Meta_Query`.

When fetching terms via `get_terms()` or `wp_get_object_terms()`, metadata for
matched terms is preloaded into the cache by default. Disable this behavior
by setting the new `$update_term_meta_cache` paramater to `false`.

To maximize performance, within `WP_Query` loops, the termmeta cache is *not*
primed by default. Instead, we use a lazy-loading technique: metadata for all
terms belonging to posts in the loop is loaded into the cache the first time
that `get_term_meta()` is called within the loop.

Props boonebgorges, sirzooro.
See #10142.
Built from https://develop.svn.wordpress.org/trunk@34529


git-svn-id: http://core.svn.wordpress.org/trunk@34493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-25 03:59:27 +00:00
Andrea Fercia
6fdd384fe0 Comments List Table: fix the translators comment for all count after [34506].
See #17275.
Built from https://develop.svn.wordpress.org/trunk@34508


git-svn-id: http://core.svn.wordpress.org/trunk@34472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 18:40:24 +00:00
Scott Taylor
4671e03766 Comments List Table: include count for "All". Dynamically update.
Fixes #17275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34470 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:57:25 +00:00
John Blackbourn
41edf2bc22 Correctly present an error to the user if the nickname field is empty when updating a user profile. It's strange that this field is required, but it is, so be it.
Fixes #33310
Props prasad-nevase, metodiew

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


git-svn-id: http://core.svn.wordpress.org/trunk@34469 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:49:25 +00:00
Scott Taylor
bc5eb3a623 Comments: add date column to WP_Comments_List_Table to allow sorting and to break out the date/time from the comment content column.
Props jshreve.
Fixes #15520.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34468 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 17:27:26 +00:00
Scott Taylor
5b9af35c4c Comments: update Comment counts dynamically in the Right Now widget based on moderation actions in the Activity widget.
Fixes #10422.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34464 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 15:53:25 +00:00
Drew Jaynes
9dba452afc Docs: Standardize and clarify class DocBlocks for all of the Upgrade API classes.
Standardizes summaries and tags for the following classes:

* `WP_Upgrader`
* `Plugin_Upgrader`
* `Theme_Upgrader`
* `Language_Pack_Upgrader`
* `Core_Upgrader`
* `File_Upload_Upgrader`
* `WP_Automatic_Updater`

See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:54:25 +00:00
Drew Jaynes
dae68e1485 Docs: Clarify the file header for wp-admin/includes/class-wp-upgrader.php.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:44:25 +00:00
Drew Jaynes
8c0a805273 Docs: Mark the optional $upgrader parameter as such and add a description in the DocBlock for Language_Pack_Upgrader::async_upgrade().
See [32655].

See #30989. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:35:25 +00:00
Drew Jaynes
0fc9bed46e Docs: Add a summary, version, and parameter and return descriptions to the DocBlock for WP_Filesystem_ftpsockets::get_contents().
Also reverses the return types as `string` is expected, `false` is the outlier.

See [30978].

See #30989. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:22:24 +00:00
Drew Jaynes
fbb6ef1922 Docs: Add a summary, version, and parameter and return descriptions to the DocBlock for WP_Filesystem_FTPext::get_contents().
Also reverses the return types as `string` is expected, `false` is the outlier.

See [30978].

See #30989. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34457 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 14:11:26 +00:00
Scott Taylor
25f206e01f List Tables: add JS code to dynamically toggle the disabled attribute of the Bulk Actions dropdown and Apply button.
Props wonderboymusic, pareshradadiya.
Fixes #31634.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-24 01:07:24 +00:00
Boone Gorges
3c028a80d4 Allow comment_exists() to match based on GMT date.
The `comment_date_gmt` field of the `wp_comments` table is indexed, which makes
`WHERE` matches against the field much faster than against the unindexed
`comment_date`. For bulk operations like data import, the speed difference can
be meaningful.

We continue to default to 'blog' for `$timezone`, to preserve compatibility
with existing uses.

Props apokalyptik.
Fixes #33871.
Built from https://develop.svn.wordpress.org/trunk@34460


git-svn-id: http://core.svn.wordpress.org/trunk@34424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-23 18:16:26 +00:00
John Blackbourn
af1517279e Avoid a PHP notice if the last_updated property isn't present in a plugin's data from the Plugins API.
Fixes #33024
Props icetee

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


git-svn-id: http://core.svn.wordpress.org/trunk@34422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-23 15:10:25 +00:00
Scott Taylor
939d9b7395 Remove some unused globals and/or their docs.
See ##33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 20:27:25 +00:00
Drew Jaynes
fc3ec39515 Docs: Clarify the file header summary for wp-admin/includes/template-functions.php, introduced in [34241].
See #33413. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:37:25 +00:00
Drew Jaynes
b168337aab Docs: Clarify the file header summary for wp-admin/includes/class-wp-internal-pointers.php, introduced in [34241].
Also adds a missing class DocBlock to `WP_Internal_Pointers`. See [19388].

See #33413. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:35:25 +00:00
Drew Jaynes
2a37e00b92 Docs: Clarify the file header summary for wp-admin/includes/class-walker-category-checklist.php, introduced in [34241].
Also clarifies the class DocBlock summary for `Walker_Category_Checklist`.

See #33413. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:33:48 +00:00
Sergey Biryukov
8db1c75a7e Remove extra HTML from translatable strings in WP_Comments_List_Table::get_views().
Add a context and translator comments.

Props Tmeister for initial patch.
Fixes #31859.
Built from https://develop.svn.wordpress.org/trunk@34424


git-svn-id: http://core.svn.wordpress.org/trunk@34388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:33:25 +00:00
Drew Jaynes
c7022a334d Docs: Clarify the file header summary for wp-admin/includes/class-wp-post-comments-list-table.php, introduced in [34223].
Also clarifies the class DocBlock summary and tags for `WP_Post_Comments_List_Table`.

See #33413. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:31:24 +00:00
Drew Jaynes
d7624168cd Docs: Clarify the class DocBlock summary for WP_Screen.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:28:24 +00:00
Drew Jaynes
ee97475edb Docs: Add a file header to wp-admin/includes/nav-menus.php.
See [34168]. See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 14:27:24 +00:00
Drew Jaynes
e845a6ed97 Docs: Update the file path in the duplicate hook comment for the admin_xml_ns hook in wp-admin/includes/template-functions.php.
The hook was "moved" to the newly-created template-functions.php file via `svn cp` in [34241].

Props dimadin.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 10:32:26 +00:00
Scott Taylor
f9c2a88a8a List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.
Props wonderboymusic, Viper007Bond.
Fixes #21249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 06:06:25 +00:00
Scott Taylor
3c1e05f7c9 Dashboard: 2 submit buttons don't need names.
Props garyc40, gizburdt.
Fixes #16345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 05:45:26 +00:00
Scott Taylor
aa8c76258a After [34374], ensure that $iptc is defined.
See #33772.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34342 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 04:49:24 +00:00
Scott Taylor
1d513fe737 Media: In wp_read_image_metadata(), include IPTC Keywords when available in $meta.
Adds unit test.

Props swissspidy, dbru, SteveHoneyNZ.
Fixes #33772.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 04:19:24 +00:00
Scott Taylor
3ad78c4ec5 Help Tabs: when returning help tabs, return them in order of priority, but also return the items in each priority in the order that they were added.
Fixes #33941.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 03:37:25 +00:00
Drew Jaynes
8241813825 Docs: Move a duplicate hook comment accidentally left behind when its corresponding filter was relocated in [31765].
See #31443. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-21 23:13:26 +00:00
Helen Hou-Sandí
dd08157024 Notices: Add styles for use against white backgrounds.
These colored backgrounds can be accessed by adding the `.notice-alt` class to a notice.

There is also now a large version when using the `.notice-large` class, and a `.notice-title` class that is appropriate for headline text within a large notice.

props paulwilde, hugobaeta, melchoyce.
fixes #32244.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-21 15:26:25 +00:00
Scott Taylor
f4121923da Meta Boxes: In post_categories_meta_box(), convert some spaces to tabs.
Props miyauchi.
Fixes #33945.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-21 15:18:26 +00:00
John Blackbourn
f38013229b Implement a 'Mine' link on post listing screens in the admin area for all users who have authored posts. This feature was previously only available to users who cannot edit other users' posts (namely Authors and Contributors).
Props linuxologos, wonderboymusic
Fixes #19609

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


git-svn-id: http://core.svn.wordpress.org/trunk@34324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 17:28:24 +00:00
Dominik Schilling
ca3e65e20e Upgrader: Avoid using an HTML tag in a translation string, add translator comments.
Props ramiy for initial patch. 
Fixes #31860.
Built from https://develop.svn.wordpress.org/trunk@34352


git-svn-id: http://core.svn.wordpress.org/trunk@34316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 08:59:24 +00:00
Sergey Biryukov
d63bb56030 Pass the current post object to 'page_attributes_meta_box_template' action added in [34340].
Props DrewAPicture.
Fixes #33625.
Built from https://develop.svn.wordpress.org/trunk@34350


git-svn-id: http://core.svn.wordpress.org/trunk@34314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 08:15:28 +00:00
Drew Jaynes
292243944f Docs: Use standardized vernacular in the hook doc summary for the page_attributes_meta_box_template filter, introduced in [34340].
See #33625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 06:38:25 +00:00
Scott Taylor
84da11d918 Pass false as the 2nd argument to class_exists() to disable autoloading and to not cause problems for those who define __autoload().
Fixes #20523.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:52:25 +00:00
Scott Taylor
82709c30d9 The 'get_sample_permalink_html' filter​'s second parameter can be a post ID or a post object. This is confusing. We should pass the post ID and post object separately, for consistency with 'get_sample_permalink' filter added in [34309].
Props SergeyBiryukov.	
Fixes #33927.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 03:26:25 +00:00
Scott Taylor
89a03563c9 In page_attributes_meta_box(), add an action, 'page_attributes_meta_box_template' to allow callbacks to be performed and HTML to be inserted after the title of the Template section.
Props sgrant.	
Fixes #33625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-20 02:40:24 +00:00
Scott Taylor
864b54d46f Export: Add late-escaping to the contents of several nodes to avoid creating invalid XML and XML parse errors.
Props westonruter.
Fixes #33732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 18:53:25 +00:00
Scott Taylor
47fead7a38 Post List Table: 'All' view should be selected when appropriate for paged responses.
Props kraftbj, wonderboymusic.
Fixes #33923.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 18:17:24 +00:00
Scott Taylor
fc8c624a61 Reinstate [34327]. minus the unit test deletion.
Built from https://develop.svn.wordpress.org/trunk@34329


git-svn-id: http://core.svn.wordpress.org/trunk@34293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 17:49:24 +00:00
Scott Taylor
863fd80150 Revert [34327] to fix the accidental deletion of some unit tests.
Built from https://develop.svn.wordpress.org/trunk@34328


git-svn-id: http://core.svn.wordpress.org/trunk@34292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 17:46:24 +00:00
Scott Taylor
003edb6ea7 Export: Add a filer, 'export_wp_filename' to change the filename of the file to download when exporting.
Props MikeHansenMe, wonderboymusic.
Fixes #29500.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 17:44:24 +00:00
Scott Taylor
0fd01b9057 Export: allow Media to exported separately from other types.
Props PhilipLakin.
Fixes #32230.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 16:47:25 +00:00
Scott Taylor
e47963d1e7 Edit Post: When a post is "Pending Review", the "View Post" link should behave like ot does for drafts and generate a preview link.
Props wpdev101.
Fixes #33541.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 16:32:24 +00:00
Scott Taylor
d28e914a06 When applying the 'editable_slug' filter, add a second param that provides more context.
Props MikeSchinkel, jesin.
Fixes #31568.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 05:49:24 +00:00
Dominik Schilling
d1bdd59183 Don't use <code> in translation strings in wp-admin/includes/plugin.php.
Props ramiy.
Fixes #31856.
Built from https://develop.svn.wordpress.org/trunk@34314


git-svn-id: http://core.svn.wordpress.org/trunk@34278 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 20:29:26 +00:00
Dominik Schilling
622d4bd029 Use correct @since tag for wp_ajax_generate_password().
See #33450.
Built from https://develop.svn.wordpress.org/trunk@34313


git-svn-id: http://core.svn.wordpress.org/trunk@34277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 20:19:25 +00:00
Scott Taylor
c43f72fbfb Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.
Props adamsilverstein, wonderboymusic.
Fixes #33450.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 20:14:24 +00:00
Scott Taylor
04f7a0da2f Add a 'get_sample_permalink' filter.
Props SergeyBiryukov, wenthemes, JustinSainton.
Fixes #22338.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 19:28:26 +00:00
Sergey Biryukov
6a6d8ba4b8 Include placeholder in translator comment.
See #31864.
Built from https://develop.svn.wordpress.org/trunk@34305


git-svn-id: http://core.svn.wordpress.org/trunk@34269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 19:01:24 +00:00
Sergey Biryukov
7adaef50bb Include placeholders in translator comments.
See #31857.
Built from https://develop.svn.wordpress.org/trunk@34304


git-svn-id: http://core.svn.wordpress.org/trunk@34268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:58:24 +00:00
Scott Taylor
40c45718af Don't use HTML tags in translation strings in wp_ajax_add_user().
Props ramiy.
Fixes #31864.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:51:26 +00:00
Sergey Biryukov
8f0e1e3c72 Add missing translator comment after [34292].
See #31840.
Built from https://develop.svn.wordpress.org/trunk@34299


git-svn-id: http://core.svn.wordpress.org/trunk@34263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:40:24 +00:00
Sergey Biryukov
844586e889 Add missing translator comments after [34293].
See #31851.
Built from https://develop.svn.wordpress.org/trunk@34298


git-svn-id: http://core.svn.wordpress.org/trunk@34262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:39:23 +00:00
Scott Taylor
ec01716bb2 Don't use HTML tags in translation strings for "In Reply To" links for comments in the admin.
Props ramiy.
Fixes #31857.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:36:24 +00:00
Scott Taylor
15f2e57a5a Don't use HTML tags in translation strings in wp-admin/includes/update.php.
Props ramiy.
Fixes #31855.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:31:25 +00:00
Scott Taylor
318cd61abf Don't use <code> in translation strings in wp-admin/includes/schema.php.
Props ramiy.
Fixes #31851.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34257 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:21:25 +00:00
Scott Taylor
dd6fe1ba32 Network Setup: don't use <code> in translation strings in wp-admin/network files.
Props ramiy.
Fixes #31840.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 18:18:27 +00:00
Aaron Jorbin
10d03c1ab3 Remove support for my-hacks.php
For the last 10 years, my-hacks has been deprecated and has been throwing a deprecation notice. For the last six years, you haven't been able to enable my-hacks.php in the admin UI. That should be enough time to give developers notice. Plugins and themes seem like they might have staying power.

Fixes #33741
Props bobbingwide


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


git-svn-id: http://core.svn.wordpress.org/trunk@34255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 17:06:25 +00:00
Dominik Schilling
f3a62b7714 Theme Editor: Change file descriptions of header.php and footer.php.
`header.php` is now "Theme Header" and `footer.php` is "Theme Footer". This prevents a clash with other "Header" strings in the context of "Custom Header".

Props ramiy.
Fixes #32975.
Built from https://develop.svn.wordpress.org/trunk@34290


git-svn-id: http://core.svn.wordpress.org/trunk@34254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 16:03:24 +00:00
Sergey Biryukov
b92955b427 Network Admin: Include IDs for users and sites on their respective views.
Props danielbachhuber, wonderboymusic.
Fixes #18661.
Built from https://develop.svn.wordpress.org/trunk@34289


git-svn-id: http://core.svn.wordpress.org/trunk@34253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 15:58:25 +00:00
Dion Hulse
6113e498fc Updates: FTP: Add a missing PCRE modifer in [34281].
See #16026, #33432x

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


git-svn-id: http://core.svn.wordpress.org/trunk@34246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 08:23:25 +00:00
Dion Hulse
5abc1eaab9 Updates: FTP/PemFTP Library: Remove the usage of deprecated regular expression functions (ereg replaced by PCRE).
Props enshrined, aaroncampbell
Fixes #16026, #33432

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


git-svn-id: http://core.svn.wordpress.org/trunk@34245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 08:20:27 +00:00
Scott Taylor
48d402a395 Posts List Table: Use a more robust technique for calculating $total_items so that pagination still appears when items are removed on the last page of results and ->max_num_pages decreases.
Props A5hleyRich.
Fixes #29870.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 21:18:24 +00:00
Helen Hou-Sandí
48befcf361 Superglobals: Revert [34059] until further notice.
see #33837.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 12:33:26 +00:00
Sergey Biryukov
514eb11cf4 Revert unintended change from [34262].
See #33910.
Built from https://develop.svn.wordpress.org/trunk@34263


git-svn-id: http://core.svn.wordpress.org/trunk@34227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 09:09:28 +00:00
Sergey Biryukov
d91fe61405 Docs: Expand the DocBlock for get_default_post_to_edit().
Props rabmalin.
Fixes #33910.
Built from https://develop.svn.wordpress.org/trunk@34262


git-svn-id: http://core.svn.wordpress.org/trunk@34226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 09:06:34 +00:00
Scott Taylor
f3dd19c6e2 Media: In wp_ajax_send_attachment_to_editor(), the fallback logic for $html should be tucked into an else statement so it isn't run needlessly and overwritten.
Props tychay.
Fixes #32072.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 05:55:25 +00:00
Scott Taylor
63efd92b11 Media: In get_image_send_to_editor(), allow a custom value for $rel.
Props tychay.
Fixes #32074.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 05:46:24 +00:00
Scott Taylor
58ac764859 Media List Table: remove the counts from the "views" portion of the toolbar, which are inconsistent with grid view. Also reduces complexity and removes potentially expensive count query.
Related to the toolbar view, remove the `wp_admin_canonical_url()` action in grid mode. Grid views that result from links from the list table view are lenses into the library and need to be indicated as such vs being a full attachment query.

Fixes #29744.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 02:30:26 +00:00
Boone Gorges
85c00bd943 Move new user notification emails to add_action() callbacks.
When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to `wp_new_user_notification()`,
making it difficult to stop or modify the messages.

This changeset introduces a number of new action hooks in place of direct calls
to `wp_new_user_notification()`, and hooks the new wrapper function
`wp_send_new_user_notifications()` to these hooks.

Props dshanske, thomaswm, boonebgorges.
Fixes #33587.
Built from https://develop.svn.wordpress.org/trunk@34251


git-svn-id: http://core.svn.wordpress.org/trunk@34215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 22:19:24 +00:00
Scott Taylor
1e3807c10d wp-admin/includes/template.php is now a loader for 3 files made via svn cp:
* `Walker_Category_Checklist` class
* `WP_Internal_Pointers` class
* `template-functions.php`

This is BC for plugins that are loading `wp-admin/includes/template.php` for fun.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:35:23 +00:00
Sergey Biryukov
d06f5817f8 Docs: Expand the DocBlock for the WP_Theme::get_edit_link() method, introduced in [34084].
Fixes #32376.
Built from https://develop.svn.wordpress.org/trunk@34238


git-svn-id: http://core.svn.wordpress.org/trunk@34202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 15:01:27 +00:00
Drew Jaynes
13c25f5f49 Docs: Put "it's" in its place (again).
Props kitchin.
Fixes #33894.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 12:46:28 +00:00
Sergey Biryukov
4c019c6aee Comments: Fix a fatal error in Comments meta box after [34223].
Props tyxla.
Fixes #33893. See #33413.
Built from https://develop.svn.wordpress.org/trunk@34231


git-svn-id: http://core.svn.wordpress.org/trunk@34195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 11:37:25 +00:00
Drew Jaynes
3c73b53f66 Docs: Remove markdown from the DocBlock summary for WP_List_Table::get_primary_column(), introduced in [34166].
The PHP inline documentation standards for [https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#summary-formerly-short-description summaries] call for not using an markup or markdown. Also, using the full Class::method() in this context allows for better clarity in what is being referenced.

See #33854. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 10:51:25 +00:00
Scott Taylor
5920e8eb13 Move WP_Post_Comments_List_Table to its own file.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 06:53:24 +00:00
John Blackbourn
a9e5cfddc7 Implement wp_login_url() and wp_registration_url() in places where wp-login.php is currently hard-coded.
See #31495
Props GregLone

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


git-svn-id: http://core.svn.wordpress.org/trunk@34177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 17:11:35 +00:00
Scott Taylor
ff3ae0e747 Don't redirect to the Term list table after submitting the form on the Edit Term page.
Props chiragswadia, UmeshSingla, rhyswynne, afercia.
Fixes #17455.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:59:42 +00:00
John Blackbourn
a5a8ae45a6 Remove outdated references to the preview_post_link filter docs.
See #24345
Props paulwilde

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


git-svn-id: http://core.svn.wordpress.org/trunk@34146 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 10:32:31 +00:00
Scott Taylor
ab6d1fa247 Use get_attached_file() in attachment_submitbox_metadata().
Props kitchin.
Fixes #33386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34139 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:18:25 +00:00
Scott Taylor
54829b6305 Create a function, get_preview_post_link(), to DRY the logic for applying the 'preview_post_link' filter to a URL.
Props TomHarrigan, wonderboymusic.
Fixes #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:15:25 +00:00
Scott Taylor
ee42803e21 Move WP_Screen to its own file.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34137 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:08:24 +00:00
Scott Taylor
fde014e85e Move the admin Nav Menu Walker subclasses into their own files. Load in nav-menu.php to remain BC.
See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:02:25 +00:00
Scott Taylor
780487556b Add a doc block to WP_List_Table::get_primary_column().
Fixes #33854.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 03:35:25 +00:00
Scott Taylor
191400f9e6 Don't ever use the guid value when retrieving URLs for media, use wp_get_attachment_url(). Use get_attached_file() for path to file.
Fixes #33386.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 02:50:25 +00:00