Commit Graph

34681 Commits

Author SHA1 Message Date
Drew Jaynes e890bfae0d Docs: Improve documentation for `wp_generate_tag_cloud()` default arguments by formatting them into in a hash-notation.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37587 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 17:59:12 +00:00
Drew Jaynes 6695126f24 Docs: Improve formatting in the DocBlock for `sanitize_bookmark_field()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37586 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 17:15:58 +00:00
Drew Jaynes 1942855ada Docs: Standardizes and improves DocBlock summaries for the `__get()`, `__set()`, `__isset()`, and `__unset()` magic methods in `wpdb`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37585 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 17:11:47 +00:00
Rachel Baker 3ba3c42728 Comments: Display approved comments on the Edit Post screen to users without the `edit_comment` capability.
Matches logic in `wp_dashboard_recent_comments()` where we display approved comments regardless of the edit permission.

Props jfarthing84 for initial patch.
Fixes #24648. 



git-svn-id: https://develop.svn.wordpress.org/trunk@37584 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 14:09:29 +00:00
Dominik Schilling (ocean90) 35a7acb459 Database: Normalize index definitions in `dbDelta()`.
`dbDelta()` compares the index definitions against the result of `SHOW INDEX FROM $table_name`. This requires a specific format so indices are not unnecessarily re-created. This format wasn't ensured, until now.

* Parse the raw index definition to extract the type, name and columns so a normalized definition can be built (#20263, #34873).
* Standardize on uppercase types (#34871) and on 'KEY'. 'INDEX' is only a synonym for 'KEY'.
* Escape index names with backticks (#20263).
* Normalize columns: Ignore ASC and DESC definitions (#34959), remove whitespaces (#34869) and escape column names with backticks (#20263).
* Add backticks to all index change queries (#20263).

Props ocean90, pento, kurtpayne.
Fixes #20263, #34869, #34871, #34873, #34959.

git-svn-id: https://develop.svn.wordpress.org/trunk@37583 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 11:56:20 +00:00
Peter Wilson 531ceb899e Customize: Run autoprefixer following [37476]
Adds prefixes to box-shadow and transition properties.

See #34893



git-svn-id: https://develop.svn.wordpress.org/trunk@37582 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 05:14:25 +00:00
Gary Pendergast c7f8735698 Setup: Sanity check for invalid table prefixes.
There are some table prefixes (for example, `7e1_`), which MySQL will try and parse as values when they're note quoted in backticks. Because not everything remembers to quote their table names, it's best if we just discourage their use during setup.

Fixes #36422.



git-svn-id: https://develop.svn.wordpress.org/trunk@37581 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-27 01:53:09 +00:00
Dominik Schilling (ocean90) ea970f17ad Plugins: Fix order of arguments for the `strpos()` function added in [37562].
See #36706.

git-svn-id: https://develop.svn.wordpress.org/trunk@37580 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 23:14:52 +00:00
Boone Gorges 2c7f879188 Add tests for `get_weekstartend()`.
Props pbearne, tloureiro.
Fixes #36415.

git-svn-id: https://develop.svn.wordpress.org/trunk@37579 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 15:47:52 +00:00
Drew Jaynes f4a4bb77f5 Docs: Remove unnecessary backtick-escaping around two function references in the DocBlock for `get_object_term_cache()`.
Known classes, methods, and functions are now auto-linked and formatted in the Code Reference. :-)

See [37573]. See #36814.


git-svn-id: https://develop.svn.wordpress.org/trunk@37578 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 15:21:45 +00:00
Drew Jaynes 08e8157d25 Docs: Link up a reference to the `get_terms_args` filter in the hook doc for `get_terms_defaults`.
See #35381. See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37577 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 15:16:26 +00:00
Boone Gorges e613d97234 Pass the proper values to `get_terms` action.
* `$term_query` should be passed.
* Second and third params should come from the `$term_query->query_vars` array, so that they're fully parsed.

These changes were missed in [37572].

Props flixos90, sebastian.pisula.
See #35381.
Fixes #36951.

git-svn-id: https://develop.svn.wordpress.org/trunk@37576 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 14:55:38 +00:00
Dominik Schilling (ocean90) 8119c1b473 Version bump.
git-svn-id: https://develop.svn.wordpress.org/trunk@37575 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 10:05:21 +00:00
Gary Pendergast a51a68fb75 Database: Add support for `SPATIAL` keys to `dbDelta()`.
`dbDelta()` already supported spatial fields (by virtue of not checking field types), so it's nice to round that out with spatial key support, too.

Fixes #36948.



git-svn-id: https://develop.svn.wordpress.org/trunk@37574 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 04:58:13 +00:00
Boone Gorges 96b71d7d89 Store only term IDs in object term relationships caches.
Previously, objects containing all data about a term were stored in each
object's term cache. Besides being wasteful, this approach caused invalidation
issues, as when a modified term count required a flush for all objects
belonging to the term.

Backward compatibility is maintained for plugins that continue to put object
data directly into the `{$taxonomy}_relationships` cache bucket.

Fixes #36814.

git-svn-id: https://develop.svn.wordpress.org/trunk@37573 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 04:49:10 +00:00
Boone Gorges 8b9bdaccd2 Introduce `WP_Term_Query` and use in `get_terms()`.
`WP_Term_Query` is modeled on existing query classes, such as those used
for comments and users. It provides a more consistent structure for generating
term queries, and should make it easier to add new functionality in the future.

Props flixos90, boonebgorges.
See #35381.

git-svn-id: https://develop.svn.wordpress.org/trunk@37572 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-26 04:32:30 +00:00
Drew Jaynes 0b56d3fd1b Docs: Reorder argument descriptions in the DocBlock for `wp_list_categories()` to match the default arguments list and improve reading at a glance.
Props birgire for the initial patch.
Fixes #36693.


git-svn-id: https://develop.svn.wordpress.org/trunk@37571 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 19:39:32 +00:00
Dominik Schilling (ocean90) 7878f8f9ea Upgrade: Allow update checks on `upgrader_process_complete` to be run during Ajax requests.
Fixes missing translation updates during shiny updates.

Fixes #36914.

git-svn-id: https://develop.svn.wordpress.org/trunk@37570 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 19:35:07 +00:00
Drew Jaynes 2b9ea8de78 Docs: Add missing documentation for the `style` argument in the DocBlock for `wp_list_categories()`.
Props birgire for the initial patch.
See #36693.


git-svn-id: https://develop.svn.wordpress.org/trunk@37569 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 19:34:41 +00:00
Drew Jaynes add75910c9 Docs: Add missing `@access` tags to methods in `WP_oEmbed_Controller`.
See [34903].

Props ramiy.
Fixes #36297.


git-svn-id: https://develop.svn.wordpress.org/trunk@37568 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 19:21:11 +00:00
Boone Gorges a378749df6 Fix termmeta pre-fetching in `wp_get_object_terms()`.
[34529] introduced logic intended to prime the termmeta cache for certain
values of the `fields` parameter. There were a few bugs:

* The `all_with_object_id` param was misspelled.
* `term_id` was used instead of `ids`.
* The values being passed to `update_termmeta_cache()` in the case where `fields=ids` was not correct.

All of these would result in a failure to pre-fetch termmeta in some cases.

Props dlh.
Fixes #36932.

git-svn-id: https://develop.svn.wordpress.org/trunk@37567 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 18:44:00 +00:00
Drew Jaynes c013727ebe Posts: Add test coverage for `get_preview_post_link()`.
Props swissspidy.
Fixes #35915.


git-svn-id: https://develop.svn.wordpress.org/trunk@37566 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 18:30:57 +00:00
Boone Gorges 1d3511ba8c In `get_bookmarks()`, don't cache if 'orderby=rand'.
Props lukecavanagh, prettyboymp, c3mdigital, MikeHansenMe.
Fixes #18356.

git-svn-id: https://develop.svn.wordpress.org/trunk@37565 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 18:29:01 +00:00
Drew Jaynes a27b379144 Docs: Update the return description for `get_preview_post_link()` to note that it can also return null.
Props chris_dev, swissspidy.
See #35915.


git-svn-id: https://develop.svn.wordpress.org/trunk@37564 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 18:24:33 +00:00
Boone Gorges ec53bf5bf6 Add tests for `get_bookmarks()` cache.
This changeset adds a unit test factory so that bookmark/link fixtures can be
created during tests.

Why are we writing tests for functionality that has been deprecated for years?
Because it's the Right Thing to Do.

See #18356.

git-svn-id: https://develop.svn.wordpress.org/trunk@37563 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 18:20:24 +00:00
Dominik Schilling (ocean90) a34e38513f Plugins: In `get_plugin_data()` use the plugin slug for the text domain when no text domain is defined in the header.
Fixes #36706.

git-svn-id: https://develop.svn.wordpress.org/trunk@37562 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 16:53:38 +00:00
Drew Jaynes ba9e51c4a5 Docs: Correct DocBlock descriptions for the `$before`, `$after`, `$link_before`, and `$link_after` arguments for `wp_nav_menu()`.
* `$before` falls before the link markup starts
* `$after` falls after the link markup ends
* `$link_before` falls before the link text
* `$link_after` falls after the link text

Props wp_smith for the initial patch.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37561 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 16:16:45 +00:00
Drew Jaynes 32418ef8ed Docs: Standardize DocBlock summaries for hooks that serve to "print" something to use third-person singular verbs.
See #36913.


git-svn-id: https://develop.svn.wordpress.org/trunk@37560 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 16:04:37 +00:00
Ella Iseulde Van Dorpe 73e91b1ad3 TinyMCE: fix inline toolbar positioning
Introduced in [37000].
See 2fb8aa48e9.
See 5734a8d880.

Fixes #36876.



git-svn-id: https://develop.svn.wordpress.org/trunk@37559 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 15:12:28 +00:00
Drew Jaynes 0decd27a3f Docs: Update hook docs for the `upgrader_package_options` filter and `upgrader_process_complete` action to reflect expected values in the core, language pack, theme, and plugin contexts.
Props nextendweb for the initial patch.
See [37550]. Fixes #36875.


git-svn-id: https://develop.svn.wordpress.org/trunk@37558 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 14:44:08 +00:00
Ella Iseulde Van Dorpe e20bc6cc46 Media: adjust test after [37556]
See #36888.



git-svn-id: https://develop.svn.wordpress.org/trunk@37557 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 14:05:34 +00:00
Ella Iseulde Van Dorpe e57b62f5d6 Media: unhide audio fallback
Introduced in [28182].
Fixes #36888.



git-svn-id: https://develop.svn.wordpress.org/trunk@37556 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 13:32:33 +00:00
Gary Pendergast 7de95455cc Tests: Upgrade the HHVM job to use Ubuntu Trusty, and a more recent version of HHVM.
Also includes some tidying up of the `.travis.yml` file.

Props netweb.

Fixes #36930.



git-svn-id: https://develop.svn.wordpress.org/trunk@37555 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 06:11:20 +00:00
Dominik Schilling (ocean90) 8ebfe1c0d2 I18N: Update list of continents and cities for the timezone selection.
Fixes #36828.

git-svn-id: https://develop.svn.wordpress.org/trunk@37554 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 23:23:46 +00:00
Dominik Schilling (ocean90) ac658e2d93 Dashboard: Improve grammar for WordPress News help text.
Also, move planet URL to a separate string to match the URL which is used for the feed.

Props ramiy for initial patch.
Fixes #35681.

git-svn-id: https://develop.svn.wordpress.org/trunk@37553 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 21:21:59 +00:00
Dominik Schilling (ocean90) 0a76772117 I18N: Add translators comments to wp-activate.php.
Props ramiy.
Fixes #35734.

git-svn-id: https://develop.svn.wordpress.org/trunk@37552 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 21:01:47 +00:00
Dominik Schilling (ocean90) 5acf9e3042 I18N: Add translators comments to wp-signup.php.
Props ramiy.
Fixes #35730.

git-svn-id: https://develop.svn.wordpress.org/trunk@37551 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 20:43:23 +00:00
Drew Jaynes 4908e2b035 Docs: Fix the hook doc for `upgrader_process_complete` to notate all values that might be present in the `hook_extra` array in the various update contexts.
h/t Nextendweb.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37550 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 17:51:06 +00:00
Gary Pendergast 5de41748d3 Embeds: Ensure embed widths are integers.
This prevents a warning in PHP trunk when a non-integer width is passed.

See #36435.



git-svn-id: https://develop.svn.wordpress.org/trunk@37549 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 06:14:19 +00:00
Gary Pendergast 01356e100e Database: Don't generate unnecessary warnings in `wpdb::query()`.
In the event that the database has gone away for some reason, calls to `mysqli_errno()` and `mysqli_error()` (and their `ext/mysql` equivalents, of course), will generate PHP warnings, which are unsightly, and not how we do things in these parts.

Props mbijon, craig-ralston for the original patch.

Fixes #23085.



git-svn-id: https://develop.svn.wordpress.org/trunk@37548 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 05:23:06 +00:00
Jeremy Felt ae03e5cbb4 Multisite: Clean up `WP_Error` documentation and handling in `wp-signup.php`
Fixes #36927.


git-svn-id: https://develop.svn.wordpress.org/trunk@37547 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 04:15:57 +00:00
Jeremy Felt fa2b237e1e Multisite: Disable autocapitalize and autocorrect for `user_name` input on signup
Props rafaelangeline.
Fixes #36833.


git-svn-id: https://develop.svn.wordpress.org/trunk@37546 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-24 03:42:36 +00:00
Drew Jaynes 21250e6c2f Docs: The `$context` parameter in `remove_meta_box()` is not optional.
Fixes a copy pasta error introduced in [34952].

Props travisnorthcutt.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@37545 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 20:56:38 +00:00
Drew Jaynes 9531107084 Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

Fixes #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37544 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 19:01:40 +00:00
Drew Jaynes 194583a770 Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37543 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 19:00:41 +00:00
Drew Jaynes bd1d3f0a8c Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37542 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 18:58:48 +00:00
Drew Jaynes e82b32be51 Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in wp-includes/general-template.php.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37541 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 18:56:06 +00:00
Drew Jaynes 869b0a53e7 Docs: Apply inline `@see` tags to hooks referenced in DocBlocks in wp-includes/ms-functions.php.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37540 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 18:55:17 +00:00
Drew Jaynes b208dae5e6 Docs: Apply inline `@see` tags to hooks referenced in DocBlocks for core classes.
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.

See #36921.


git-svn-id: https://develop.svn.wordpress.org/trunk@37539 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 18:53:05 +00:00
Dominik Schilling (ocean90) 52caa1f06a Database: Support backticks around field names when parsing a query for the field type.
Avoids an undefined index PHP warning by `dbDelta()`.

Props davidmosterd, ocean90.
See #20263.

git-svn-id: https://develop.svn.wordpress.org/trunk@37538 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 18:11:32 +00:00