Permalink
Commits on Feb 16, 2017
  1. Customize: Skip intercepting non-HTTP(S) links in customizer preview …

    …just as jump links are ignored.
    
    Ensures that links with `javascript:`, `mailto:` and other protocols work as expected in the customizer preview.
    
    Fixes #39797.
    
    Built from https://develop.svn.wordpress.org/trunk@40064
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@40001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    westonruter committed Feb 16, 2017
  2. REST API: Cast revision author ID to int.

    The `post_author` field is a string internally, but we need to cast it to an integer in the REST API.  This was already done for posts, but not for revisions.  The field is already declared as an integer in both controllers.
    
    Fixes #39871.
    
    Built from https://develop.svn.wordpress.org/trunk@40063
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@40000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    nylen committed Feb 16, 2017
  3. Docs: Correct `@return` value type for `wp_nav_menu()`.

    Props chesio.
    Fixes #39890.
    Built from https://develop.svn.wordpress.org/trunk@40062
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39999 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 16, 2017
Commits on Feb 15, 2017
  1. REST API: improve test fixture generation, normalizing data.

    Add a data normalization pass when generating data fixtures for the REST API endpoints. Ensures that the `wp-api-generated.js` fixture won't change between test runs. Set more default properties and use fixed values for any properties that can't be easily controlled (object IDs and derivatives like link). Generate the fixture file with JSON_PRETTY_PRINT so that future diffs are easier to follow.
    
    Props jnylen0, netweb.
    Fixes #39264.
    
    Built from https://develop.svn.wordpress.org/trunk@40061
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    adamsilverstein committed Feb 15, 2017
  2. Media: debounce the media grid search, avoiding duplicate requests.

    Add a debounce wrapper to the media grid search handler. The search callback is now fired after a 300 ms typing pause.
    
    Remove redundant handlers for 'search' and 'change', preventing multiple/duplicate search callbacks.
    
    Props certainstrings, joemcgill, Kelderic, batmoo.
    Fixes #38911.
    
    Built from https://develop.svn.wordpress.org/trunk@40060
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    adamsilverstein committed Feb 15, 2017
Commits on Feb 14, 2017
  1. Buttons: Fix a few `.button-link` glitches after [40052].

    Removes some stray underlines. Explicitly set the button text to be left aligned.
    
    Props Cheffheid, f.staude, Presskopp.
    
    See #34242.
    Fixes #35126, #38712.
    
    Built from https://develop.svn.wordpress.org/trunk@40059
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    afercia committed Feb 14, 2017
  2. REST API: Add QUnit tests for wp-api.js and PHPUnit fixture generation.

    Add QUnit tests: verify that wp-api loads correctly, verify that the expected base models and collections exist and can be instantiated, verify that collections contain the correct models, verify that expected helper functions are in place for each collection.
    
    The QUnit tests rely on two fixture files: `tests/qunit/fixtures/wp-api-generated.js` contains the data response from each core endpoint and is generated by running the PHPUnit `restapi-jsclient` group. `tests/qunit/fixtures/wp-api.js` maps the generated data to endpoint routes, and overrides `Backbone.ajax` to mock the responses for the tests.
    
    Add PHPUnit tests in `tests/phpunit/tests/rest-api/rest-schema-setup.php`. First, verify that the API returns the expected routes via `server->get_routes()`. Then, the `test_build_wp_api_client_fixtures` test goes thru each endpoint and requests it from the API, tests that it returns data, and builds up the data for the mocked QUnit tests, saving the final results to `tests/qunit/fixtures/wp-api-generated.js`.
    
    Add a new grunt task `restapi-jsclient` which runs the phpunit side data generation and the qunit tests together.
    
    Props jnylen0, welcher.
    Fixes #39264.
    
    
    Built from https://develop.svn.wordpress.org/trunk@40058
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    adamsilverstein committed Feb 14, 2017
Commits on Feb 12, 2017
  1. Themes: Add template type and template candidates as parameters to th…

    …e `{$type}_template` filter.
    
    Props mschadegg
    Fixes #39525
    
    Built from https://develop.svn.wordpress.org/trunk@40057
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    johnbillion committed Feb 12, 2017
  2. WP_Query: Add tests for the combination of `orderby=post__in` and `or…

    …der`.
    
    This commit adds test cases for the interaction (or more accurately, lack of
    interaction) between `orderby=post__in` and the `order` parameter.
    
    Props fibonaccina.
    See #39055.
    
    Built from https://develop.svn.wordpress.org/trunk@40056
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    nylen committed Feb 12, 2017
Commits on Feb 11, 2017
  1. Customize: Ensure edit shortcuts get re-created for nested partials w…

    …hen a parent partial is refreshed.
    
    Fixes issue where the edit shortcut for a nav menu gets dropped when the containing Custom Menu widget is updated.
    
    See #39101.
    Fixes #39353.
    
    Built from https://develop.svn.wordpress.org/trunk@40055
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    westonruter committed Feb 11, 2017
Commits on Feb 10, 2017
  1. Pings/Trackbacks: Avoid scheduling multiple `do_pings` events in `_pu…

    …blish_post_hook()`.
    
    Props ethitter.
    Fixes #39828.
    Built from https://develop.svn.wordpress.org/trunk@40054
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 10, 2017
  2. Docs: Add missing `meta_type` and `meta_compare` arguments to `WP_Ter…

    …m_Query::__construct()` and `get_terms()` docblocks.
    
    Props 1naveengiri.
    Fixes #39825.
    Built from https://develop.svn.wordpress.org/trunk@40053
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 10, 2017
Commits on Feb 9, 2017
  1. Buttons: Improve the `.button-link` CSS class for link-like buttons.

    Updates `.button-link` adding color and underline to make link-like buttons look
    like links by default. Introduces `.button-link-delete` as a modifier, stackable
    CSS class for red button-links.
    
    Props Cheffheid, afercia.
    
    See #34242.
    Fixes #35126.
    
    Built from https://develop.svn.wordpress.org/trunk@40052
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    afercia committed Feb 9, 2017
Commits on Feb 8, 2017
  1. Media: in `wp.media.view.DeleteSelectedPermanentlyButton`, move destr…

    …uctive async operations outside of the `selection` loop.
    
    Fixes #39780.
    
    Built from https://develop.svn.wordpress.org/trunk@40051
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    staylor committed Feb 8, 2017
  2. Media: in `wp.media.view.Toolbar.refresh()`, check for a selection be…

    …fore iterating over models.
    
    Props chandrapatel.
    Fixes #39511.
    
    Built from https://develop.svn.wordpress.org/trunk@40050
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39987 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    staylor committed Feb 8, 2017
Commits on Feb 6, 2017
  1. Taxonomy: Disallow overriding the `name` property when registering a …

    …taxonomy.
    
    Props wpfo for initial patch.
    Fixes #39308.
    Built from https://develop.svn.wordpress.org/trunk@40049
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39986 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    swissspidy committed Feb 6, 2017
  2. Docs: Add a note to `retrieve_password_message` filter that password …

    …reset email will not be sent if the filtered message is empty.
    
    Props sudar.
    Fixes #39788.
    Built from https://develop.svn.wordpress.org/trunk@40048
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39985 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 6, 2017
  3. Docs: Use third-person singular verb for `rest_avatar_sizes` filter d…

    …escription.
    
    See #39130.
    Built from https://develop.svn.wordpress.org/trunk@40047
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39984 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 6, 2017
  4. Docs: Use third-person singular verb for `wp_get_custom_css` filter d…

    …escription.
    
    See #39130.
    Built from https://develop.svn.wordpress.org/trunk@40046
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 6, 2017
  5. Customize: Introduce `get_header_video_url` filter for the return val…

    …ue of `get_header_video_url()`.
    
    Props sanket.parmar, celloexpressions.
    Fixes #39512.
    Built from https://develop.svn.wordpress.org/trunk@40045
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 6, 2017
Commits on Feb 5, 2017
  1. General: Add tests for `wp_parse_slug_list()`.

    Props danielbachhuber.
    See #35582.
    Built from https://develop.svn.wordpress.org/trunk@40044
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    swissspidy committed Feb 5, 2017
  2. Docs: Clarify that `get_the_category_list()` and `the_category()` dis…

    …play links as an unordered list by default.
    
    See #39130.
    Built from https://develop.svn.wordpress.org/trunk@40043
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 5, 2017
  3. Docs: Clarify that `has_excerpt()` checks if the post has a custom ex…

    …cerpt, not some generated excerpt.
    
    See #35487.
    Built from https://develop.svn.wordpress.org/trunk@40042
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 5, 2017
  4. Customize: Extend auto-draft life of a `customize_changeset` post whe…

    …never modified.
    
    Keep bumping the date for the auto-draft to preserve it from garbage-collection via `wp_delete_auto_drafts()` after 7 days.
    
    See #30937.
    Fixes #39713.
    
    Built from https://develop.svn.wordpress.org/trunk@40041
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    westonruter committed Feb 5, 2017
Commits on Feb 3, 2017
  1. REST API: JavaScript client should use `_.extend` when merging objects.

    Correct an issue during the client's dynamic route discovery in `wp.api.utils.decorateFromRoute` where `_.union` potentially failed if used on objects.
    
    Props ketuchetan.
    Fixes #39341.
    
    
    Built from https://develop.svn.wordpress.org/trunk@40040
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    adamsilverstein committed Feb 3, 2017
  2. Media: In `wp_unique_filename()`, use explicit type casting when incr…

    …ementing `$number`.
    
    This prevents the "non-numeric value encountered" warning in PHP 7.1, caused by trying to increment an empty string on the first loop iteration.
    
    Props drrobotnik for initial patch.
    Fixes #39774.
    
    
    Built from https://develop.svn.wordpress.org/trunk@40039
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39976 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 3, 2017
Commits on Feb 1, 2017
  1. REST API: After [38947], improve the wording of the message to clarif…

    …y that `rest_authentication_errors` is a filter.
    
    See #38446.
    Built from https://develop.svn.wordpress.org/trunk@40038
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Feb 1, 2017
  2. REST API: Improve posts orderby tests

    This commit adds tests for `orderby=relevance` combined with a search term in the REST API.
    
    It also improves tests for the `orderby` parameter in `WP_REST_Posts_Controller` by looking at the generated SQL query instead of creating a bunch of carefully arranged test objects.  This should be much more robust, and we can use this approach in other places (such as #39055).
    
    Fixes #39079.
    
    Built from https://develop.svn.wordpress.org/trunk@40037
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    nylen committed Feb 1, 2017
  3. Customize: Ensure root values are accessible in multidimensional cust…

    …om setting types.
    
    Fixes bad conditions in `WP_Customize_Setting::get_root_value()` and `WP_Customize_Setting::set_root_value()`.
    
    Props dlh.
    Amends [35007].
    See #32103.
    Fixes #36952.
    
    Built from https://develop.svn.wordpress.org/trunk@40036
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    westonruter committed Feb 1, 2017
Commits on Jan 31, 2017
  1. Update/Install: Give context to "Deleted! string to allow for differe…

    …ntiation between theme and plugin translations.
    
    Props swissspidy.
    See #39747. See #37290.
    Built from https://develop.svn.wordpress.org/trunk@40035
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 31, 2017
  2. Update/Install: Give context to some more install/update strings to a…

    …llow for differentiation between theme and plugin translations.
    
    Fixes #39747. See #37290.
    Built from https://develop.svn.wordpress.org/trunk@40034
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 31, 2017
  3. I18N: Use a consistent translator comment ("accessibility text") for …

    …strings used in `aria-label` attributes.
    
    See #32000.
    Built from https://develop.svn.wordpress.org/trunk@40033
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 31, 2017
  4. Text Changes: Remove periods from checkbox labels in Discussion meta …

    …box to improve consistency throughout the admin.
    
    Checkbox labels generally don't have periods, unless it's a complete sentence.
    
    Props juhise.
    Fixes #33780.
    Built from https://develop.svn.wordpress.org/trunk@40032
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    SergeyBiryukov committed Jan 31, 2017
Commits on Jan 30, 2017
  1. Avoid PHP notices in `get_post_type_archive_template()`.

    The function should fail more gracefully when called in the context
    where `get_query_var( 'post_type' )` doesn't represent an actual post
    type.
    
    Props technopolitica, dlh.
    Fixes #38374.
    Built from https://develop.svn.wordpress.org/trunk@40031
    
    
    git-svn-id: http://core.svn.wordpress.org/trunk@39968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
    boonebgorges committed Jan 30, 2017