Commit Graph

32576 Commits

Author SHA1 Message Date
Scott Taylor e4bcddecfb Site Icon: make the default value for the `site_icon` option `0` in `schema.php`.
Props swissspidy, sebastian.pisula.
Fixes #34339.


git-svn-id: https://develop.svn.wordpress.org/trunk@35312 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 03:27:54 +00:00
Scott Taylor 14893eb628 AJAX UNIT TESTS: Have you ever wondered why these take 600 forevers to run? They all eventually call `do_action( 'admin_init' )`, which has `_maybe_update_core`, `_maybe_update_plugins`, and `_maybe_update_themes` hooked to it. REMOVE THEM, and AJAX unit tests run like the wind. `Tests_Ajax_Response` is still slow.
See #30017, #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@35311 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 03:17:36 +00:00
Sergey Biryukov 5252cb7fe3 Autoprefixer for [35281].
See #33322.

git-svn-id: https://develop.svn.wordpress.org/trunk@35310 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 03:01:13 +00:00
Scott Taylor f5921a0c98 Unit Tests: consolidate the many separate implementations of `_make_attachment()` into a helper method on `WP_UnitTestCase`.
Fixes #34075.


git-svn-id: https://develop.svn.wordpress.org/trunk@35309 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-21 01:58:52 +00:00
Weston Ruter ede4050ace Customizer: Prevent `nav_menu_item` settings from becoming dirty when their controls are set up.
Since `wp_setup_nav_menu_item()` returns the `classes` property as an array but the Customizer manages the value as a string, the setting needs to initially export the value as a string. This prevents the `classes` property type change from causing the setting to get marked as dirty even though nothing changed. This is a regression from [34788].

See #34111.


git-svn-id: https://develop.svn.wordpress.org/trunk@35308 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 22:44:44 +00:00
Weston Ruter bde89adaf8 Customizer: Introduce `customize_loaded_components` filter to allow core components to be disabled.
Also move style rule from `customize-nav-menus.css` to `customize-controls.css` so that widgets button is properly styled when `nav_menus` component is excluded from loading. See [35304]. See #33327.

Props westonruter, DrewAPicture.
Fixes #33552.


git-svn-id: https://develop.svn.wordpress.org/trunk@35307 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 22:15:11 +00:00
Andrew Ozz 73d755b67a TinyMCE: update to 4.2.6. Changelog: http://www.tinymce.com/develop/changelog/?ctrl=version&act=view&pr_id=1&vr_id=887.
Fixes #34331.

git-svn-id: https://develop.svn.wordpress.org/trunk@35306 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 22:05:31 +00:00
Weston Ruter 261aa51182 Customizer: Allow new `option` settings to not be saved as autoloaded by passing an `autoload` arg value of `false`.
The `autoload` argument value is passed along to `update_option()` which has accepted an `$autoload` parameter since [31628].

Props westonruter, dlh.
See #26394.
Fixes #33499.


git-svn-id: https://develop.svn.wordpress.org/trunk@35305 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 21:18:04 +00:00
Andrea Fercia 8774b40dc8 Customizer: Make the widgets "Reorder" and "Add a Widget" buttons... buttons.
For accessibility, UI controls should preferably be native controls. Adds
ARIA attributes and labels to improve accessibility and pair these buttons
with the ones in the Menu Customizer.

Props obenland, TomHarrigan, sanket.parmar, metodiew, afercia.

Fixes #33327.

git-svn-id: https://develop.svn.wordpress.org/trunk@35304 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 20:14:51 +00:00
Drew Jaynes 11f4d7bb68 Docs: Add translator comments for two `_deprecated_argument()` calls added to `get_wp_title_rss()` and `wp_title_rss()` in [35294].
See #31078. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35303 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 19:19:37 +00:00
Weston Ruter 9724c7cdbd Customizer: Implement indicators for invalid nav menu items.
The same indicator on the nav menus admin page is now present for nav menu items in the Customizer. When a menu item is present for a post type that is no longer registered, the menu item will appear with the indicator.

Props kucrut, westonruter.
Fixes #33665.


