Commit Graph

8360 Commits

Author SHA1 Message Date
Dion Hulse
e4a147150e 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


git-svn-id: https://develop.svn.wordpress.org/trunk@34740 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 07:45:35 +00:00
Dion Hulse
f99f06206e Updates: SSH2 Transport: Add a connection error when the SFTP subsystem cannot be initialized.
Fixes #33478


git-svn-id: https://develop.svn.wordpress.org/trunk@34739 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:42:20 +00:00
Dion Hulse
bb7763c1d1 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


git-svn-id: https://develop.svn.wordpress.org/trunk@34738 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:39:44 +00:00
Gary Pendergast
f9f56fb942 WPDB: Allow null values in the CRUD functions.
Specifically, `::insert()`, `::replace()`, `::update()`, and `::delete()` can now set a column to `NULL`, or add the `IS NULL` condition to the `WHERE` clause.

This is based on [backpress 279].

Props pento, nbachiyski, sorich87.

Fixes #15158.



git-svn-id: https://develop.svn.wordpress.org/trunk@34737 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:36:15 +00:00
Dion Hulse
3ffcb9548d Press This: Make the regular expressions for matching images easier to read by not requiring escaping.
Fixes #32878


git-svn-id: https://develop.svn.wordpress.org/trunk@34736 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:15:05 +00:00
Boone Gorges
ee2c079ade Ensure that comment permalinks reflect pagination.
After [34561], `wp_list_comments()` no longer passed all of a post's comments
to `Walker_Comments`. As a result, calls to `get_comment_link()` occurring
inside the comment loop had insufficient context to determine the proper
'cpage' value to use when generating comment permalinks. This, in turn, caused
comment permalinks to behave erratically.

The current changeset addresses the problem as follows:

