Permalink
Commits on Jan 24, 2017
  1. Multisite: Show menu items in `My Sites > Network Admin` admin bar me…

    …nu based on more precise capability checks.
    
    Previously the menu items would all be displayed solely based on the `manage_network` capability. This change provides parity with the network admin menu.
    
    Unit tests for the network admin menu functionality of `wp_admin_bar_my_sites_menu()` have been added.
    
    Props chandrapatel.
    Fixes #39082.
    
    Built from https://develop.svn.wordpress.org/trunk@39948
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  2. Multisite: Replace `is_super_admin()` with a proper capability check …

    …when showing a notice about `WPLANG`.
    
    In multisite, the notice is displayed to users that have the `manage_network_options` capability. In non-multisite, the notice is displayed to users with the `manage_options` capability.
    
    Props Dhaval Parekh.
    Fixes #39207. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39947
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  3. Multisite: Remove unnecessary `is_super_admin()` check when adding an…

    … existing user to a site.
    
    Prior to this change, a super admin user that is added to a site who they are already a member of would still get reinvited.
    
    Props supercoder.
    Fixes #39220. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39946
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39883 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  4. Multisite: Replace `is_super_admin()` with `manage_network_users` whe…

    …n trying to import new users.
    
    Props bhargavbhandari90.
    Fixes #39212. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39945
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  5. Multisite: Replace `is_super_admin()` with `manage_network` when show…

    …ing a message to the network administrator in `wp-signup.php`.
    
    Props jignesh.nakrani.
    Fixes #39209. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39944
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39881 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  6. Multisite: Replace `is_super_admin()` with `manage_network_users` whe…

    …n trying to change the role of oneself.
    
    Props abhishek kaushik.
    Fixes #39204. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39943
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 24, 2017
  7. Twenty Seventeen: Improve typography for Simplified Chinese (`zh_CN`).

    Props ze3kr, Dharm1025.
    Fixes #39379.
    Built from https://develop.svn.wordpress.org/trunk@39942
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39879 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 24, 2017
Commits on Jan 22, 2017
  1. Text Changes: Add a period to the only `wp_die()` message that didn't…

    … have it: "Invalid plugin page".
    
    Props Presskopp.
    Fixes #39664.
    Built from https://develop.svn.wordpress.org/trunk@39941
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 22, 2017
Commits on Jan 21, 2017
  1. Docs: After [39939], "locales" should be plural.

    See #39658.
    Built from https://develop.svn.wordpress.org/trunk@39940
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39877 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 21, 2017
  2. I18N: Add support for Bosnian locale in `remove_accents()`.

    Applies "letter D with stroke" replacement made in [38646] for Serbian (`sr_RS`) to Bosnian (`bs_BA`) as well.
    
    Props H3llas for the report.
    Fixes #39658.
    Built from https://develop.svn.wordpress.org/trunk@39939
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 21, 2017
  3. Posts, Post Types: Preserve author filter in list table after enterin…

    …g a page number in paging input.
    
    Props sagarprajapati.
    Fixes #39523.
    Built from https://develop.svn.wordpress.org/trunk@39938
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 21, 2017
  4. Users: Preserve role filter in list table after entering a page numbe…

    …r in paging input.
    
    Props kailanitish90, sagarprajapati.
    Fixes #39435.
    Built from https://develop.svn.wordpress.org/trunk@39937
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 21, 2017
Commits on Jan 20, 2017
  1. Docs: After [38672], update `$type` parameter description for `submit…

    …_button()` and `get_submit_button()`.
    
    Remove the mention of `secondary` and `delete` classes as core values, add `small` and `large`.
    
    Props afercia.
    Fixes #23477.
    Built from https://develop.svn.wordpress.org/trunk@39936
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 20, 2017
  2. Multisite: Replace `is_super_admin()` with `manage_network_users` whe…

    …n trying to add an existing user via username.
    
    Props dhanendran.
    Fixes #39202. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39935
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  3. Multisite: Replace `is_super_admin()` with `manage_network_users` whe…

    …n checking for users autocomplete capabilities.
    
    Props ashokkumar24.
    Fixes #39201. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39934
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  4. Multisite: Replace `is_super_admin()` with `manage_network_options` i…

    …n `wp-admin/options.php`.
    
    Props sathyapulse.
    Fixes #39200. See #37616.
    
    Built from https://develop.svn.wordpress.org/trunk@39933
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  5. Multisite: Do not check for `is_super_admin()` when trying to set use…

    …r 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39932
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  6. REST API: Add `group` and description to `WP_Test_REST_Request_Valida…

    …tion`.
    
    Props danielbachhuber.
    Fixes #39654.
    Built from https://develop.svn.wordpress.org/trunk@39931
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 20, 2017
  7. Multisite: Display correct scheme for the main site in `site-info.php`.

    Props greatislander.
    Fixes #39365.
    
    Built from https://develop.svn.wordpress.org/trunk@39930
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39867 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  8. 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39929
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    felixarntz committed Jan 20, 2017
  9. 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39928
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    adamsilverstein committed Jan 20, 2017
  10. 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.
    Built from https://develop.svn.wordpress.org/trunk@39927
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39864 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 20, 2017
  11. Media: Pass the current attachment object to `display_media_states` f…

    …ilter, for consistency with `display_post_states`.
    
    Props pbiron, chriseverson.
    Fixes #39628.
    Built from https://develop.svn.wordpress.org/trunk@39926
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 20, 2017
Commits on Jan 19, 2017
  1. Media: After [36837], check the correct theme modification name for c…

    …ustom logo in `_media_states()`.
    
    Props pbiron, mitraval192.
    Fixes #39627.
    Built from https://develop.svn.wordpress.org/trunk@39925
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39862 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 19, 2017
  2. 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39924
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    westonruter committed Jan 19, 2017
Commits on Jan 17, 2017
  1. 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39923
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39860 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    rmccue committed Jan 17, 2017
  2. 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.
    
    Built from https://develop.svn.wordpress.org/trunk@39922
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    rmccue committed Jan 17, 2017
  3. 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.
    
    
    Built from https://develop.svn.wordpress.org/trunk@39921
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39858 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    pento committed Jan 17, 2017
  4. Users: Introduce `signup_site_meta` and `signup_user_meta` for filter…

    …ing signup metadata in `wpmu_signup_blog()` and `wpmu_signup_user()`, respectively.
    
    Props Mista-Flo.
    Fixes #39223.
    Built from https://develop.svn.wordpress.org/trunk@39920
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39857 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 17, 2017
  5. Build/Test Tools: Add `assertNotFalse()` method to `WP_UnitTestCase` …

    …and use it where appropriate.
    
    Props peterwilsoncc.
    Fixes #39219.
    Built from https://develop.svn.wordpress.org/trunk@39919
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 17, 2017
  6. Build/Test Tools: Correctly reference function names in `@covers` ent…

    …ries.
    
    Props pbearne.
    Fixes #39235.
    Built from https://develop.svn.wordpress.org/trunk@39918
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39855 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 17, 2017
  7. List Tables: Pass the `$which` parameter to `restrict_manage_posts` f…

    …ilter instance in `WP_Media_List_Table`, missed in [37422].
    
    Props wpsmith.
    Fixes #38772.
    Built from https://develop.svn.wordpress.org/trunk@39917
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39854 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 17, 2017
  8. TinyMCE: strip browser inserted `<u>` and <font>` tags from inside li…

    …nks when copying and pasting in IE and Edge.
    
    Fixes #39570.
    Built from https://develop.svn.wordpress.org/trunk@39916
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    Andrew Ozz committed Jan 17, 2017
Commits on Jan 16, 2017
  1. 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.
    
    
    Built from https://develop.svn.wordpress.org/trunk@39915
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    pento committed Jan 16, 2017
  2. Tests: `wpautop()` should not add extra `</p>` before `<figcaption>`.

    Props pbearne.
    See #39307.
    Built from https://develop.svn.wordpress.org/trunk@39914
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    Andrew Ozz committed Jan 16, 2017