Commit Graph

36875 Commits

Author SHA1 Message Date
Boone Gorges
1721af83d1 Taxonomy: Ignore cached term value when it doesn't match the queried taxonomy.
When a cache entry is found that matches the requested `$term_id`, but
doesn't match an explicitly provided `$taxonomy`, that cache entry
should be ignored.

Props GunGeekATX.
Fixes #40671.

git-svn-id: https://develop.svn.wordpress.org/trunk@40979 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 11:45:09 +00:00
Boone Gorges
a5001396ad Introduce $comment_count param for WP_Query.
This parameter allows querying for posts with a specific value of
`comment_count`. It is also possible to query for posts that match
a `comment_count` comparison by passing an array with 'value' and
'compare' operators (eg `array( 'compare' => '>', 'value' => 5 )`).

Props ramon fincken.
Fixes #28399.

git-svn-id: https://develop.svn.wordpress.org/trunk@40978 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 11:24:26 +00:00
Drew Jaynes
2744e29fd3 Remove an unnecessary initialization of $description due to the else condition in get_the_archive_description().
See [40976]. See #38487.


git-svn-id: https://develop.svn.wordpress.org/trunk@40977 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 05:18:57 +00:00
Drew Jaynes
336d718bfc General: Add support for the post type archive description to get_the_archive_description(), and thereby also the_archive_description().
Props henrywright.
Fixes #38487.


git-svn-id: https://develop.svn.wordpress.org/trunk@40976 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 05:14:18 +00:00
Drew Jaynes
0b5b1a667f Link Template: Clarify documentation for the $id parameter in get_post_permalink(), get_edit_post_link(), edit_post_link(), and get_delete_post_link(), to reflect that either a post ID or WP_Post object is accepted.
Separately, use `$post` for checking the post status and retrieving the page_uri in `get_post_permalink()` instead of referencing back to the original `$id` parameter.

Props GunGeekATX for the initial patch.
Fixes #40780.


git-svn-id: https://develop.svn.wordpress.org/trunk@40975 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 03:28:11 +00:00
Drew Jaynes
417b094dd4 Users: Introduce the manage_users_extra_tablenav action, fired immediately outside the closing "actions" div in the Users list table tablenav.
A similar `manage_posts_extra_tablenav` hook fires in the same location and context in the Posts list table tablenav.

Props GunGeekATX, adamsilverstein.
Fixes #36990.


git-svn-id: https://develop.svn.wordpress.org/trunk@40974 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-01 03:01:16 +00:00
Drew Jaynes
a14ea35c38 Docs: Add a @property-read notation for the read-only WP_Term::$data property.
See [35269], #34348 and #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40973 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 17:03:24 +00:00
Drew Jaynes
d9ae7f920d Docs: Add missing @since, @access, and @global notations to the DocBlock for WP_Query::parse_search_order().
Props dixitadusara.
Fixes #41045.


git-svn-id: https://develop.svn.wordpress.org/trunk@40972 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 16:07:05 +00:00
Drew Jaynes
3ebd6bfda0 Docs: Add full parameter and return documentation for WP_Text_Diff_Renderer_Table::interleave_changed_lines().
Props coffee2code.
Fixes #38520.


git-svn-id: https://develop.svn.wordpress.org/trunk@40971 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 05:28:20 +00:00
Drew Jaynes
30b915922a Docs: Use third-person singular verbs in the summaries for wp_unschedule_hook() and wp_clear_scheduled_hook().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40970 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:53:53 +00:00
Drew Jaynes
8d783f1275 Docs: Clarify accepted types and values for $menu parameters in several contexts:
* `wp_nav_menu()`
* `wp_get_nav_menu_object()` and its filter `wp_get_nav_menu_object`
* `is_nav_menu()`
* `wp_delete_nav_menu()`
* `wp_get_nav_menu_items()`

Props dimadin.
Fixes #38166.


git-svn-id: https://develop.svn.wordpress.org/trunk@40969 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:48:20 +00:00
Drew Jaynes
626f78750b Tests: Add @method notations to factor class DocBlocks as a way to indicate expected return types from factory methods for the benefit of IDEs.
Props jdgrimes.
Fixes #37867.


