Commit Graph

31948 Commits

Author SHA1 Message Date
Helen Hou-Sandi
3cde6d29c7 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34833 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 19:28:19 +00:00
Drew Jaynes
3e29193b98 Revisions: Also pass the $revision post object to the wp_prepare_revision_for_js filter, introduced in [34541].
Props helen.
Fixes #28627.


git-svn-id: https://develop.svn.wordpress.org/trunk@34832 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:32:38 +00:00
Drew Jaynes
d95423c091 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34831 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 18:02:41 +00:00
Weston Ruter
32b604e984 Customizer: Fix moving focus to available nav menu items search.
Fixes regression introduced in [34219].

Props tyxla.
See #33360.
Fixes #34125 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@34829 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:26:59 +00:00
Boone Gorges
578134d4ff 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@34828 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 15:05:26 +00:00
Drew Jaynes
d67c6d2ade Docs: Add a missing DocBlock summary for wp_list_widget_controls_dynamic_sidebar().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34827 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:05:53 +00:00
Drew Jaynes
39af3ca810 Docs: Add missing DocBlock summaries for five functions in wp-admin/includes/template-functions.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34826 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 03:02:20 +00:00
Drew Jaynes
4e86eb7cd4 Docs: Add missing DocBlock summaries to three functions in wp-admin/includes/plugin.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34825 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:54:56 +00:00
Drew Jaynes
960526cdbc Docs: Add missing summaries for functions in wp-admin/includes/misc.php.
Also restructures the summary for `update_home_siteurl()`.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34824 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:51:08 +00:00
Drew Jaynes
e9e26c5726 Docs: Add missing DocBlock summaries for a multitude of functions in wp-admin/includes/media.php.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34823 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:43:49 +00:00
Drew Jaynes
61cd633892 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34822 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:34:47 +00:00
Drew Jaynes
c8537e7ced Docs: Add missing summaries for three deprecated admin functions: dropdown_categories(), dropdown_link_categories(), and wp_dropdown_cats().
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34821 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-05 02:28:33 +00:00
Sergey Biryukov
37dfbef847 Use home_url() instead of get_option( 'siteurl' ) in notifications that are sent when a user's email address or password is changed.
Props tyxla, ramay.
Fixes #34071.

git-svn-id: https://develop.svn.wordpress.org/trunk@34820 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 23:02:18 +00:00
Jeremy Felt
bb8ca3bd5f MS: Populate site_name property in a new WP_Network.
This allows us to reduce some extra handling in `ms-settings.php`. Requires [34777].

Props johnjamesjacoby for the initial patch.
See #31985.


git-svn-id: https://develop.svn.wordpress.org/trunk@34819 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 20:50:48 +00:00
Drew Jaynes
f5066a38f2 Docs: Document the plugin data array returned by get_plugin_data() with a hash-notation.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34818 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 19:05:38 +00:00
Drew Jaynes
b1ed6b5f18 Widgets: Add more tests for registering and unregistering sidebars with 1) no ID, 2) a string ID, 3) a numeric ID.
See #17078.


git-svn-id: https://develop.svn.wordpress.org/trunk@34817 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 05:22:11 +00:00
Drew Jaynes
572fd0a45b Widgets: Add tests for dynamic_sidebar() where sidebars were registered with 1) no supplied ID, 2) a numeric ID, 3) a string ID.
See #17078.


git-svn-id: https://develop.svn.wordpress.org/trunk@34816 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-04 04:43:46 +00:00
Boone Gorges
1c44c6011e Rechristen the get_page_of_comment filter.
See [34808].

Props DrewAPicture, SergeyBiryukov.
Fixes #13939.

git-svn-id: https://develop.svn.wordpress.org/trunk@34815 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 22:43:01 +00:00
Jeremy Felt
f7647bac89 MS: Align HTML structure in wp-signup.php and wp-activate.php.
Assigns the `wp-activate-container` and `wp-signup-container` to the container inside `#signup-container` on each. This container already existed in `wp-signup.php` and is new in `wp-activate.php`.

Props ocean90.
Fixes #25478.


git-svn-id: https://develop.svn.wordpress.org/trunk@34814 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 21:50:24 +00:00
Drew Jaynes
14b8056d24 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34813 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 21:48:35 +00:00
Boone Gorges
ffa997a342 Update the taxonomy relationship cache in is_object_in_term().
This function attempts to read from the relationship cache, and uses any data
it finds. If it finds no data, it does a query for the data it needs. Since we
are going to the trouble to query for the relationships, and since we are
already using cached data when available, let's go ahead and cache it for
later use.

