Felix Arntz
51c38bec8b
Multisite: Replace is_super_admin()
with manage_network_users
when trying to add an existing user via username.
...
Props dhanendran.
Fixes #39202 . See #37616 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39935 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:48:31 +00:00
Felix Arntz
043cf0fc00
Multisite: Replace is_super_admin()
with manage_network_users
when checking for users autocomplete capabilities.
...
Props ashokkumar24.
Fixes #39201 . See #37616 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39934 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:42:21 +00:00
Felix Arntz
d0bdcb93f0
Multisite: Replace is_super_admin()
with manage_network_options
in wp-admin/options.php
.
...
Props sathyapulse.
Fixes #39200 . See #37616 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39933 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:38:15 +00:00
Felix Arntz
60f3612684
Multisite: Do not check for is_super_admin()
when trying to set user settings.
...
The checks were introduced in [22256] to prevent user settings to be set for super admins that were not a member of the current site. However the latter should apply to any kind of user, so the `is_super_admin()` check is redundant. Furthermore, removing these checks is necessary for the ongoing effort to get rid of `is_super_admin()` checks in general.
Props chandrapatel for initial patch.
Fixes #39199 . See #37616 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39932 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:32:13 +00:00
Sergey Biryukov
c0926aa662
REST API: Add group
and description to WP_Test_REST_Request_Validation
.
...
Props danielbachhuber.
Fixes #39654 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39931 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:12:59 +00:00
Felix Arntz
efbe7902ce
Multisite: Display correct scheme for the main site in site-info.php
.
...
Props greatislander.
Fixes #39365 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39930 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 17:02:37 +00:00
Felix Arntz
29aa25c4af
Multisite: Correct and improve i18n strings in wp-signup.php
.
...
The strings addressing the network administrator in `wp-signup.php` were still using the old terminology of blogs and sites. Furthermore concatenation of the strings has been removed to make them i18n-friendly.
Props jignesh.nakrani, SergeyBiryukov.
Fixes #39611 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39929 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 16:51:59 +00:00
Adam Silverstein
3a449139db
Menus: trigger an event when menu items are added or removed.
...
Fire a `menu-item-added` event after a menu item is added to the DOM. Fire a `menu-removing-item` event before a menu item is removed from the DOM. Enables hooking into and responding to menu changes.
Props welcher, adamsilverstein.
Fixes #31218 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39928 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 16:14:23 +00:00
Sergey Biryukov
83e7606f76
Customize: Remove redundant context for "Reorder" and "Done" strings in nav menu and widget area controls to ensure consistent translations.
...
Props pavelevap, Presskopp.
Fixes #33747 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39927 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 05:59:32 +00:00
Sergey Biryukov
1925fd16e4
Media: Pass the current attachment object to display_media_states
filter, for consistency with display_post_states
.
...
Props pbiron, chriseverson.
Fixes #39628 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39926 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-20 05:19:26 +00:00
Sergey Biryukov
7a9d5c9ab9
Media: After [36837], check the correct theme modification name for custom logo in _media_states()
.
...
Props pbiron, mitraval192.
Fixes #39627 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39925 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-19 02:02:39 +00:00
Weston Ruter
4e8e97983c
Customize: Allow custom post types to be used in starter content.
...
Changes `WP_Customize_Nav_Menus::insert_auto_draft_post()` so it can be invoked for a `post_type` that is not registered (yet).
See #38615 , #38114 .
Fixes #39610 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39924 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-19 00:00:24 +00:00
Ryan McCue
7d2c104068
REST API: Correctly serve the index with PATH_INFO
...
When hitting the index, untrailingslashit() would make the REST route empty, which would then use the fallback inside WP_REST_Server. This isn't a problem most of the time, but WP_REST_Server contains a fallback to PATH_INFO. Combined with PATH_INFO permalinks, this would give a 404 on the API index, as it attempts to look up a route for "/wp-json/".
Props ccprog.
Fixes #39432 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39923 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 05:39:15 +00:00
Ryan McCue
bbf129c935
REST API: Allow shortcircuiting rest_pre_insert_comment
...
rest_pre_insert_{post_type} allows returning a WP_Error from the filter to shortcircuit actually creating the object, so it makes sense to do so for comments too.
Props dspilka.
Fixes #39578 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39922 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 05:17:15 +00:00
Gary Pendergast
16bbc492a5
dbDelta: Ignore index subparts when checking for duplicate indices.
...
If index lengths change in table definitions, we don't recreate the index - instead, we throw a database error, as `dbDelta()` tries to create a new index with the same name.
It's better to leave the index as is, MySQL doesn't have an efficient process for resizing indices, and dropping/creating is a slow process which we don't want to trigger automatically.
Fixes #34870 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39921 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 04:00:09 +00:00
Sergey Biryukov
0358e8e2cf
Users: Introduce signup_site_meta
and signup_user_meta
for filtering signup metadata in wpmu_signup_blog()
and wpmu_signup_user()
, respectively.
...
Props Mista-Flo.
Fixes #39223 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39920 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 03:52:24 +00:00
Sergey Biryukov
97a4d6c16d
Build/Test Tools: Add assertNotFalse()
method to WP_UnitTestCase
and use it where appropriate.
...
Props peterwilsoncc.
Fixes #39219 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39919 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 03:39:36 +00:00
Sergey Biryukov
550818ac31
Build/Test Tools: Correctly reference function names in @covers
entries.
...
Props pbearne.
Fixes #39235 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39918 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 02:43:25 +00:00
Sergey Biryukov
15346053d6
List Tables: Pass the $which
parameter to restrict_manage_posts
filter instance in WP_Media_List_Table
, missed in [37422].
...
Props wpsmith.
Fixes #38772 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39917 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 02:37:14 +00:00
Andrew Ozz
e3ffbce181
TinyMCE: strip browser inserted <u>
and <font>` tags from inside links when copying and pasting in IE and Edge.
...
Fixes #39570 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39916 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-17 01:24:35 +00:00
Gary Pendergast
8e3b56fbe3
User Query: Cast $user_total
as an int
.
...
The `$user_total` member of `WP_User_Query`, and corresponding `get_total()` method, have always been documented as returning an `int`. `$user_total`, however, is populated by `$wpdb->get_var()`, which returns
a string (containing an integer value). Casting the return value from `get_var()` as an `int` rectifies this discrepency.
Props runciters.
Fixes #39297 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39915 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 23:23:06 +00:00
Andrew Ozz
708c750b2e
Tests: wpautop()
should not add extra </p>
before <figcaption>
.
...
Props pbearne.
See #39307 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39914 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 17:56:34 +00:00
James Nylen
79589f4195
REST API: Improve test coverage of single user endpoint for public data.
...
Add test coverage for requests of a single user resource for authors of post types registered as:
- public = true, show_in_rest = true: success without auth.
- public = true, show_in_rest = false: fail without auth.
- public = false, show_in_rest = true: success without auth.
- public = false, show_in_rest = false: fail without auth.
See #38878 .
Fixes #39546 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39913 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 16:21:00 +00:00
Andrew Ozz
14e5a08f5c
Formatting: fix wpautop()
to stop adding paragraph tags around <figcaption>
.
...
Fixes #39307 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@39912 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 01:05:33 +00:00
Andrew Ozz
f8cc0fda44
Docs: some improvements/fixes for editor.js.
...
See #38933 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39911 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 00:48:49 +00:00
Andrew Ozz
cc8cc98e92
TinyMCE: ensure the inline toolbar is shown and properly positioned when there are several wpview blocks in the editor and the user selects one after the other.
...
Props gitlost.
Fixes #38849 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39910 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-16 00:21:29 +00:00
Sergey Biryukov
19ca7cb022
Twenty Seventeen: Remove duplicate global $post
declaration in twentyseventeen_front_page_section()
.
...
Props ixkaito.
Fixes #39590 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39909 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 12:49:25 +00:00
Sergey Biryukov
2904099432
I18N: Reference correct placeholder in a translator comment added in [30333].
...
See #30264 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39908 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 08:06:50 +00:00
Sergey Biryukov
fa174e4a06
Users: Display the name of user being edited on Edit User screen.
...
Props seanchayes.
Fixes #28182 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39907 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 07:13:11 +00:00
Sergey Biryukov
40f076d756
Themes: Add a unit test for get_theme_feature_list()
to make sure that the list of theme features pulled from the WordPress.org API returns the expected data structure.
...
Props iandunn.
Fixes #28121 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39906 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 06:50:00 +00:00
Sergey Biryukov
1348f5f3fe
Posts, Post Types: Increase the height of post slug input to prevent certain characters from being cut in Firefox on Windows.
...
Props Ankit K Gupta, Presskopp.
Fixes #28084 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39905 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 04:02:26 +00:00
Andrew Ozz
e66dc656b3
TinyMCE: prevent the inline toolbar from appearing on partially selected wpview nodes. This can happen when HTML is initially loaded in the editor and wpview is the first node, or sometimes on repeatedly pasting the same wpview.
...
Props gitlost.
Fixes #38849 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39904 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 02:59:45 +00:00
Andrew Ozz
7592ee11bd
TinyMCE: when inserting a wpview, place the caret after is so the user can continue typing without interruption.
...
Props iseulde.
Fixes #39337 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39903 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 02:40:30 +00:00
Andrew Ozz
976976b4a1
TinyMCE: improve removal of spaces from empty paragraphs when loading HTML in the editor.
...
Fixes #39437 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39902 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-15 02:05:44 +00:00
Sergey Biryukov
2fa90d1077
Twenty Seventeen: Correct @param
entries for twentyseventeen_custom_colors_css
filter.
...
Props Soean.
Fixes #39575 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39901 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 15:02:08 +00:00
Sergey Biryukov
e6ae5711e5
Docs: Add missing @param
type for wp_cache_get_last_changed()
.
...
Props afzalmultani, Soean.
Fixes #39571 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39900 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 14:15:22 +00:00
Sergey Biryukov
287e5501ab
REST API: Update unit tests to account for the string changes in [39896].
...
See #39054 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39899 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 05:14:43 +00:00
Sergey Biryukov
2f6e33dd2e
Build/Test Tools: After [29858], update .jsintrc
to use spaces, not tabs.
...
Props netweb.
Fixes #39359 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39898 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 04:44:53 +00:00
SergeyBiryukov
fa4968e343
Administration: Improve tab character width in Plugins and Themes editor.
...
Props afercia.
Fixes #38684 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39897 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 04:40:02 +00:00
Sergey Biryukov
18eab18694
REST API: Improve error messages for number relational validation.
...
Props jblz.
Fixes #39054 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39896 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 04:37:03 +00:00
Sergey Biryukov
ce89e8dd48
Taxonomy: Add an explanation for "Parent" dropdown for hierarchical custom taxonomies.
...
Props F J Kaiser, raggedrobins, DrewAPicture, diddledan, SergeyBiryukov.
Fixes #23447 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39895 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-13 04:18:16 +00:00
Sergey Biryukov
040362a5e0
Twenty Seventeen: Remove extra asterisk from a translator comment so the comment could be parsed correctly.
...
Props swissspidy.
See #39116 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39894 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 21:36:13 +00:00
Sergey Biryukov
bce2389633
Docs: In wp_set_object_terms()
, add a note that passing an empty value as $terms
argument will remove all related terms.
...
Props barryceelen.
Fixes #36690 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39893 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 06:53:21 +00:00
Sergey Biryukov
c2fe0f3dc1
Widgets: In unregister_sidebar()
, rename the $name
parameter to $sidebar_id
for consistency with is_registered_sidebar()
.
...
Also correct the parameter type in `@param` entry.
Props Soean, tmatsuur.
Fixes #35147 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39892 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 06:37:06 +00:00
Sergey Biryukov
d788c3ffed
Media: Use a consistent error message for file type errors on uploading.
...
Props pavelevap, jackreichert.
Fixes #33242 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39891 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 06:28:32 +00:00
Sergey Biryukov
e9be135754
Docs: Use a consistent description for $plugin
parameter in various plugin API functions.
...
See #36333 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39890 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 06:15:23 +00:00
Sergey Biryukov
1c66c0ac3c
Docs: Improve the DocBlock for validate_plugin()
.
...
Props theMikeD.
Fixes #36333 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39889 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 06:14:31 +00:00
Sergey Biryukov
02cd4a1e97
Docs: After [37083], change "HEX format" to "3- or 6-digit hexadecimal form" for clarity.
...
Props swissspidy, theMikeD.
Fixes #36336 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39888 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 05:55:01 +00:00
Sergey Biryukov
98657431de
Docs: Make $meta
parameter description in multisite signup and registration functions more consistent.
...
See #38781 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39887 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 05:20:57 +00:00
Sergey Biryukov
41134d34da
Users: In wpmu_signup_blog()
and wpmu_signup_user()
, pass unserialized signup meta data to after_signup_site
and after_signup_user
filters introduced in [34112], to match the documented value.
...
Props MaximeCulea.
Fixes #38781 .
git-svn-id: https://develop.svn.wordpress.org/trunk@39886 602fd350-edb4-49c9-b593-d223f7449a82
2017-01-12 04:56:28 +00:00