Commit Graph

30861 Commits

Author SHA1 Message Date
Scott Taylor dc48f3d795 Query:
Add a query var, `title`, that allows you to query posts by `post_title`. To accomplish this now, you have to do something like:

{{{
$tacos = get_posts( [
  'post_type' => 'taco',
  's' => $name,
  'exact' => true,
  'sentence' => true,
  'post_status' => 'publish',
  'fields' => 'ids',
  'posts_per_page' => 1
] );
}}}

Adds unit tests.

Fixes #33074.


git-svn-id: https://develop.svn.wordpress.org/trunk@33706 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-22 16:58:21 +00:00
Scott Taylor a70e0183e5 Ensure that `attachment_url_to_postid()` matches cross-scheme when front-end and back-end schemes are different.
Adds unit test.

Props welcher.
Fixes #33109.


git-svn-id: https://develop.svn.wordpress.org/trunk@33705 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-22 16:38:09 +00:00
Scott Taylor e76b48a26c `update-core.php` help docs, update string to include translations: `themes, plugins, and translations`
Props netweb, DrewAPicture.
Fixes #28201.


git-svn-id: https://develop.svn.wordpress.org/trunk@33704 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-22 16:24:58 +00:00
Dominik Schilling (ocean90) 918dd71257 Tests: Fix a typo in function names for `$autoload` tests.
Autoload is "no" if the `$autoload` param for `update_option()` is `'no'` or `false`.

see #26394.

git-svn-id: https://develop.svn.wordpress.org/trunk@33703 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-22 09:44:48 +00:00
Dominik Schilling (ocean90) cb4a9ea174 Tests: Skip some tests for the Transients API when an external object cache is in use.
`test_transient_data_with_timeout()`, `test_transient_add_timeout()`, `test_nonexistent_key_dont_delete_if_false()`, and `test_nonexistent_key_old_timeout` are testing option values which aren't available with an an external object cache like memcache.

see #31491.

git-svn-id: https://develop.svn.wordpress.org/trunk@33702 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 20:32:42 +00:00
Scott Taylor 326b67c0aa In `wpdb::get_col_length()`, `break`s are not necessary when a `case` returns
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33701 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:40:55 +00:00
Scott Taylor 5d494bae12 Doc block for`_wp_specialchars`: `$quote_style` can also be `string` ('single' or 'double')
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33700 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:35:31 +00:00
Scott Taylor a14be1fffa In `_WP_Editors::editor_settings()`, `$first_run` is unused.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33699 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:29:31 +00:00
Aaron Jorbin 3b24c024b5 Add new constant MONTH_IN_SECONDS and expand time convenience documentation.
The "month" isn't really a month.  It's a WordPress Month. As the docs make clear, it's not about accuracy as much as it about convenience.  This adds a missing step in the time convenience constants. 

Props egill
Fixes #33397




git-svn-id: https://develop.svn.wordpress.org/trunk@33698 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:15:52 +00:00
Scott Taylor e4f8047716 In `wp_ajax_add_meta()`, do not juggle the value of `$_POST` and alter it directly. This was done so that `edit_post()` could pull `$_POST` out of the air by-reference and alter it (equally as bad). `edit_post()` accepts a `$post_data` array. Do that instead.
See #33491.


git-svn-id: https://develop.svn.wordpress.org/trunk@33697 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:12:56 +00:00
Weston Ruter d40b6eab66 Widgets: Switch back to using `array_key_exists()` instead of `isset()` for widget instance existence check.
Reverts unnecessary change in [32602] since `array_key_exists()` does actually work with `ArrayIterator` objects.

See #32474.
Fixes #33442.


git-svn-id: https://develop.svn.wordpress.org/trunk@33696 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 18:08:53 +00:00
Scott Taylor a1e5332489 Make 'Docs Committer' translatable.
Props dimadin. 
Fixes #33424.


git-svn-id: https://develop.svn.wordpress.org/trunk@33695 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 17:46:54 +00:00
Scott Taylor 9e784dd59f Clarify doc entry for `_wp_customize_include()`
Props ericlewis. 
Fixes #33488.


git-svn-id: https://develop.svn.wordpress.org/trunk@33694 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 17:44:11 +00:00
Scott Taylor ab71eb93b1 When createing "Sample Page" on install, comments should be `closed`.
Props macmanx. 
Fixes #33490.