* `get_comment_link()` now accepts a 'cpage' parameter. When present, 'cpage' will be used to build the comment permalink - no automatic calculation will take place.
* When called within the main loop, `wp_list_comments()` calculates the proper 'cpage' value for comments in the loop, and passes it down to `get_comment_link()`.
* `cpage` and `comment-page-x` query vars are generally required in comment permalinks (see #34068), but an exception is made when 'default_comment_page=oldest': the bare post permalink will always be the same as `cpage=1`, so `cpage` is excluded in this case.

Props peterwilsoncc for assiduous spreadsheeting.
Fixes #34073.

git-svn-id: https://develop.svn.wordpress.org/trunk@34735 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:12:39 +00:00
Scott Taylor
c28bc82d4b Canonical: remove unused code (commented-out) from redirect_canonical().
Props hakre, chriscct7.
Fixes #16934.


git-svn-id: https://develop.svn.wordpress.org/trunk@34734 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:08:31 +00:00
Dion Hulse
0e2f9b5019 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


git-svn-id: https://develop.svn.wordpress.org/trunk@34733 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 05:08:07 +00:00
Boone Gorges
d5fdd9084a Correct some WP_Query metadata lazyloading docs.
Props dlh.
Fixes #34047.

git-svn-id: https://develop.svn.wordpress.org/trunk@34732 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 04:00:48 +00:00
Boone Gorges
27eb520f0c s/add_action()/add_filter() in WP_Query metadata lazyloading.
Props dlh.
See #34047.

git-svn-id: https://develop.svn.wordpress.org/trunk@34731 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 04:00:41 +00:00
Boone Gorges
a7dbb948c5 Prevent extra db queries in WP_Comment::get_children().
`WP_Comment_Query::fill_descendants()` queries for a comment tree in a way that
minimizes database overhead, and places the located descendants with their
proper parents. However, it doesn't touch leaf nodes - comments with no
children - so future calls to `get_children()` on those comment objects
result in unnecessary database queries. To prevent this, `fill_descendants()`
now sets a `populated_children` flag on all located `WP_Comment` objects.

See #8071.

git-svn-id: https://develop.svn.wordpress.org/trunk@34730 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 03:57:53 +00:00
Boone Gorges
f14dc03ad6 Simplify pagination logic in comments_template().
[34561] "fixed" the problem of newest-first comments showing fewer than
'per_page' comments on the post permalink when the total number of comments
was not divisible by 'per_page'. See #29462. But this fix caused numerous
other problems. First, comment pages reported by `get_page_of_comment()`
(which expects comment pages to be filled oldest-first) were no longer correct.
Second, and more seriously, the new logic caused comments to be shifted
between pages, making their permalinks non-permanent.

The current changeset reverts the changed behavior. In order to preserve the
performance improvements introduced in [34561], an additional query must be
performed when 'default_comments_page=newest' and 'cpage=0' (ie, you're viewing
the post permalink). A nice side effect of this revert is that we no longer
need the hacks required to determine proper comment pagination, introduced in
[34561].

See #8071. See #34073.

git-svn-id: https://develop.svn.wordpress.org/trunk@34729 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 03:10:13 +00:00
Scott Taylor
63b6bc751d 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@34728 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 02:09:41 +00:00
Drew Jaynes
ed1240234d Formatting: Rename the $richedit parameter in format_to_edit() to $rich_text.
Previously, it was necessary to explain in a double-negative that `$richedit` being false would prevent `$content` from being passed through `esc_textarea()`. The updated `$rich_edit` name and documentation now better reflects the intent of the parameter.

Fixes #21613.


git-svn-id: https://develop.svn.wordpress.org/trunk@34727 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 02:00:42 +00:00
Helen Hou-Sandi
f737a197c2 Comments: Trash blacklisted comments by default.
If trash is disabled, they wil continue to go into spam like they do now.

props wonderboymusic, solarissmoke, MikeHansenMe.
fixes #7051.


git-svn-id: https://develop.svn.wordpress.org/trunk@34726 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 01:48:14 +00:00
Drew Jaynes
3725408616 Docs: Document declaration of the $submenu_file global in wp-admin/menu-header.php.
See #24531. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34725 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 01:47:07 +00:00
Drew Jaynes
72e5ad9390 Declare the $submenu_file global to avoid a notice generated by passing it as a parameter to the submenu_file hook, introduced in [34722].
Fixes #24531.


git-svn-id: https://develop.svn.wordpress.org/trunk@34724 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 01:22:55 +00:00
Helen Hou-Sandi
11144bd39e Don't show the "Add New" link on post-new.php.
Using the same `$post_new_file` global variable name in `wp-admin/menu.php` in [33723] was unintentional, but we're already unsetting other variables that are in global scope so we can just unset this one as well. Someday the admin menu won't be a big pile of sad and cryptic globals. Maybe.

props johnjamesjacoby, norcross.
fixes #34045.


git-svn-id: https://develop.svn.wordpress.org/trunk@34723 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 00:47:22 +00:00
Sergey Biryukov
be98773ac9 Add 'submenu_file' filter for the file of an admin menu sub-menu item.
This complements the `'parent_file'` filter added in [12712].

Props swissspidy, kraftbj.
Fixes #24531.

git-svn-id: https://develop.svn.wordpress.org/trunk@34722 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 00:22:37 +00:00
Weston Ruter
00f500f135 Customize: Style the nav menu "Add Items" button as disabled when reordering.
Fixes CSS selector to match what is being used for the "Add Widget" button in the customizer.

Props umesh.nevase.
Fixes #34102.


git-svn-id: https://develop.svn.wordpress.org/trunk@34721 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 22:54:59 +00:00
Boone Gorges
8e0b9bae2e Bail out of termmeta functions if schema is not up-to-date.
Termmeta cache priming was throwing database errors on installations that had
not yet gone through the database update routine. To avoid errors in all cases,
the check has been added to all termmeta functions. These checks will be
removed in a future version of WordPress. (Hang on to your hats!)

Fixes #34091.

git-svn-id: https://develop.svn.wordpress.org/trunk@34718 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:52:28 +00:00
Drew Jaynes
69db043e3c Docs: There are quite alot of typos in core inline comments.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34717 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:12:16 +00:00
Boone Gorges
87fbd30548 Use array hash notation for get_comment_link() $args.
See #34068, #34073.

git-svn-id: https://develop.svn.wordpress.org/trunk@34716 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 04:12:06 +00:00
Drew Jaynes
bd01019c21 Themes: Introduce three new arguments for get_the_post_navigation(), in_same_term, excluded_terms, and taxonomy.
The addition of these new arguments brings `get_the_post_navigation()` into argument parity with `get_previous_post_link()` and `get_next_post_link()`, both of which it wraps, and will allow for more flexibility in configuring the next and previous post links for simultaneous display in themes.

Props ChaseWiseman.
Fixes #32618.


git-svn-id: https://develop.svn.wordpress.org/trunk@34715 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 03:40:52 +00:00
Drew Jaynes
a774dfbb08 Widgets: Introduce a delete_widget action, which fires after a widget has been marked for deletion.
Props afercia for the initial patch.
Fixes #27444.


git-svn-id: https://develop.svn.wordpress.org/trunk@34714 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 03:20:41 +00:00
Drew Jaynes
13aeda2ef7 Docs: Mark a few optional parameters as such in wp-includes/rewrite-functions.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34712 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 02:41:49 +00:00
Boone Gorges
283c38c022 Improve lazyloading of comment meta in WP_Query loops.
Lazy-loading logic is moved to a method on `WP_Query`. This makes it possible
for comment feeds to take advantage of metadata lazyloading, in addition to
comments loaded via `comments_template()`.

This new technique parallels the termmeta lazyloading technique introduced in
[34704].

Fixes #34047.

git-svn-id: https://develop.svn.wordpress.org/trunk@34711 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 01:34:54 +00:00
Scott Taylor
686ef2bd79 List Tables: .column-date needs to become wider at smaller screen sizes, bump it from 10% to 14% at the breakpoint to prevent wrapping.
Fixes #32691.


git-svn-id: https://develop.svn.wordpress.org/trunk@34710 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 01:24:33 +00:00
Scott Taylor
876c8611f1 Revert [34083], I was willing to try this out for the greater good. The good was not greater. There is too much baggage associated with this specific change as pertains to BC and expected layout.
See #32691.


git-svn-id: https://develop.svn.wordpress.org/trunk@34709 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 01:18:55 +00:00
Scott Taylor
427f4fe063 Rewrite: allow add_rewrite_rule|WP_Rewrite::add_rule() to accept an associative array for the value of $redirect instead of requiring a query string.
Adds unit tests.

Props scribu, DrewAPicture.
Fixes #16840.


git-svn-id: https://develop.svn.wordpress.org/trunk@34708 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 01:10:03 +00:00
Scott Taylor
27bc50cef8 List Tables: only hide bulk actions when there are no items, don't hide all of the extra table nav.
Fixes #33824.


git-svn-id: https://develop.svn.wordpress.org/trunk@34707 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 00:46:15 +00:00
Drew Jaynes
2b8df0b47a Docs: Add an @see reference for the "use-instead-of" function in the DocBlock for force_ssl_login(), deprecated in [34700].
See #34011. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34706 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 22:45:56 +00:00
Drew Jaynes
0150a52379 Users: Add the default arguments array as a second parameter to the wp_dropdown_users_args filter, introduced in [34692].
Adjust hook doc descriptions accordingly.

See #19867.


git-svn-id: https://develop.svn.wordpress.org/trunk@34705 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 22:38:12 +00:00
Boone Gorges
e75f2c024f Improve lazyloading of term metadata in WP_Query loops.
[34529] introduced lazyloading for the metadata belonging to terms matching
posts in the main `WP_Query`. The current changeset improves this technique
in the following ways:

* Term meta lazyloading is now performed on the results of all `WP_Query` queries, not just the main query.
* Fewer global variable touches and greater encapsulation.
* The logic for looping through posts to identify terms is now only performed once per `WP_Query`.

Props dlh, boonebgorges.
See #34047.

git-svn-id: https://develop.svn.wordpress.org/trunk@34704 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 21:59:44 +00:00
Scott Taylor
e04d0dd623 Customizer: make "Current header" clickable in the same way that "Background Image" is - will open the media modal.
Props umesh.nevase.
Fixes #33586.


git-svn-id: https://develop.svn.wordpress.org/trunk@34702 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 21:39:55 +00:00
Scott Taylor
3d06ffcbbc Network Upgrade: switch <h3> to <h2>.
Props afercia.
Fixes #34082.


git-svn-id: https://develop.svn.wordpress.org/trunk@34701 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 21:27:42 +00:00
John Blackbourn
0058018799 Deprecate force_ssl_login(), which is simply a wrapper for force_ssl_admin() and is not used in core.
Fixes #34011


git-svn-id: https://develop.svn.wordpress.org/trunk@34700 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 21:27:40 +00:00
Boone Gorges
49063d8e14 WP_Query should not ignore an offset of 0.
Props mazurstas.
Fixes #34060.

git-svn-id: https://develop.svn.wordpress.org/trunk@34697 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 19:36:16 +00:00
Boone Gorges
3b7187eade Fix 'exclude_tree' in wp_list_categories().
The 'exclude_tree' parameter must be compatible with 'hierarchical';
previously, 'hierarchical' canceled it out. This changeset also makes it so
that 'exclude_tree' is compatible with 'exclude'. When both are passed, and
'hierarchical' is true, the descendant trees of terms in both parameters will
be excluded from matched terms.

Props tott, webord, MikeHansenMe.
Fixes #12981.

git-svn-id: https://develop.svn.wordpress.org/trunk@34696 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 19:11:12 +00:00
Andrea Fercia
c81fe78b9c Bump H3 headings to H2 on the Network Settings screen for better accessibility.
Fixes #34078.

git-svn-id: https://develop.svn.wordpress.org/trunk@34695 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 18:51:20 +00:00
John Blackbourn
644632bec5 Revert the introduction of validation of the comment author's email address when sanity checking input in wp-comments-post.php (introduced in r34274). This allows a problematic email address to fall through to the correct validation routine and show the "Please enter a valid email address" as expected.
Fixes #23416


git-svn-id: https://develop.svn.wordpress.org/trunk@34693 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 17:26:44 +00:00
Drew Jaynes
077854484d Users: Introduce the wp_dropdown_users_args filter, making it possible to filter the arguments for wp_dropdown_users() before the query is run.
The 'name' argument (or the `WP_Screen` object if in the admin) can be used to help target specific instances of `wp_dropdown_users()` via this hook.

Props norcross.
See #19867.


git-svn-id: https://develop.svn.wordpress.org/trunk@34692 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 15:39:26 +00:00
John Blackbourn
a8f9ae8161 On the Permalink Settings screen, add a link to the Nginx documentation when the current site is running Nginx. This is in lieu of showing actual Nginx configuration like we do for mod_rewrite or IIS.
Fixes #18852


git-svn-id: https://develop.svn.wordpress.org/trunk@34691 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 11:14:23 +00:00
Gary Pendergast
ce14a63214 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@34690 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 09:41:14 +00:00
DrewAPicture
133b204471 Docs: Move the hook doc to once again directly precede the hook line for the getarchives_where filter following [34686].
See #21596.


git-svn-id: https://develop.svn.wordpress.org/trunk@34689 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 06:38:02 +00:00
Scott Taylor
1ac3ba0828 Allow wp_get_archives() to accept post_type as an arg.
Adds unit test.

Fixes #21596.


git-svn-id: https://develop.svn.wordpress.org/trunk@34686 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 05:10:10 +00:00
Gary Pendergast
070b65dcfc Rewrite: Redirect attachment URLs when their slug changes.
Using the same logic that we use to redirect posts when their slug changes, we can provide the same functionality for attachments. Attachment pages are posts, too.

Props swissspdy.

Fixes #34043.



git-svn-id: https://develop.svn.wordpress.org/trunk@34685 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 04:57:02 +00:00
Scott Taylor
0ab0525691 Edit Media: wrap long filenames in the Publish meta box.
Fixes #34069.


git-svn-id: https://develop.svn.wordpress.org/trunk@34684 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 04:50:08 +00:00
Scott Taylor
999e54c8d3 RSS Widget: add a class, rss-widget-icon, to the RSS icon to allow devs to hide it. Not going to remove to not break visual BC.
Fixes #22010.


git-svn-id: https://develop.svn.wordpress.org/trunk@34683 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 04:31:10 +00:00
Scott Taylor
948ab018d2 XML-RPC: calculate the proper offset for GMT in wp.newPost, mw.newPost, and mw.editPost when post_date is set, wp.editComment when comment_date is set. post|comment_date is assumed to be GMT. This is only true if the timezone string for the site matches GMT.
Adds unit tests for each.

Props smerriman, justdaiv, wonderboymusic.
Fixes #30429.


git-svn-id: https://develop.svn.wordpress.org/trunk@34681 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 04:04:16 +00:00
Boone Gorges
36af857315 Don't require explicit taxonomy when getting terms by term_taxonomy_id.
Props wonderboymusic.
Fixes #30620.

git-svn-id: https://develop.svn.wordpress.org/trunk@34679 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 03:51:11 +00:00
Drew Jaynes
3edc3b46f2 Introduce get_the_author_posts_link(), which returns the HTML link to the author page for the current post's author.
`the_author_posts_link()` has in-turn been converted into a wrapper, with most of its logic moved to the new function.

Adds tests for the new function.

Props chipbennett, zrothauser, wonderboymusic, DrewAPicture.
Fixes #30355.


git-svn-id: https://develop.svn.wordpress.org/trunk@34677 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 01:48:47 +00:00
Jeremy Felt
fbce07b386 Docs: Clarify $user parameter documentation in wpmu_validate_blog_signup.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34676 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 01:32:47 +00:00
John Blackbourn
f0200152be Revert r34674 due to failures on PHP < 5.4.
See #16859


git-svn-id: https://develop.svn.wordpress.org/trunk@34675 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 01:00:17 +00:00
John Blackbourn
2183725c54 Avoid stripping square brackets from URLs, and instead correctly encode them.
Square brackets must be encoded in the path, path parameters, query parameters, and fragment, but must not be encoded in anything up to the domain and port.

Adds a bunch of tests, including square brackets in query parameters, IPv6 URLs, and several other permutations.

See #16859


git-svn-id: https://develop.svn.wordpress.org/trunk@34674 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-29 00:40:30 +00:00
Jeremy Felt
8f4a6370f0 Fixes #33816.
MS: Adjust formatting of code in `site-new.php` to improve readability.

Fixes #34066.


git-svn-id: https://develop.svn.wordpress.org/trunk@34673 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 23:29:40 +00:00
Jeremy Felt
bf4846985f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34672 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 23:23:44 +00:00
Helen Hou-Sandi
94f596278c Sample permalink: Buttons still need the .button class.
Also fixes unit tests post-[34670]. The test methods have been slightly renamed because it is no longer a button. Hopefully this name will be more future-proof.

see #18306.


git-svn-id: https://develop.svn.wordpress.org/trunk@34671 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 22:06:15 +00:00
Helen Hou-Sandi
106f0b7b7b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34670 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 20:09:19 +00:00
Boone Gorges
f261d3ac8a Fix comment_order for single page comment threads.
The old comment pagination logic had a separate block for comment threads that
appeared on a single page. After the refactoring in [34561], all comment
pagination logic is unified.

This change ensures that 'comment_order' is respected in all scenarios.

Fixes #8071.

git-svn-id: https://develop.svn.wordpress.org/trunk@34669 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:29:22 +00:00
John Blackbourn
ac85963ad4 Correctly slash post fields when trashing and untrashing posts.
Fixes #27550
Props dmenard, Denis-de-Bernardy


git-svn-id: https://develop.svn.wordpress.org/trunk@34668 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:25:05 +00:00
John Blackbourn
9271360932 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


git-svn-id: https://develop.svn.wordpress.org/trunk@34667 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 19:14:56 +00:00
John Blackbourn
aaa6e1c27e Add a nav_menu_item_title filter for filtering nav menu item titles.
Fixes #33447
Props paulwilde


git-svn-id: https://develop.svn.wordpress.org/trunk@34666 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 18:40:56 +00:00
John Blackbourn
01ae35dc58 Add a missing @param doc for confirm_another_blog_signup().
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@34665 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 17:57:05 +00:00
John Blackbourn
8823432749 Update get_the_post_thumbnail_url() so it returns false on failure, to bring it inline with wp_get_attachment_image_url(). Correct and introduce new tests.
Fixes #33070


git-svn-id: https://develop.svn.wordpress.org/trunk@34663 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:33:12 +00:00
Drew Jaynes
7fce79698a Widgets: Pass $instance to the widget_nav_menu_args filter in the Custom Menu widget.
Props walterbarcelos for the initial patch.
Fixes #33944.


git-svn-id: https://develop.svn.wordpress.org/trunk@34662 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:30:21 +00:00
Boone Gorges
c1d7e7f5aa In get_page_of_comment(), use a true COUNT query.
This improves memory usage by not compiling a list of comment IDs.

See #34057.

git-svn-id: https://develop.svn.wordpress.org/trunk@34661 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:09:46 +00:00
Boone Gorges
05e0a3b97e Use correct 'page_id' parameter in get_page_of_comment().
See #34057.

git-svn-id: https://develop.svn.wordpress.org/trunk@34660 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 15:09:34 +00:00
Gary Pendergast
6d87c4cecb Rewrite: When redirecting old slugs, include URL endpoints.
Historically, `wp_old_slug_redirect()` has only ever redirected the old slug of posts, it hasn't included URL endpoints, or worked with comment feed URLs. By adding support for these, we ensure a greater range of URLs aren't killed when the slug changes.

Props swissspdy.

Fixes #33920.



git-svn-id: https://develop.svn.wordpress.org/trunk@34659 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 06:56:54 +00:00
Scott Taylor
b59df508cf 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34658 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 03:10:08 +00:00
Scott Taylor
9d0f206ee1 After [34629], use $size_class instead of $size.
See #32093.


git-svn-id: https://develop.svn.wordpress.org/trunk@34657 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 02:49:05 +00:00
Gary Pendergast
2b78c9579a WPDB: Make sure we don't run sanity checks on DB dropins.
Previously, we'd run the sanity checks if `is_mysql` was not set to `false`. This caused problems for DB drop-ins that didn't define `is_mysql` at all. Instead, we can just check if `is_mysql` is `empty()`.

Also fix some unit tests that accidently ran correctly because of the strict `false ===` comparison.

Fixes #33501.



git-svn-id: https://develop.svn.wordpress.org/trunk@34655 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 01:16:29 +00:00
Scott Taylor
a155c5dcfd After [34200], force 'before' and 'after' to <ul> and </ul> when wp_nav_menu() falls back to wp_page_menu().
See #11095.


git-svn-id: https://develop.svn.wordpress.org/trunk@34653 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:38:32 +00:00
Drew Jaynes
8594d93d7b 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34652 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:02:47 +00:00
Drew Jaynes
df542a1802 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34651 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 23:00:08 +00:00
Drew Jaynes
c6c2afd70b Docs: Normalize the data table spacing in the themes_api() DocBlock following a typo fix in [34649].
See #34036.


git-svn-id: https://develop.svn.wordpress.org/trunk@34650 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:48:06 +00:00
Drew Jaynes
8fa143dc2e 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34649 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:46:37 +00:00
Drew Jaynes
9e4c655b2a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34648 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:44:18 +00:00
Drew Jaynes
c82483fcbc 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34647 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:28:38 +00:00
Drew Jaynes
ed0ef8e2c0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34645 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:22:32 +00:00
Drew Jaynes
c64bab4531 Docs: Slightly improve the readability of the data table in the DocBlock description for the oembed_providers hook by centering the HTTPS column.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34644 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:11:01 +00:00
Scott Taylor
813bff7bdb Canonical: after [34272], don't redirect rewrite endpoints on attachment URLs when pretty permalinks are enabled.
Fixes #19918.


git-svn-id: https://develop.svn.wordpress.org/trunk@34643 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:10:08 +00:00
Drew Jaynes
b9944f6331 Docs: Update the DocBlock summary for plugins_api() to reflect the "WordPress.org" Plugins API.
See #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34642 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 22:06:37 +00:00
Drew Jaynes
40c3091ee3 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34641 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:59:12 +00:00
Drew Jaynes
e712f041e2 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34640 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:51:18 +00:00
John Blackbourn
a0be6bbb12 Don't set CURLOPT_CAINFO when sslverify is false when sending HTTP API requests through cURL. This avoids sending redundant information to cURL, and avoids a bug in Apple's SecureTransport library which causes a request to fail when a CA bundle is set but certificate verification is disabled.
This fixes issues with local HTTPS requests (eg. WP Cron) on OS X where cURL is using SecureTransport instead of OpenSSL.

Fixes #33978


git-svn-id: https://develop.svn.wordpress.org/trunk@34639 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 21:37:00 +00:00
Helen Hou-Sandi
deb42cc66f Autoprefixer for [34634].
Normally when there are multiple comma-separated values in CSS, each one would go on its own indented line. However, Autoprefixer appears to be tripping up on gradients at the moment, so it's going to stay on one line until we investigate upstream.

see #33299.


git-svn-id: https://develop.svn.wordpress.org/trunk@34637 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 19:16:35 +00:00
Scott Taylor
8fa5426485 Users List Table: show the "Change role to" dropdown on the top and bottom. Currently only shows on top.
See #27743.


git-svn-id: https://develop.svn.wordpress.org/trunk@34636 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 19:10:08 +00:00
Drew Jaynes
b3f49e0cdf Docs: Fix some syntatical issues in the DocBlock for WP::send_headers() following [34632].
See #20226. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34635 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:48:14 +00:00
Scott Taylor
4dc810ad3c Feature Image: Improve the preview for transparent background images by using CSS3 to show a checkered background.
Props metodiew.
Fixes #33299.


git-svn-id: https://develop.svn.wordpress.org/trunk@34634 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:40:40 +00:00
Scott Taylor
f802fef76f Update the docs in WP to explain the need to do [34476].
Fixes #20226.


git-svn-id: https://develop.svn.wordpress.org/trunk@34632 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:27:15 +00:00
Drew Jaynes
fe14c06e0a Docs: Add documentation for the $browse, $user, $search, $author, $tag, $installed_plugins, and $page parameters in plugins_api().
Props ocean90.
Fixes #34035.


git-svn-id: https://develop.svn.wordpress.org/trunk@34631 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:12:59 +00:00
Scott Taylor
61d6854bae Nav Menus: in wp_nav_menu(), $container is already bound to a list of allowed tags. PHP, being its whimsical self, while return true if someone sets $container to true via in_array( true, [ 'div', 'nav' ] ). Check that $container is a string before the in_array() check. 'true' does not pass.
Props shedonist for the original patch.
Fixes #32464.


git-svn-id: https://develop.svn.wordpress.org/trunk@34630 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:12:20 +00:00
Scott Taylor
b45a72a67c Add size-$size class to <img> in wp_get_attachment_image().
Fixes #32093.


git-svn-id: https://develop.svn.wordpress.org/trunk@34629 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 17:54:01 +00:00
Boone Gorges
de0b5c846f Introduce 'the_category_list' filter.
Used to filter categories as structured data, before building markup in
`get_the_category_list()`.

We use this filter in addition to upstream filters (such as
'get_the_categories'`) because those upstream filters are used in numerous
contexts, while `'the_category_list'` is always used for generating markup
for display.

Props KevinB, ericlewis, SergeyBiryukov, DrewAPicture.
Fixes #9227.

git-svn-id: https://develop.svn.wordpress.org/trunk@34625 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 02:21:43 +00:00
Boone Gorges
c39a4a6447 Pass the post ID to the get_the_categories filter.
Props SergeyBiryukov.
See #9227.

git-svn-id: https://develop.svn.wordpress.org/trunk@34624 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 02:16:23 +00:00
Drew Jaynes
5d9625c28c Restore and deprecate the WP_Widget_Recent_Comments::flush_widget_cache() method, removed in [34580].
Fixes #25556.


git-svn-id: https://develop.svn.wordpress.org/trunk@34622 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 01:39:37 +00:00
Drew Jaynes
7510d4e58c Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Nav_Menu_Widget.
Props leemon.
Fixes #34015. Fixes #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34621 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 01:15:13 +00:00
Drew Jaynes
982d5b99ea Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Archives.
Props leemon.
Fixes #34016. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34620 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 01:10:38 +00:00
Drew Jaynes
9909c7ff2b Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Calendar.
Props leemon.
Fixes #34017. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34619 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 01:06:20 +00:00
Drew Jaynes
b8264d11bc Docs: Improve documentation for the __construct(), widget(), update(), form(), and _get_current_taxonomy() methods in WP_Widget_Categories.
Props leemon.
Fixes #34018. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34618 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 01:03:31 +00:00
Drew Jaynes
aec4d6abe9 Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Links.
Props leemon.
Fixes #34019. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34617 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:59:44 +00:00
Drew Jaynes
e9f835dc43 Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Meta.
Props leemon.
Fixes #34020. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34616 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:57:03 +00:00
Drew Jaynes
f90a2dbe1c Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Pages.
Props leemon.
Fixes #34021. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34615 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:53:36 +00:00
Drew Jaynes
f2af1a6a1f Docs: Improve documentation for the __construct(), recent_comments_style(), widget(), update(), and form() methods in WP_Widget_Recent_Comments.
Also fixes a typo in the class DocBlock.

Props leemon.
Fixes #34022. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34614 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:50:04 +00:00
Drew Jaynes
fdd92e64cd Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Recent_Posts.
Also fixes a typo in the class DocBlock.

Props leemon.
Fixes #34023. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34613 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:45:42 +00:00
Drew Jaynes
14cac9aded Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_RSS.
Props leemon.
Fixes #34024. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34612 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:41:47 +00:00
Drew Jaynes
f111c41375 Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Search.
Props leemon.
Fixes #34025. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34611 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:36:26 +00:00
Drew Jaynes
b28f41f852 Docs: Improve the documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Tag_Cloud.
Props leemon.
Fixes #34026. See #34013.


git-svn-id: https://develop.svn.wordpress.org/trunk@34610 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:31:59 +00:00
Drew Jaynes
d6169cab23 Docs: Improve documentation for the __construct(), widget(), update(), and form() methods in WP_Widget_Text.
(first!) Props leemon.
Fixes #34027.


git-svn-id: https://develop.svn.wordpress.org/trunk@34609 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 00:26:56 +00:00
Weston Ruter
ab7d1ae62d 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34605 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 20:53:32 +00:00
Scott Taylor
591b743362 After [34577], alter wp_xmlrpc_server::mw_newMediaObject() to check upload space in multisite.
See #21292.


git-svn-id: https://develop.svn.wordpress.org/trunk@34603 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 19:48:57 +00:00
Boone Gorges
eb8b241559 Improve post field lazyloading for comments.
[34583] modified comment queries so that all post fields are no longer loaded
by default. Instead, they are loaded only when requested on individual comment
objects. This changeset improves that flow:

* `WP_Comment` magic methods `__isset()` and `__get()` should only load the post when a post field is being requested.
* The new `update_comment_post_cache` argument for `WP_Comment_Query` allows developers to specify that, when comments are queried, all of the posts matching those comments should be loaded into cache with a single DB hit. This parameter defaults to false, since typical comment queries are linked to a single post.

Fixes #27571.

git-svn-id: https://develop.svn.wordpress.org/trunk@34599 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 16:01:05 +00:00
Dominik Schilling (ocean90)
5da80b3d64 Plugins: Don't request all fields via plugins_api( 'plugin_information' ) for plugin installs and update checks.
The Plugins API returns a lot of data by default (see [34596]) but when installing or checking for updates we don't need all of it. To save bandwidth, memory and time request only required fields.

Fixes #34030.

git-svn-id: https://develop.svn.wordpress.org/trunk@34598 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 15:49:06 +00:00
John Blackbourn
60660b0055 Remove the unnecessary horizontal rules in the oEmbed providers table to tidy up the Code Reference.
See #32246


git-svn-id: https://develop.svn.wordpress.org/trunk@34597 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 15:16:05 +00:00
Drew Jaynes
de8abd004f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34596 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 15:12:51 +00:00
Boone Gorges
ecf4b81d72 Use correct property name when setting child comments.
This fixes a typo from [34546], uncovered by unrelated changes in [34583].

See #8071, #27571.

git-svn-id: https://develop.svn.wordpress.org/trunk@34595 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 14:40:15 +00:00
Sergey Biryukov
5569780f8a Replace a stray semicolon on Edit Page screen with a full stop.
Props manolis09, sjmur.
Fixes #33297.

git-svn-id: https://develop.svn.wordpress.org/trunk@34594 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 13:43:31 +00:00
Drew Jaynes
11e0b8d0b0 Docs: Fix a minor typo from [34592]. Meant to be past-tense, not present.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34593 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 13:13:50 +00:00
Drew Jaynes
b68ae42ddd Docs: Add missing parameter documentation for $profileuser in the hook doc for show_password_fields, added in [11302].
Also adds a changelog entry for when the parameter was introduced.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34592 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 13:10:47 +00:00
Sergey Biryukov
411f0f126e Network Admin: Properly pass the number of delete plugins to the corresponding message.
Fixes #33239.

git-svn-id: https://develop.svn.wordpress.org/trunk@34591 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 13:10:05 +00:00
Drew Jaynes
35837a00b7 Docs: Relocate the hook doc for the show_password_fields filter to its duplicate, since the original was removed in [34582].
Adds a changelog entry noting the adjustment in behavior, and simplifies the conditional logic.

Fixes #15115.


git-svn-id: https://develop.svn.wordpress.org/trunk@34590 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 13:04:23 +00:00
Drew Jaynes
8ec9d5e9e9 Docs: Adjust the table of providers in the hook doc for oembed_providers to use "No" instead of "!" to signify lack of SSL support.
When displayed in the Code Reference, the "!" doesn't convey enough information.

See #32246. See #28507.


git-svn-id: https://develop.svn.wordpress.org/trunk@34589 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 12:49:44 +00:00
John Blackbourn
4b9cee0af7 Switch to the https oEmbed endpoint for Animoto because it redirects there anyway.
See #28507


git-svn-id: https://develop.svn.wordpress.org/trunk@34588 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 12:23:21 +00:00
John Blackbourn
b387869c4e Switch to the https oEmbed endpoint for Dailymotion so secure embeds are supported.
See #28507


git-svn-id: https://develop.svn.wordpress.org/trunk@34587 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 11:50:35 +00:00
Sergey Biryukov
fc98253836 Twenty Fifteen: Add missing commas in rtl.css.
Props netweb.
Fixes #33985.

git-svn-id: https://develop.svn.wordpress.org/trunk@34586 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 10:48:57 +00:00
Scott Taylor
10133131e7 Docs: object != class
See [33893] et al.


git-svn-id: https://develop.svn.wordpress.org/trunk@34585 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 07:03:17 +00:00
Scott Taylor
1d6c744604 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34584 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 06:50:03 +00:00
Scott Taylor
706a62a134 Comments: add __get() and __set() to WP_Comment to provide BC for plugins that are grabbing post properties from the comment object due to an (unintended?) side effect of JOINing with the posts table in WP_Comment_Query, see [17667]. 'fields' used to default to *, so the JOIN would grab every field from both tables. #YOLO
Since [34310], these properties no longer exist. We can lazy load them for plugins with the magic methods. 

Fixes #27571.


git-svn-id: https://develop.svn.wordpress.org/trunk@34583 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 06:40:39 +00:00
Scott Taylor
1543fbf91b Profile: on user-new.php, don't allow the password fields to be hidden. When hidden, you can't add a user.
Props coffee2code.
Fixes #15115.


git-svn-id: https://develop.svn.wordpress.org/trunk@34582 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 06:14:25 +00:00
Scott Taylor
bdce0b8174 Recent Comments Widget: a la [34464], this widget has the same mixed content issues. Remove the fragment caching. The comment queries are now split to scale. This was the only remaining widget with an HTML fragment cache.
Fixes #25556.


git-svn-id: https://develop.svn.wordpress.org/trunk@34581 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 06:00:09 +00:00
Scott Taylor
881808bb11 XML-RPC: in wp_xmlrpc_server::wp_editTerm(), check ! empty when applying parent logic.
Adds unit tests.

Props hrishiv90, markoheijnen, sam2kb.
Fixes #21977.


git-svn-id: https://develop.svn.wordpress.org/trunk@34580 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:30:34 +00:00
Scott Taylor
90ad5546d5 XML-RPC: upgrade the resposnse ofwp_xmlrpc_server::mw_newMediaObject() based on work down in 3.4 so that it runs the struct through ->_prepare_media_item().
Props markoheijnen.
Fixes #6430.


git-svn-id: https://develop.svn.wordpress.org/trunk@34579 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:14:08 +00:00
Scott Taylor
20020ebf2b XML-RPC: move the malfunctioning 'overwrite' code from wp_xmlrpc_server::mw_newMediaObject(). This was suggested 3 years ago.
Props markoheijnen.
Fixes #17604.


git-svn-id: https://develop.svn.wordpress.org/trunk@34578 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 05:02:24 +00:00
Scott Taylor
daa01c703b Cron: In spawn_cron(), when using ALTERNATE_WP_CRON, return early for any non-GET, instead of naively checking ! empty( $_POST ).
Props johnbillion, markoheijnen.
Fixes #27447.


git-svn-id: https://develop.svn.wordpress.org/trunk@34576 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:50:06 +00:00
Scott Taylor
69f20d3c4b XML-RPC: In wp_xmlrpc_server::wp_getComments(), allow post_type to be passed as part of $struct.
Props nprasath002.
Fixes #20026.


git-svn-id: https://develop.svn.wordpress.org/trunk@34575 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:44:51 +00:00
Scott Taylor
0cafccfb32 XML-RPC: In wp_xmlrpc_server::wp_getUsersBlogs(), return the isPrimary flag for each blog.
Props SergeyBiryukov, daniloercoli.
Fixes #25958.


git-svn-id: https://develop.svn.wordpress.org/trunk@34574 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:34:50 +00:00
Scott Taylor
95a810258c XML-RPC: In wp_xmlrpc_server::blogger_editPost(), make use of the $publish arg (the 6th arg passed to the method) to specify publish or draft. Restores the arg, which I removed in [31092], because it was unused cruft.
Props mdawaffe.
Fixes #10764.


git-svn-id: https://develop.svn.wordpress.org/trunk@34573 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 04:00:32 +00:00
Scott Taylor
9cf6b6f2d0 XML-RPC: In wp_xmlrpc_server::mw_newPost(), if $dateCreated is not set, don't set post_date and post_date_gmt. It calls wp_insert_post(), which will handle it correctly. The problem was drafts being created and GMT date being set. It shouldn't be.
Adds unit test.

Fixes #16985.


git-svn-id: https://develop.svn.wordpress.org/trunk@34572 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 03:37:53 +00:00
Scott Taylor
faad66d510 XML-RPC: IXR_Server::output() is notoriously bad at returning the right value for the Content-Length HTTP header. This header is not required, so we will remove it.
"We could of course remove the content-length header as it is not required" was suggested 10 years ago. The IXR library is not maintained. Our release is the latest, which occurred in 2010.

Fixes #2567.


git-svn-id: https://develop.svn.wordpress.org/trunk@34571 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 03:10:23 +00:00
Scott Taylor
0d3da57a9a XML-RPC: wp.getComments should be allowed to return approved comments to those without the 'moderate_comments' cap.
Adds (rewrites) unit tests from 4 years ago that we never committed because....

Props wonderboymusic, koke, ericmann, nprasath002.
Fixes #17981.


git-svn-id: https://develop.svn.wordpress.org/trunk@34570 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 02:48:47 +00:00
Scott Taylor
e09edc2d7f Comments: in WP_Comment::get_children(), accept an array so that the values for format, status, hierarchical, and orderby can be passed, instead of just format. The defaults for get_comments() include status = 'all' and orderby = '' - which is no bueno.
For threaded comments, we need comments to be retrieved within bounds, so logged-out users don't see unmoderated comments on the front end, etc.

Updates unit tests.

See #8071.


git-svn-id: https://develop.svn.wordpress.org/trunk@34569 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 02:24:17 +00:00
John Blackbourn
1bb2876fe6 callback is not a valid type in PHP, PSR-5, or phpDocumentor. callable should be used instead.
Fixes #34032


git-svn-id: https://develop.svn.wordpress.org/trunk@34566 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 23:57:46 +00:00
Drew Jaynes
ea23f4603c Docs: Fix the syntax for a mid-file sectional comment in wp-admin/includes/dashboard.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34565 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 22:50:58 +00:00
Drew Jaynes
7a74f67964 Docs: Remove an inline comment duplicated by the DocBlock summary for wp_dashboard_trigger_widget_control().
Props tyxla.
Fixes #34014.


git-svn-id: https://develop.svn.wordpress.org/trunk@34564 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 22:49:02 +00:00
Weston Ruter
78b73c8906 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34563 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 21:01:46 +00:00
Boone Gorges
0604eff2e2 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34562 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:49:47 +00:00
Boone Gorges
0b7e8399b0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34561 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:39:18 +00:00
DrewAPicture
653ababa6f Docs: Improve the method docs for the widget(), update(), form(), and __construct() methods in the WP_Widget base class.
See #34013. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34560 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:30:02 +00:00
Scott Taylor
a9e30d8e94 XML-RPC: Introduce the concept of unit testing to wp_xmlrpc_server::wp_newComment():
* Don't allow comments to be created for posts that have `comment_status` set to `'closed'`
* Set some magic props on `WP_User` to vars before passing them to `wp_xmlrpc_server::escape()`

Props wonderboymusic, jesin.
Fixes #27471.


git-svn-id: https://develop.svn.wordpress.org/trunk@34559 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:19:19 +00:00