git-svn-id: https://develop.svn.wordpress.org/trunk@40968 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:35:39 +00:00
Drew Jaynes
63739c5c3d Docs: Provide best practice guidance for achieving parity between $menu_slug values supplied when adding menu and submenu pages, and later trying to compare those initial values against sanitized screen IDs derived from $menu_slug.
At the heart of the matter, the `$menu_slug` parameter in `add_menu_page()` and `add_submenu_page()` is not sanitized with `sanitize_key()`. When the screen object is later built for the admin page, the screen ID is derived from that `$menu_slug` value, though passed through `sanitize_key()`, which can produce unexpected results in comparison check.

Changing the sanitization code to provide actual parity is out of the question at this juncture, so updating the docs to describe how to avoid this edge case is the next best option.

Props GregRoss.
Fixes #35305.


git-svn-id: https://develop.svn.wordpress.org/trunk@40967 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 04:17:56 +00:00
Drew Jaynes
e087254993 Docs: Add more useful summaries to the DocBlocks for boolean $is_* properties in WP_Query.
Props megane9988 for the initial patch.
Fixes #34726.


git-svn-id: https://develop.svn.wordpress.org/trunk@40966 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 03:43:41 +00:00
Sergey Biryukov
21a6c7b050 Cron API: Introduce wp_unschedule_hook() to clear all events attached to a hook.
This complements `wp_clear_scheduled_hook()`, which only clears events attached with specific arguments.

Props arena, mordauk, jrf.
Fixes #18997.

git-svn-id: https://develop.svn.wordpress.org/trunk@40965 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-30 00:21:49 +00:00
Drew Jaynes
a970c07994 Docs: Don't reference non-existent hooks inline in the DocBlock descriptions for the following template functions:
* `get_index_template()`
* `get_404_template()`
* `get_author_template()`
* `get_category_template()`
* `get_tag_template()`
* `get_taxonomy_template()`
* `get_date_template()`
* `get_home_template()`
* `get_front_page_template()`
* `get_page_template()`
* `get_search_template()`
* `get_single_template()`
* `get_embed_template()`
* `get_singular_template()`
* `get_attachment_template()`

As mentioned when these dynamic hook references were originally fixed in [33274], we can't link to non-existent hooks inline because the Code Reference auto-linker won't pick up on the dynamic-ness of the hook, it'll just try to link to a hook reference that doesn't exist. In these cases, we need to be generic and provide context for the value of `$type`.

See [38418] for where the original fix was reversed. See this changeset for reversing the reversal.

Props donutz, milana_cap.

Fixes #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40964 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 16:04:45 +00:00
Drew Jaynes
2d68e15e00 Docs: Don't reference non-existent hooks inline in the DocBlock description for get_archive_template().
Also removes extra curly braces from the dynamic hook references added in [40962] to aid future re-parsing.

See #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40963 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 15:46:29 +00:00
Drew Jaynes
de8cb2d5b2 Docs: Don't reference non-existent hooks inline in the DocBlock description for get_post_type_archive_template().
Props milana_cap.
See #41198.


git-svn-id: https://develop.svn.wordpress.org/trunk@40962 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 15:38:14 +00:00
James Nylen
5c4f490ea8 REST API: Add a filter to allow modifying the response *after* embedded data is added.
Fixes #38964.


git-svn-id: https://develop.svn.wordpress.org/trunk@40961 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 13:16:19 +00:00
Sergey Biryukov
33f8a894cf Administration: In WP_List_Table::comments_bubble(), replace the mdash with its HTML entity for consistency with the similar code in other list tables.
Props afercia.
See #40659, #32152.

git-svn-id: https://develop.svn.wordpress.org/trunk@40960 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-29 00:03:02 +00:00
Sergey Biryukov
44d162d0b2 Docs: Add a @global entry for $post variable in wp_post_preview_js().
Props avinapatel.
Fixes #41194.

git-svn-id: https://develop.svn.wordpress.org/trunk@40959 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-28 12:54:31 +00:00
Sergey Biryukov
021d5ba403 Docs: Add missing backtick character in export_wp() DocBlock.
Props pbiron.
Fixes #41178.

git-svn-id: https://develop.svn.wordpress.org/trunk@40958 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:57:56 +00:00
Sergey Biryukov
6fa3e5c883 Administration: In taxonomy list tables, display a dash instead of a blank space and add "No description" as a screen reader text when the term description is blank.
Props pratikgandhi, yahil.
Fixes #40659.