git-svn-id: https://develop.svn.wordpress.org/trunk@33693 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 17:41:16 +00:00
Scott Taylor 7dd261ce61 Comment List Tables:
* Toggle visibility of pending bubble when a comment is dynamically moderated
* Add a CSS class to the pending bubble to hide it / remove to show it

See #11200.


git-svn-id: https://develop.svn.wordpress.org/trunk@33692 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 17:25:06 +00:00
Drew Jaynes e6466911d7 Docs: Add a changelog entry for the `$post_type` parameter added to the `restrict_manage_posts` hook in [33644].
Props pavelevap
Fixes #17891.


git-svn-id: https://develop.svn.wordpress.org/trunk@33691 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 16:11:31 +00:00
Drew Jaynes 31e802293c Docs: Fix a typo in the DocBlock description for `_get_additional_user_keys()`, introduced in [33687].
Props dimadin
See #29120.


git-svn-id: https://develop.svn.wordpress.org/trunk@33690 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 16:00:35 +00:00
Helen Hou-Sandi 961dd71cf3 List tables: Allow filtering of hidden and default hidden columns.
Similar to `get_hidden_meta_boxes()`, there are now filters named `default_hidden_columns` and `hidden_columns`.

props Compute, MikeHansenMe, chriscct7.
fixes #32499.


git-svn-id: https://develop.svn.wordpress.org/trunk@33689 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 15:31:30 +00:00
Dion Hulse 466500743f WP_Filesystem: SSH2 handler: Remove support for is_writable() via SSH, it turns out PHP doesn't verify the writability via SFTP and instead uses a comparison based on the current php system process user instead of the ssh user.
This fixes the 'The update cannot be installed because we will be unable to copy some files.' error encountered during updates by skipping the write test completely.

Props jobst.
Fixes #33480 for trunk


git-svn-id: https://develop.svn.wordpress.org/trunk@33688 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 11:42:04 +00:00
Drew Jaynes 143c3e8a87 Docs: Clarify the DocBlock summary and add a description and return description for `_get_additional_user_keys()`.
As noted in the description, returned keys being set is dependent on the existence of those keys in user meta at the point where `_get_additional_user_keys()` is called in `wp_update_user()`.

Fixes #29120.


git-svn-id: https://develop.svn.wordpress.org/trunk@33687 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 05:32:53 +00:00
Drew Jaynes e803952278 Docs: Fix some minor inline documentation syntax issues in the hook docs for the `post_edit_category_parent_dropdown_args` filter, introduced in [33682].
See #32246. See #33026.


git-svn-id: https://develop.svn.wordpress.org/trunk@33686 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 04:54:00 +00:00
Drew Jaynes a65c2e068a Docs: Fix a variety of inline documentation syntax issues and add some strategic spacing.
Fixes #29086.


git-svn-id: https://develop.svn.wordpress.org/trunk@33685 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 04:12:45 +00:00
Drew Jaynes c53fe2779e Docs: Add missing `@access` tags to properties and methods in wp-admin/includes/class-wp-upgrader.
See #29086.


git-svn-id: https://develop.svn.wordpress.org/trunk@33684 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 04:04:23 +00:00
Drew Jaynes 3721940e0f Docs: Correct a typo in the summary for the `Theme_Upgrader->bulk` property.
Also adds a couple of missing `@access` tags.

Props kraftbj
See #29086.


git-svn-id: https://develop.svn.wordpress.org/trunk@33683 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 03:14:35 +00:00
Boone Gorges 57592ef976 Filter the arguments passed to `wp_dropdown_categories()` in the Categories post edit metabox.
The new 'post_edit_category_parent_dropdown_args' provides parity with other
places in wp-admin where `wp_dropdown_categories()` args are filtered, such as
'taxonomy_parent_dropdown_args'.

Props theMikeD.
Fixes #33026.