git-svn-id: https://develop.svn.wordpress.org/trunk@35302 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 19:07:58 +00:00
Drew Jaynes 1871d57dc5 Docs: Adjust syntax in the hook doc summaries for the `document_title_separator` and `document_title_parts` filters, introduced in [35294].
See #31078. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35301 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 18:35:46 +00:00
Drew Jaynes b11b651d24 Docs: Fix indentation and improve usefulness of inline comments surrounding the if/elseif conditions for assigning document titles in `wp_get_document_title()`.
See #31078. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35300 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 18:30:59 +00:00
Konstantin Obenland e9579b3ed5 Site Icon: Get site icon ID only when needed.
Cuts down on unnecessary queries, especially in environments that rely on
post meta a lot. Reverts [32997].

Props ap.koponen, swissspidy.
Fixes #34368.



git-svn-id: https://develop.svn.wordpress.org/trunk@35299 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 18:22:41 +00:00
Drew Jaynes 8ec6153115 Docs: Update the hook doc for the `pre_get_document_title` filter to explain ''what'' value is filterable rather than ''why'' the value is filterable :-)
The hook was introduced in [35294].

See #31078. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35298 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 18:13:13 +00:00
Drew Jaynes e5ec034d8f Docs: Improve vague changelog entries for functions and hooks where arguments were deprecated in [35294].
See #31078. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35297 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 18:09:06 +00:00
Drew Jaynes 2f5c72fea8 Docs: Fix up DocBlock syntax for the now-deprecated `wp_title()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35296 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 17:52:21 +00:00
Konstantin Obenland c7a86be42c Tests: Use updated filter names and oembed title for UT sanity.
See [35294], #31078.


git-svn-id: https://develop.svn.wordpress.org/trunk@35295 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 17:04:29 +00:00
Konstantin Obenland d625bd2428 Themes: Improve document title output.
Introduces more flexibility in filtering all parts of the document title,the
separator, and a way to short-circuit title generation. Plugins can now also
check for theme support and reliably filter the entire output. See #18548.
Deprecates `wp_title()`.

Fixes #31078.



git-svn-id: https://develop.svn.wordpress.org/trunk@35294 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 16:20:04 +00:00
Sergey Biryukov 1940317385 In `wp_list_categories()`, rewrite a long condition for clarity.
See #34363.

git-svn-id: https://develop.svn.wordpress.org/trunk@35293 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 16:12:21 +00:00
Sergey Biryukov 0a614515ac Tags: Avoid a double trailing space after tags separator in auto-suggest.
Props afercia.
Fixes #33881.

git-svn-id: https://develop.svn.wordpress.org/trunk@35292 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 15:59:01 +00:00
Boone Gorges 2713768bb0 Correct inline comment in `wp_list_categories()`.
The fallback link for the 'All' option is 'page_for_posts', not
'page_on_front'. Introduced in [32292].

Props sudar, SergeyBiryukov.
Fixes #34363.

git-svn-id: https://develop.svn.wordpress.org/trunk@35291 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 12:54:55 +00:00
Drew Jaynes 5b8bd2209e Docs: Correction: `MONTH_IN_SECONDS` was added in 4.4.0.
Props swissspidy.
See [33698]. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35290 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 07:34:34 +00:00
Drew Jaynes 1ed7489957 Media: Introduce the `image_get_intermediate_size` filter to its like-named function, making it possible to manipulate returned intermedia image size data.
Covers both the default and meaningful short-circuit return cases. Also adds a hash notation to the return documentation in the DocBlock.

Props A5hleyRich, DH-Shredder, wonderboymusic.
Fixes #34124.


git-svn-id: https://develop.svn.wordpress.org/trunk@35289 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 07:23:18 +00:00
Drew Jaynes 7972ba8126 Media: Introduce the `enclosure_links` filter, which makes it possible to adjust the list of audio and video enclosure links derived from post content before querying the database.
Props niallkennedy, stevenkword.
Fixes #19890.


git-svn-id: https://develop.svn.wordpress.org/trunk@35288 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 07:08:59 +00:00
Drew Jaynes aec5d8766b Docs: The `MINUTE_IN_SECONDS`, `HOUR_IN_SECONDS`, `DAY_IN_SECONDS`, `WEEK_IN_SECONDS`, `MONTH_IN_SECONDS`, and `YEAR_IN_SECONDS` constants were introduced in 3.5.
See [21996]. See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@35287 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 06:58:50 +00:00
Drew Jaynes 2bd3c9a832 Filesystem: Introduce constants to allow for easier expression of file sizes and other data amounts.
Adds:
* `KB_IN_BYTES` (kilobytes)
* `MB_IN_BYTES` (megabytes)
* `GB_IN_BYTES` (gigabytes)
* `TB_IN_BYTES` (terabytes)

Props nbachiyski, sudar.
See #22405.


git-svn-id: https://develop.svn.wordpress.org/trunk@35286 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 06:54:41 +00:00
Drew Jaynes 1a999bce25 Query: Introduce the `content_pagination` filter, which makes it possible to manipulate how post content is split into "pages" in `WP_Query::setup_postdata()`.
The "pages" — or chunks of post content – are determined by splitting based on the presence of `<!-- nextpage -->` tags in the post content.

Props sirzooro, chriscct7.
Fixes #9911.


git-svn-id: https://develop.svn.wordpress.org/trunk@35285 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 06:32:16 +00:00
Scott Taylor ea7e8314d2 Formatting: allow date strings to be passed to `get_gmt_from_date()`, instead of requiring `'Y-m-d H:i:s'`.
Adds unit tests.

Props pbearne.
Fixes #34279.


git-svn-id: https://develop.svn.wordpress.org/trunk@35284 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 06:07:45 +00:00
Scott Taylor 895cf207b5 Feeds: add `CEST` to `$timezone` in `SimplePie_Parse_Date`.
Props swissspidy.
Fixes #32749.


git-svn-id: https://develop.svn.wordpress.org/trunk@35283 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:56:59 +00:00
Scott Taylor eb6bdb59cd Dashboard: use the `create_posts` cap on the post type object when determining if the Quick Press widget can be displayed.
Props jim912, ocean90, chriscct7.
Fixes #25681.


git-svn-id: https://develop.svn.wordpress.org/trunk@35282 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:48:11 +00:00
Scott Taylor f07367d34c Theme Installer: toggle `iframe-ready` on the overlay to control the spinner animated GIF and high CPU usage.
Props afercia, adamsilverstein.
Fixes #33322.


git-svn-id: https://develop.svn.wordpress.org/trunk@35281 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:35:07 +00:00
Scott Taylor 91d55f97c2 Users: when calling `wp_insert_user()` with an valid user ID, return `WP_Error` instead of arbitrarily updating user meta.
Adds unit test.

Props swissspidy, bilalcoder.
Fixes #28004.


git-svn-id: https://develop.svn.wordpress.org/trunk@35280 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:27:32 +00:00
Scott Taylor 6ae2e24d28 XML-RPC: after [35095], change the name of the `xmlrpc_memory_limit` filter to `xmlrpc_chunk_parsing_size`.
Props ankit.gade.
Fixes #29957.


git-svn-id: https://develop.svn.wordpress.org/trunk@35279 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 05:18:15 +00:00
Scott Taylor b18755172b Widgets: revert [34376] and [34386] as pertains to the Categories widget supporting custom taxonomies.
Punting on 4th down.

See #21165.


git-svn-id: https://develop.svn.wordpress.org/trunk@35278 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 04:56:57 +00:00
Scott Taylor 089276d5e8 List Tables: revert the majority of [34467]. This was almost universally abhorred (the JS that disabled the bulk dropdowns).
See #31634.


git-svn-id: https://develop.svn.wordpress.org/trunk@35277 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 04:28:05 +00:00
Scott Taylor fdd8106001 Formatting: when making unique filenames in `wp_unique_filename()` by adding an incrementing number, prefix it with a dash to disambiguate from files that end in numbers.
Updates unit tests.

Props mikejolley, tyxla.
Fixes #21453.


git-svn-id: https://develop.svn.wordpress.org/trunk@35276 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 04:04:26 +00:00
Scott Taylor 9b27952d46 Customizer: when available, show the `description` when rendering the `dropdown-pages` Control.
Props downstairsdev, MikeHansenMe, _smartik_.
Fixes #31540.


git-svn-id: https://develop.svn.wordpress.org/trunk@35275 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-20 03:47:34 +00:00
Drew Jaynes 85af87a19b Docs: Update the default scheme for `get_rest_url()` from 'json' to 'rest'.
Also adds 'rest' to the documented list of schemes for `home_url()`, `get_home_url()`, `set_url_scheme()`, and the `home_url` and `set_url_scheme` hooks.

Props rachelbaker.
Fixes #34300.


git-svn-id: https://develop.svn.wordpress.org/trunk@35274 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 22:38:03 +00:00
Andrea Fercia 3ee61161c6 Accessibility: Improve the headings hierarchy in the Add Themes screen.
Fixes #33819.

git-svn-id: https://develop.svn.wordpress.org/trunk@35273 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 22:03:48 +00:00
Weston Ruter 42687da29c Widgets: Modify unit test assertion to be compatible with `widget_nav_menu` option being filtered by plugin to return `ArrayIterator`.
Modifies assertion added in [35100].

See #26876.
See #32474.


git-svn-id: https://develop.svn.wordpress.org/trunk@35272 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 21:26:24 +00:00
Drew Jaynes 900810e508 Docs: Add a missing file header for wp-admin/includes/class-wp-site-icon.php.
See #33701.


git-svn-id: https://develop.svn.wordpress.org/trunk@35271 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 20:08:34 +00:00
Drew Jaynes f03562b364 Tests: Add some more test coverage for `get_term_field()`.
See #33968.


git-svn-id: https://develop.svn.wordpress.org/trunk@35270 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 03:28:49 +00:00
Boone Gorges 583b065e14 Don't store `data` as a property on `WP_Term` objects.
`wp_ajax_add_term()` fetches a term using `get_term()`, and passes the term to
`WP_Ajax_Response`, which expects each of the term's properties to be scalar.
Having `$data` as a `stdClass` (meant to mimic `WP_User::data`, populated by
a `get_row()` database query) violated this expectation, causing fatal string
conversion errors. As a workaround, `$term->data` is converted so that it is
no longer an actual property of the term object, but is assembled only when
requested in the magic `__get()` method.

Fixes #34348.

git-svn-id: https://develop.svn.wordpress.org/trunk@35269 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 03:11:30 +00:00
Boone Gorges 990eebf373 Bust object term cache in `wp_remove_object_terms()`.
Props tszming.
Fixes #34338.

git-svn-id: https://develop.svn.wordpress.org/trunk@35268 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 01:52:22 +00:00
Dion Hulse 063d42a801 In `insert_with_markers()` restore the 4.3 behaviour of creating the file if it doesn't exist.
This change also makes it bail early (without writing) if the markers content is the same as the existing, and uses `ftell()` rather than `$bytes` for the location to truncate the file to - based on the file pointer being at the end of the written stream.

Props willmot tigertech kevinatelement
See #31767


git-svn-id: https://develop.svn.wordpress.org/trunk@35267 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-19 00:52:08 +00:00
Drew Jaynes 10322a38bf Docs: Fix a typo in the `$blog_id` parameter name in the `rest_url` filter doc.
Props rachelbaker.
Fixes #34351.


git-svn-id: https://develop.svn.wordpress.org/trunk@35266 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-18 23:11:49 +00:00
Andrea Fercia ccb76a5af0 Multisite: Improve the Admin Bar parent menu items color on hover and focus.
Props Nikschavan for the initial patch.
Fixes #34040.

git-svn-id: https://develop.svn.wordpress.org/trunk@35265 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-18 16:21:42 +00:00
Drew Jaynes 0fb4304628 Taxonomy: Improve deprecated argument strings for the 'link' type in `get_categories()` and `wp_dropdown_categories()`.
Props swissspidy, gagan0123.
Fixes #34318.


git-svn-id: https://develop.svn.wordpress.org/trunk@35264 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-18 15:34:55 +00:00
Drew Jaynes 84d3e1f305 Administration: Introduce the `manage_posts_extra_tablenav` action, which fires inside the tablenav for the posts list table, and just outside the "actions" container.
Props hlashbrooke, wonderboymusic.
Fixes #30341.


git-svn-id: https://develop.svn.wordpress.org/trunk@35263 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-18 14:55:52 +00:00