git-svn-id: https://develop.svn.wordpress.org/trunk@40957 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:33:31 +00:00
Sergey Biryukov
c0dc34d4c7 Administration: In user list tables, display a dash instead of a blank space and add "Unknown" as a screen reader text when the user's first name and last name are blank.
Props Girishpanchal, yahil.
Fixes #40628.

git-svn-id: https://develop.svn.wordpress.org/trunk@40956 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-27 00:26:07 +00:00
Sergey Biryukov
4b7514b83d Docs: Remove inaccurate parts of get_header, get_footer, and get_sidebar hooks documentation.
These sentences suggested that the hooks allow a specific template file to be used in place of the default file, which is not the case.

Props desrosj.
Fixes #40892.

git-svn-id: https://develop.svn.wordpress.org/trunk@40955 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 20:55:15 +00:00
Sergey Biryukov
8ab52911d8 Login and Registration: Prevent the enable_login_autofocus filter DocBlock from spilling into JS code.
Props chris@vendiadvertising.com.
Fixes #41176.

git-svn-id: https://develop.svn.wordpress.org/trunk@40954 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 20:36:28 +00:00
Felix Arntz
b5668c3527 Multisite: Remove full stops from radio and checkbox labels in the Network Settings screen.
This change brings consistency with the regular site administration panel settings pages: Radio and checkbox labels do not use full stops there, so those in the network administration panel should not either.

Props Ankit K Gupta.
Fixes #39319.


git-svn-id: https://develop.svn.wordpress.org/trunk@40953 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 19:19:49 +00:00
Drew Jaynes
814936e641 Docs: List out accepted values for the $field parameter in get_the_author_meta().
Props choongsavvii.
Fixes #38258.


git-svn-id: https://develop.svn.wordpress.org/trunk@40952 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 18:23:52 +00:00
Drew Jaynes
8587b077ab Docs: Improve and clarify the DocBlock summary for wpmu_log_new_registrations().
Props daymobrew.
Fixes #39922.


git-svn-id: https://develop.svn.wordpress.org/trunk@40951 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-26 18:04:58 +00:00
Drew Jaynes
0624e59e02 Docs: Adjust notation for the $context parameter in the DocBlocks for the wp_kses_allowed_html() function and its associated wp_kses_allowed_html filter.
`$context|$allowedtags` can be either a string or array.

Props bor0.
Fixes #40575.


git-svn-id: https://develop.svn.wordpress.org/trunk@40950 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:15:18 +00:00
Drew Jaynes
4a248fa9c2 Docs: Notate format_for_editor() as the replacement function in the DocBlock for the deprecated wp_richedit_pre().
Props rabmalin.
See #41121. Fixes #40709.


git-svn-id: https://develop.svn.wordpress.org/trunk@40949 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:09:18 +00:00
Drew Jaynes
704731b9d3 Docs: Replace a variety of http links referenced in inline docs with their https counterparts (where possible).
Props johnpgreen.
Fixes #40732.


git-svn-id: https://develop.svn.wordpress.org/trunk@40948 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 22:05:54 +00:00
Drew Jaynes
e995c16086 Docs: Add missing deprecation, introduction, and summary information to the DocBlock for WP_Admin_Bar::recursive_render().
Props coffee2code.
Fixes #40840.


git-svn-id: https://develop.svn.wordpress.org/trunk@40947 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:57:32 +00:00
Drew Jaynes
3154c123c8 Docs: Clarify that the $post parameters for the get_the_modified_date and get_the_modified_time filters can also be of type null.
Props dlh.
Fixes #40845.


git-svn-id: https://develop.svn.wordpress.org/trunk@40946 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:49:27 +00:00
Drew Jaynes
e9ee6fc505 Docs: Add a clarification to the description about what the $output parameter in the embed_html filter doc represents.
Props musus.
Fixes #37752.


git-svn-id: https://develop.svn.wordpress.org/trunk@40945 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:45:42 +00:00
Drew Jaynes
a3fb39bc51 Docs: Add full documentation for members in the labels object returned by get_taxonomy_labels().
Props truongwp.
Fixes #41108.


git-svn-id: https://develop.svn.wordpress.org/trunk@40944 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 21:41:09 +00:00
Drew Jaynes
42801d8896 Docs: Add a note to the DocBlock for wp_signon() mentioning that it doesn't handle setting the current user.
Also outlines the conditions that must be met for is_user_logged_in() to work with it.