git-svn-id: https://develop.svn.wordpress.org/trunk@33682 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 01:27:15 +00:00
Boone Gorges c1b8f1f72a In `Walker_CategoryDropdown::start_el()`, cast values to strings before deciding whether to append 'selected' attribute.
As of [32484], `wp_dropdown_categories()` uses the `$value_field` value to
decide whether a given `<option>` should be 'selected'. However, `$value_field`
can refer to a value that is a string, such as a category's slug. This causes
problems when doing a loose comparison (`==`) with the value of the `'selected'`
parameter, which defaults to `0`, because when doing a loose comparison
between an integer and a string, PHP will cast the string to an integer. This
creates false matches, resulting in `<option>` elements getting a 'selected'
attribute incorrectly.

We address the issue by casting the comparison values to strings, and then
using the strict comparison operator `===`.

Fixes #33452 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@33681 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-21 01:10:34 +00:00
Drew Jaynes f35fde4e35 Docs: Standardize `@deprecated` tag formatting in the DocBlock for the `logIO()` function.
Props Alphawolf.
Fixes #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33680 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:43:02 +00:00
Drew Jaynes 6db612790d Docs: Standardize `@deprecated` tag formatting in the DocBlocks for several `wpdb` methods.
Props Alphawolf.
See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33679 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:41:07 +00:00
Drew Jaynes 2cfd34e85e Docs: Standardize `@deprecated` tag formatting in the DocBlock for `WP_Object_Cache:reset()`.
Props Alphawolf.
See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33678 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:38:45 +00:00
Drew Jaynes d83fcf8e9c Docs: Standardize `@deprecated` tag formatting in the DocBlock for `wp_xmlrpc_server::login_pass_ok()`.
Props Alphawolf.
See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33677 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:37:16 +00:00
Drew Jaynes a66a94a149 Docs: Standardize `@deprecated` tag formatting and add missing summaries to deprecated functions in wp-includes/ms-deprecated.php.
Props Alphawolf for the initial patch.
Props DrewAPicture

See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33676 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:35:30 +00:00
Drew Jaynes b09cedbd11 Docs: Standardize `@deprecated` tag formatting for deprecated functions in wp-admin/includes/ms-deprecated.php.
Props Alphawolf for the initial patch
Props DrewAPicture

See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33675 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:25:41 +00:00
Drew Jaynes 5c0b568ea1 Docs: Standardize `@deprecated` tag formatting for deprecated functions in wp-includes/pluggable-deprecated.php.
Props Alphawolf for the initial patch.
Props DrewAPicture.

See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33674 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:14:44 +00:00
Drew Jaynes 6374a86e6c Docs: Standardize `@deprecated` tag formatting and add missing DocBlock summaries to deprecated functions in wp-includes/deprecated.php.
Props Alphawolf for the initial patch.
Props DrewAPicture.

See #28806.


git-svn-id: https://develop.svn.wordpress.org/trunk@33673 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 22:10:20 +00:00
Scott Taylor 3b1e7ba1e0 After [33666], fix broken `sprintf` cruff.
See #17609.


git-svn-id: https://develop.svn.wordpress.org/trunk@33672 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 21:36:03 +00:00
Drew Jaynes 8edff9c979 Docs: Standardize `@deprecated` tag formatting and add missing DocBlocks to deprecated functions in wp-admin/includes/deprecated.php.
Opted not to use the multi-function DocBlock syntax in the name of not taking shortcuts in documentation for the sake of brevity.

Props Alphawolf for the initial patch.
See #28806


git-svn-id: https://develop.svn.wordpress.org/trunk@33671 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 21:22:26 +00:00
Drew Jaynes 5e6f651daf Docs: Add a missing summary to the DocBlock for `wp_media_upload_handler()`.
See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@33670 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 21:00:42 +00:00
Scott Taylor f804d9a91d In `wp_get_attachment_link()`, accept an `id` or `WP_Post` as the first parameter.
Props several27, DrewAPicture.
Fixes #33277.


git-svn-id: https://develop.svn.wordpress.org/trunk@33669 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 20:31:34 +00:00
Drew Jaynes 0af6d275b0 Docs: Clarify the different return conditions in the DocBlock for `WP_List_Table->handle_row_actions()`.
This clarification follows the introduction of primary columns in 4.3. See #33313.

Props morganestes.
Fixes #33436.


git-svn-id: https://develop.svn.wordpress.org/trunk@33668 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 20:21:45 +00:00
Scott Taylor 695560bf58 In `WP_Posts_List_Table::inline_edit()`, check that `$post_formats[0]` is an array before traversing.
Props DrewAPicture.
Fixes #33025.