Props joehoyle, boonebgorges.
Fixes #32044.

git-svn-id: https://develop.svn.wordpress.org/trunk@34812 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 21:18:55 +00:00
Boone Gorges
8974a2bb33 Don't prime term meta cache in is_object_in_term().
Term meta is not necessary in this case, so priming the cache wastes a query.

See #10142, #32044.

git-svn-id: https://develop.svn.wordpress.org/trunk@34811 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 21:07:01 +00:00
Drew Jaynes
0ea2acb720 Tests: Permalink Structures Phase II: DRY up logic for setting permalink structures in test methods.
Renames `reset_permalinks()` to `set_permalink_structure()` (mimicking `$wp_rewrite->set_permalink_structure()`) and allows it to accept an optional permalink structure. In this way, we can double dip using it to both set and reset the permalink structure from anywhere.

Removes alot of duplicated code from tests.

See #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@34810 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 20:54:11 +00:00
Boone Gorges
eebe549408 When creating terms, avoid false dupe checks due to accented characters.
`wp_insert_term()` doesn't allow the creation of a term when the term `name`
is the same as another term in the same hierarchy level of the same taxonomy.
Previously, this duplicate check used `get_term_by( 'name' )`, which uses the
database collation to determine sameness. But common collations do not
distinguish between accented and non-accented versions of a character. As a
result, it was impossible to create a term 'Foo' if a sibling term with an
accented character existed.

We address this problem by using `get_terms()` to do the duplicate check. This
query returns all potentially matching terms. We then do a stricter check
for equivalence in PHP, before determining whether one of the matches is
indeed a duplicate.

Props boonebgorges, tyxla, geza.miklo, mehulkaklotar.
Fixes #33864.

git-svn-id: https://develop.svn.wordpress.org/trunk@34809 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 20:24:09 +00:00
Boone Gorges
8b8dcb2ae4 Introduce 'page_of_comment' filter.
This filter allows developers to modify the output of `get_page_of_comment()`.

As a side effect of this new filter, comment page numbers will always be
returned as integers. Previously, they would sometimes be returned as floats -
eg `float(2.0)` instead of `int(2)`.

Props laceous.
See #13939.

git-svn-id: https://develop.svn.wordpress.org/trunk@34808 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 19:38:49 +00:00
Drew Jaynes
01f25fa247 Tests: Last try: It's redundant to reset permalinks on tearDown() if we're already doing it on every setUp().
Removes the restoration logic, which leveraged a static property initialized with `get_option()`.

See #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@34807 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 19:26:24 +00:00
Boone Gorges
3b89b3ca28 Use 'comments_per_page' option as fallback in get_page_of_comment().
The function now uses the following order of precedence when calculating
comment pagination: 1. the 'per_page' value passed in the `$args` array,
2. the 'comments_per_page' query var in `$wp_query`, and 3. the
'comments_per_page' setting from options-discussion.php. This change allows
`get_page_of_comment()` to return an accurate value before the main query
has been run.

Props laceous.
See #13939.

git-svn-id: https://develop.svn.wordpress.org/trunk@34806 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 19:25:25 +00:00
Boone Gorges
ddc75e22ee Only count top-level comments when calculating threaded pagination.
The change in [34535] did not properly account for threading.

See #13939, #11334.

git-svn-id: https://develop.svn.wordpress.org/trunk@34805 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 19:15:55 +00:00
Boone Gorges
b240a2a939 Ensure that WP_User_Query vars are filled after 'pre_get_users'.
This prevents notices from being thrown when a 'pre_get_users' callback
removes required values from the list of `query_vars`.

For backward compatibility with previous uses of 'pre_get_users', default
values are parsed both before and after the action is fired.

Fixes #33449.

git-svn-id: https://develop.svn.wordpress.org/trunk@34804 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 18:44:40 +00:00
Drew Jaynes
9cdffaaed8 Tests: Move the global permalinks reset routine to only fire when running core tests.
Should fix intermittent mysqli response errors in the AJAX tests.

See #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@34803 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 18:35:58 +00:00
Drew Jaynes
adffdab161 Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown().
See #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@34802 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 17:14:12 +00:00
Sergey Biryukov
4fc732d804 Add missing unit tests from [34799].
Props johnbillion.
See #34059.

git-svn-id: https://develop.svn.wordpress.org/trunk@34801 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 15:09:57 +00:00
Sergey Biryukov
02f76495c6 Add single-{post_type}-{post_name}.php to the top of the template hierarchy for single posts.
This is consistent with page and taxonomy templates, which support slugs as well.

