Commit Graph

31927 Commits

Author SHA1 Message Date
Scott Taylor
c152375b58 Plugins: on the Install page, move the name of each plugin into the <h4> to accommodate screen readers.
Props afercia, ChrisMKindred.
Fixes #32400.


git-svn-id: https://develop.svn.wordpress.org/trunk@34760 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 04:15:12 +00:00
Jeremy Felt
319818a408 Tests: Clarify site option tests storing and retrieving serialized data.
See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34759 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 02:05:23 +00:00
Jeremy Felt
b9e1b4ab7c Tests: Split test_default_filter() Site Option test into multiple tests.
See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34758 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 01:55:52 +00:00
Jeremy Felt
e261546a61 Tests: Split test_the_basics() Site Option test into many tests.
Many assertions in one test are now many tests with one assertion.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34757 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 01:32:09 +00:00
Jeremy Felt
2322255d81 MS: Remove @todo for ms_protect_special_option() from delete_site_option().
This todo has been in place since the original merge of MU. At the time of merge, `wpmu_protect_special_option()` protected an empty array, and there has been no noticeable need since. As we introduce `_network_option()`, let's leave this behind. A new ticket can be opened if necessary.

See #28290.


git-svn-id: https://develop.svn.wordpress.org/trunk@34756 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 22:45:18 +00:00
John Blackbourn
ed81797117 Deprecate get_admin_users_for_domain(). This function has never been used in core.
Fixes #34122


git-svn-id: https://develop.svn.wordpress.org/trunk@34755 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 22:26:19 +00:00
John Blackbourn
d3229b6dfc This function is blessed.
git-svn-id: https://develop.svn.wordpress.org/trunk@34754 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 22:23:51 +00:00
John Blackbourn
cfbd8056c2 Deprecate create_empty_blog(). This function has never been used in core.
Fixes #34120


git-svn-id: https://develop.svn.wordpress.org/trunk@34753 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 22:09:18 +00:00
Dominik Schilling (ocean90)
b2bb4ea2d5 Install: Replace the "Privacy" setting with the "Search Engine Visibility" setting from Reading Settings.
Props Clorith, ocean90.
Fixes #27628.
See #16416.

git-svn-id: https://develop.svn.wordpress.org/trunk@34752 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 21:34:38 +00:00
Dominik Schilling (ocean90)
00762410b0 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34751 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 21:20:09 +00:00
Jeremy Felt
a8b5a8ec63 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34750 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:57:06 +00:00
Jeremy Felt
b71708647c MS: Provide better UI when a main site's /blog prefix is changed.
The main site on a new network is forced by default into using `/blog` as the prefix for its permalink structure. This can be changed easily through the network admin, though the `options-permalink.php` screen is then unusable to make further changes to the structure.

Now, if `/blog/` is not at the beginning of the `permalink_structure` option, we do not force `/blog` as a prefix in the UI.

Fixes #12002.


git-svn-id: https://develop.svn.wordpress.org/trunk@34749 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:38:40 +00:00
Dominik Schilling (ocean90)
2f16a92362 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34748 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 20:24:18 +00:00
Scott Taylor
e0b34f44a3 Shortcodes: Fix PCRE performance bugs in get_shortcode_regexp() and related to wptexturize(), do_shortcode(), and strip_shortcodes()
Alters unit tests.

Props miqrogroove.
Fixes #33517.


git-svn-id: https://develop.svn.wordpress.org/trunk@34747 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 18:04:13 +00:00
Drew Jaynes
08f047176b Docs: Update the argument descriptions for $child_of and $hierarchical in get_pages() to more closely reflect expected behavior.
See #18701. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34746 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 17:39:25 +00:00
Scott Taylor
1b70f27b04 Shortcodes: prevent registration of invalid shortcode names.
Adds unit tests.

Props miqrogroove.
Fixes #34090.


git-svn-id: https://develop.svn.wordpress.org/trunk@34745 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 17:33:58 +00:00
Scott Taylor
3c50d18785 Shortcodes: clarify the @return docs for shortcode_parse_atts().
Props miqrogroove.
See #23307.


git-svn-id: https://develop.svn.wordpress.org/trunk@34744 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 17:31:58 +00:00
Andrea Fercia
875ed40ffb 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34743 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 14:51:25 +00:00
Andrea Fercia
b61d943435 Bump H3 headings to H2 on the Network Site Users screen for better accessibility.
Fixes #34081.

git-svn-id: https://develop.svn.wordpress.org/trunk@34742 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 14:32:15 +00:00
Boone Gorges
2828042b6e Make sure permastruct is set in comments_template() tests.
After [34735].

git-svn-id: https://develop.svn.wordpress.org/trunk@34741 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-01 12:26:33 +00:00
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
9dd6f369cf Fix db_version juggling during non-multisite tests.
Continuing with the "code is poetry" theme after [34719], we need to continue
to update the option in the database on non-multisite in this
`wp_insert_term()` test.

See #31130.

git-svn-id: https://develop.svn.wordpress.org/trunk@34720 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 13:27:09 +00:00
Boone Gorges
13e28a6d34 Prevent Multisite term tests from hitting database for 'db_version'.
[34718] introduced a 'db_version' check to term meta functions, to ensure that
they don't run when the term meta schema is not yet in place. This call to
`get_option()` causes a database hit during Multisite tests, due to the
presence of the `WP_INSTALLING` constant. See #31130. The extra database
queries are causing cache tests to fail.

In similar cases, we have `markTestSkipped()` when `is_multisite()`. Because
the term meta API is so extensive - term meta caches can be primed anywhere a
`WP_Query` loop is fired up - we implement a more generous workaround in this
case. To prevent `get_option( 'db_version' )` from hitting the database during
multisite unit tests, we use a 'pre_option_' filter.

Heaven help us.

See #34091.

git-svn-id: https://develop.svn.wordpress.org/trunk@34719 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 13:08:49 +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
Boone Gorges
30a165a1a5 Fix logical errors in some comment pagination tests.
The tests included in [34669] contained a couple of problems:

* Comments were not always created in the expected order, due to the incorrect use of 'comment_date_gmt'.
* 'asc'/'desc' and 'older'/'newer' were confused.
* 'default_comments_page=newest' ('last') didn't properly account for the cpage=1 offset.

The code itself powering this pagination was correct; it's only the tests that
were wrong.

See #8071.

git-svn-id: https://develop.svn.wordpress.org/trunk@34713 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-30 03:06:22 +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