git-svn-id: https://develop.svn.wordpress.org/trunk@33667 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 20:18:35 +00:00
Scott Taylor 98de66207f Custom Post Types:
* Introduce `is_post_type_viewable( $post_type_object )`
* Separate the HTML bits from the translatable bits in the `post` messages array in `edit-form-advanced.php`
* Don't show certain UI pieces when a post is not viewable on the front end

When a custom post type item is not viewable on the front end, we don't want to show links to View it (on the front end) all over the admin. We also want to hide the Preview link, et al. We also want our admin messages to not contain said links.

Custom post types with `public_queryable` set to `false` are not viewable on the front end. 
`'page'` is viewable on the front end, but `'page'` is a `_builtin` type, and `public_queryable` is set to `false` when it is registered - see `WP::parse_request()` for when `public_queryable` gets used.

This is confusing, but also somewhat straightforward: to determine if a post type is viewable on the front end, we can check one way for `_builtin => true` and another way for `_builtin => false`:

`$post_type->publicly_queryable || ( $post_type->_builtin && $post_type->public )`

If a post type is `publicly_queryable`, it's viewable. If that value is `false`, it is viewable if it's a `_builtin` type that is also `public`.

I am in search of edge cases, so this shall land.

Props wonderboymusic, DrewAPicture.
See #17609.


git-svn-id: https://develop.svn.wordpress.org/trunk@33666 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 19:39:57 +00:00
Drew Jaynes ab8417702e Docs: Correct the phpDoc type to a boolean for the `$single` parameter in the `get_{$meta_type}_metadata` hook docs.
Props dlh.
Fixes #33451.


git-svn-id: https://develop.svn.wordpress.org/trunk@33665 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 19:35:43 +00:00
Drew Jaynes ad2afcd0d9 Docs: Mark the `$notify` parameter in the DocBlock for `wp_new_user_notification()` as optional, and provide additional context on the difference between the accepted values.
See [33620] and [33023] for background.

See #32246.


git-svn-id: https://develop.svn.wordpress.org/trunk@33664 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 18:26:00 +00:00
Scott Taylor 25004acaa6 After [33662], remove unused var.
See #11200.


git-svn-id: https://develop.svn.wordpress.org/trunk@33663 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 17:18:51 +00:00
Scott Taylor 28e0ad2de1 Comment List Tables:
* Ensure that dynamic bubble counts are in sync by `comment_post_ID`
* Scope `:animated` to `#the-comment-list`

See #11200.



git-svn-id: https://develop.svn.wordpress.org/trunk@33662 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 16:35:21 +00:00
Dominik Schilling (ocean90) 3b4c1e7dd6 WordPress 4.3 has just passed 2,222,222 downloads.
(Fix typo in [33653].)

git-svn-id: https://develop.svn.wordpress.org/trunk@33661 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 15:59:30 +00:00
Scott Taylor 89ecad8808 JSHint after [33655].
git-svn-id: https://develop.svn.wordpress.org/trunk@33660 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 06:30:48 +00:00
Scott Taylor 4b746c4b4e Deprecate `post_permalink()` (Introduced in 1.0, already had a deprecated argument in 1.3), which just wraps `get_permalink()` and was only used by XML-RPC in 4 places.
Props solarissmoke.
Fixes #16982.


git-svn-id: https://develop.svn.wordpress.org/trunk@33659 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 06:24:00 +00:00
Scott Taylor 8528ff2ab4 Ensure that feeds are served with the proper `Content-Type` HTTP header.
Props stevenkword.
Fixes #32024.


git-svn-id: https://develop.svn.wordpress.org/trunk@33658 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 06:09:28 +00:00
Scott Taylor 64944b7a87 Comments List Table:
* In a view that initially has comments, but they get removed due to user actions: show the `No Items` row instead of bombing out and showing nothing (which looks broken)
* To accomplish this, in `WP_Comments_List_Table::display()`: call `->display_rows_or_placeholder()` instead of `->display()`
* Listen for the end of row `.fadeOut()`s if necessary using jQuery Promises

Fixes #11200.


git-svn-id: https://develop.svn.wordpress.org/trunk@33657 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-20 05:53:41 +00:00