Props ericjuden, johnbillion.
Fixes #18859.

git-svn-id: https://develop.svn.wordpress.org/trunk@34800 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 14:59:46 +00:00
Sergey Biryukov
fb6b3313c7 Abstract functionality from wp-comments-post.php into a function, wp_handle_comment_submission().
Add unit tests.

Props johnbillion.
Fixes #34059.

git-svn-id: https://develop.svn.wordpress.org/trunk@34799 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 14:46:09 +00:00
Sergey Biryukov
ef1a428bd5 Merge some strings with the same meaning in wp-includes/class-wp-xmlrpc-server.php.
Props pavelevap.
Fixes #33644.

git-svn-id: https://develop.svn.wordpress.org/trunk@34798 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 14:08:43 +00:00
Sergey Biryukov
ee0d153629 Merge some strings in wp-admin/upload.php with existing strings with the same meaning.
Props pavelevap.
Fixes #31727.

git-svn-id: https://develop.svn.wordpress.org/trunk@34797 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 13:56:05 +00:00
Drew Jaynes
433f6600c0 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@34796 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 07:23:20 +00:00
Boone Gorges
da083f165d Remove search_terms from WP_Query doc block.
It's not actually a query param.

Introduced in [28887].

git-svn-id: https://develop.svn.wordpress.org/trunk@34795 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 04:35:57 +00:00
Sergey Biryukov
68f5a79880 Respect the force_delete parameter of get_delete_post_link().
Previously, it only worked if `EMPTY_TRASH_DAYS` was disabled.

Props johnbillion, chriscct7.
Fixes #26832.

git-svn-id: https://develop.svn.wordpress.org/trunk@34794 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 01:49:52 +00:00
John Blackbourn
96faf97a0f Adjust _default_wp_die_handler() formatting so it doesn't confuse Sublime Text's parsing and syntax highlighting.
Fixes #34135


git-svn-id: https://develop.svn.wordpress.org/trunk@34793 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 01:31:26 +00:00
Boone Gorges
e677f26aa8 Remove dead code added to get_comment_link() in [34735].
See #34073.

git-svn-id: https://develop.svn.wordpress.org/trunk@34792 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 01:26:40 +00:00
Sergey Biryukov
217d44bd60 Twenty Fifteen: Document the 'twentyfifteen_color_schemes' filter.
Props DrewAPicture.
Fixes #34119.

git-svn-id: https://develop.svn.wordpress.org/trunk@34791 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 01:09:20 +00:00
John Blackbourn
2212c0f858 Use wp_login_url() for login links when signing up for a new blog or activating a new blog on Multisite.
Fixes #31495
Props GregLone for the intial patch


git-svn-id: https://develop.svn.wordpress.org/trunk@34790 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 00:33:47 +00:00
Weston Ruter
2ef0449316 Customize: Fix nav_menu_item CSS classes array being incorrectly presented in input field as comma-delimited list.
Instead of using `Array.toString()` to serialize an array with comma delimiters, explicitly `join` the array using spaces instead. Also ensure that `xfn` is handled properly if it ever gets stored as an array. 

Props tyxla, westonruter.
Fixes #34111.


git-svn-id: https://develop.svn.wordpress.org/trunk@34788 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-03 00:14:22 +00:00
John Blackbourn
066eed4902 Introduce a register_taxonomy_args filter for filtering the arguments passed when calling register_taxonomy(). This is the taxonomy equivalent of the newly introduced register_post_type_args filter.
Fixes #33990
Props tyxla for initial patch


git-svn-id: https://develop.svn.wordpress.org/trunk@34787 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 23:56:16 +00:00
John Blackbourn
780460af28 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


git-svn-id: https://develop.svn.wordpress.org/trunk@34786 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 23:43:20 +00:00
John Blackbourn
337b94a0a5 Add VideoPress as a trusted oEmbed provider.
Fixes #34031
Props kraftbj


git-svn-id: https://develop.svn.wordpress.org/trunk@34785 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 23:19:18 +00:00
John Blackbourn
4703e75f31 shttp is not a protocol.
See #27115


git-svn-id: https://develop.svn.wordpress.org/trunk@34784 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 22:47:41 +00:00
John Blackbourn
3fee278cf4 Switch the remaining user-facing links to wordpress.org over to HTTPS.
Fixes #27115


git-svn-id: https://develop.svn.wordpress.org/trunk@34783 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 22:45:53 +00:00
Drew Jaynes
bf22859e52 Docs: Fix the placement and ordering of some @since tags following [34780].
See #12133. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@34782 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 20:49:49 +00:00