Part props SergeyBiryukov.
Fixes #28116.


git-svn-id: https://develop.svn.wordpress.org/trunk@40943 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 20:07:08 +00:00
Drew Jaynes
9b91a663df Docs: Add full documentation for arguments accepted by wp_get_nav_menu_items().
Also provide differentiation between arguments as passed to `get_posts()` vs used for ordering outputted menu items.

By and large, arguments in the `$args` array are intended to directly affect how nav_menu_item posts are retrieved. When the default ARRAY_A is used for 'output', the 'order' and 'orderby' arguments are essentially ignored, instead giving preference to a hard-coded order of 'ASC' and an orderby value derived from the non-get_posts() argument 'output_key'.

Fixes #15533.


git-svn-id: https://develop.svn.wordpress.org/trunk@40942 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 19:36:45 +00:00
Weston Ruter
f25d9d7909 Widgets: Add accessibility mode support for TinyMCE-enhanced Text and Media widgets (Video, Audio, Images).
Amends [40640], [40631].
Props westonruter, afercia.
See #35243, #32417.
Fixes #40986.


git-svn-id: https://develop.svn.wordpress.org/trunk@40941 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 18:47:13 +00:00
John Blackbourn
d7fc80ca43 Users: Use more appropriate HTTP status codes for errors relating to user management.
Also re-uses one error message string.

Props tuanmh

Fixes #40230


git-svn-id: https://develop.svn.wordpress.org/trunk@40940 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 18:45:33 +00:00
Weston Ruter
01efaabfc5 Widgets: Forcibly limit Video widget to only accept oEmbed URLs from YouTube and Vimeo (for now).
Amends [40640].
Props timmydcrawford.
See #34115, #39994.
Fixes #40935.


git-svn-id: https://develop.svn.wordpress.org/trunk@40939 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:23:52 +00:00
Drew Jaynes
ea1ee4f313 Scripts: Correctly reference WP_Scripts::print_extra_script() as the replacement for the deprecated WP_Scripts::print_scripts_l10n() method, rather than a nonexistent global print_extra_script() function.
Props fergbrain.
See #41121.


git-svn-id: https://develop.svn.wordpress.org/trunk@40938 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:19:23 +00:00
Drew Jaynes
a6b883434b Docs: Fix alignment of the $output parameter in the hook doc for the do_shortcode_tag filter.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40937 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:04:22 +00:00
Peter Wilson
ddbee256ad Emoji: Fix typo in browserSupportsEmoji() comment.
Fairies not Faries, introduced in [40850].

Fixes #41157.



git-svn-id: https://develop.svn.wordpress.org/trunk@40936 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:04:20 +00:00
Weston Ruter
51be161019 Customize: Ensure header_image_data setting exists before attempting to use it.
Amends [27497].
Props Collizo4sky.
Fixes #41007.


git-svn-id: https://develop.svn.wordpress.org/trunk@40935 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 07:03:16 +00:00
Sergey Biryukov
84fa8a9ff1 Docs: Add a missing quote in user-agent argument description in WP_Http::request().
Props ixkaito.
Fixes #41154.

git-svn-id: https://develop.svn.wordpress.org/trunk@40934 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:59:41 +00:00
Drew Jaynes
2a6d816739 Docs: Improve description wording for get_template_part() in regard to overloading by child themes.
Also, update the summary to use a third-person singular verb.

Props ixmati.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40933 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:55:43 +00:00
Drew Jaynes
1883d96173 Docs: Clarify the description for esc_html__() to note that the original text will be escaped on return if there is no translation, or the text domain isn't loaded.
Props brianlayman.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40932 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:40:39 +00:00
Drew Jaynes
805f4464a4 Docs: Fix a typo in the description for the get_previous_post_link() $link parameter. The default value is '%title', not '%title%'.
Props kmgalanakis.
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40931 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 06:19:24 +00:00
Drew Jaynes
f8788a84a2 Docs: Add more complete documentation about expected values in the $meta parameter for wpmu_create_blog().
See #41017.


git-svn-id: https://develop.svn.wordpress.org/trunk@40930 602fd350-edb4-49c9-b593-d223f7449a82
2017-06-25 05:47:27 +00:00