Commit Graph

31132 Commits

Author SHA1 Message Date
Scott Taylor fef8794b2c Fix warnings after [33826]. Only only one function call needs a global `$comment`, we shall hamburger it.
See #11566. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33828 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 20:58:12 +00:00
Drew Jaynes f995a3cb96 Docs: Clarify the DocBlock summary for `wp_create_nonce()` to mention that nonce-creation is also now dependent on user tokens, as of [29221].
Also adds a changelog entry for when user tokens were introduced into the nonce-creation process.

Props ericlewis
Fixes #33636.


git-svn-id: https://develop.svn.wordpress.org/trunk@33827 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 20:49:49 +00:00
Scott Taylor 0f59069a7f `WP_Comments_List_Table::single_row()` has no reason to set the `$comment` global. No other methods use it, and we are not in template/loop context. This can mess with the response of `get_comment()` elsewhere, since `get_comment()` internally bypasses the cache/db when a global is set.
See #11566. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33826 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 20:41:09 +00:00
Sergey Biryukov 20767f42aa Use `wp_html_excerpt()` to properly cut comment author URL for display on Comments screen.
props brettz95, solarissmoke.
fixes #15659.

git-svn-id: https://develop.svn.wordpress.org/trunk@33825 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 20:40:28 +00:00
Scott Taylor 49923580bd `WP_Widget_Pages::widget()` has no reason to set `$comment` and `$comments` globals.
See #11566. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33824 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 20:30:32 +00:00
Scott Taylor 48ae1fcc1d After [33822], really add those unit tests for `wp_count_comments()`.
See #19903. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33823 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 18:51:00 +00:00
Scott Taylor 3028a096be Comments: `wp_count_comments()` can use `get_comment_count()` internally to makes its DB query, provided that `get_comment_count()` returns more properties.
Adds/updates unit tests. There were zero (0) unit tests for `wp_count_comments()`.

Fixes #19903. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33822 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 18:50:12 +00:00
Scott Taylor af101dec19 Comments: dynamically update the document title text of the Comments List Table page when dynamically updating the number of comments awaiting moderation.
Fixes #33414. 


git-svn-id: https://develop.svn.wordpress.org/trunk@33821 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 17:57:32 +00:00
Sergey Biryukov ff7e86d14c Bump H3 headings to H2 on Themes screen for better accessibility.
props joehills.
fixes #33560.

git-svn-id: https://develop.svn.wordpress.org/trunk@33820 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 03:50:05 +00:00
Sergey Biryukov 0de0c060c1 Bump H3 headings to H2 on Tools screen for better accessibility.
props Cheffheid.
fixes #33607.

git-svn-id: https://develop.svn.wordpress.org/trunk@33819 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 03:31:38 +00:00
Sergey Biryukov 77b54f319d Bump H3 headings to H2 on Permalink Settings screen for better accessibility.
props Cheffheid.
fixes #33611.

git-svn-id: https://develop.svn.wordpress.org/trunk@33818 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 03:28:32 +00:00
Sergey Biryukov 7f3b90bc77 Bump H3 headings to H2 on WordPress Updates screen for better accessibility.
props Cheffheid.
fixes #33559.

git-svn-id: https://develop.svn.wordpress.org/trunk@33817 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-31 03:25:27 +00:00
Drew Jaynes 8aefa21974 Docs: Bring the file header and class DocBlock summaries for class-wp-widget.php in-line with the intention of the docs standard:
* File headers: _What_ the file is
* Class DocBlocks: What purpose the class serves. Mentioning the class name in the class DocBlock is redundant

See #33413


git-svn-id: https://develop.svn.wordpress.org/trunk@33816 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 23:13:45 +00:00
Konstantin Obenland 903b9af181 Themes: Get the correct theme when template and stylesheet were both passed as arguments.
Fixes a bug where `$new_theme` got set before the second argument was
appropriately handled, causing the `current_theme` option to later always be
updated to the parent theme's name.

Introduced in [21131].

Props obenland, wonderboymusic.
Fixes #32635.



git-svn-id: https://develop.svn.wordpress.org/trunk@33815 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 21:44:38 +00:00
Scott Taylor e3a3ba4caa Improve/update escaping in default widgets:
* wrap some variables in `esc_attr()` before echoing
* replace some `strip_tags()` calls with `sanitize_text_field()`
* call `esc_url()` when wrapping some URLs

Props welcher.
See #23012.


git-svn-id: https://develop.svn.wordpress.org/trunk@33814 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 05:37:53 +00:00
Scott Taylor 5d91ddf4e1 Improve/update escaping in `WP_Widget_Pages`.
Props welcher.
See #23012.


git-svn-id: https://develop.svn.wordpress.org/trunk@33813 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 04:47:00 +00:00
Scott Taylor bddf7c76ec Add some theme mod unit tests.
Props MikeHansenMe.
See #28637.


git-svn-id: https://develop.svn.wordpress.org/trunk@33812 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 03:42:49 +00:00
Scott Taylor 062aa80c1f Fix the doc block syntax for the `'wp_get_current_commenter'` filter.
Props dimadin.
Fixes #33304.


git-svn-id: https://develop.svn.wordpress.org/trunk@33811 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 03:20:24 +00:00
Scott Taylor 413df72474 Favor using the consistent and agnostic string 'Attach' over 'Attach to a post' in the media list table.
Props pavelevap.
Fixes #33515.


git-svn-id: https://develop.svn.wordpress.org/trunk@33810 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 03:09:25 +00:00
Scott Taylor 75998818a4 Fix copy pasta in `wp_cache_decr()` doc block.
Props danielbachhuber.
Fixes #33548.


git-svn-id: https://develop.svn.wordpress.org/trunk@33809 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 03:03:47 +00:00
Scott Taylor 905a612d88 Switching themes: if the new theme doesn't have `nav_menu_locations` defined, but the old theme does, copy the old theme's `nav_menu_locations` into the new theme's theme mods.
cc melchoyce

Fixes #18588.


git-svn-id: https://develop.svn.wordpress.org/trunk@33808 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 03:00:45 +00:00
Scott Taylor c4b8ad087f Improve the reliability of the crop returned by `image_get_intermediate_size()`.
Add a bunch of unit tests to `tests/image/intermediate_size.php`.

Props joemcgill, ericlewis, kitchin, SergeyBiryukov, chipbennett.
Fixes #17626.


git-svn-id: https://develop.svn.wordpress.org/trunk@33807 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 02:40:40 +00:00
Scott Taylor da0a823129 `get_comment_count()` currently increments `awaiting_moderation` when comments are in the trash. This occurs because `case 0:` will match any value passed to `switch` that is a string that isn't specified in the list of cases. This is terrifying.
* Cases for `0` and `1` should be `'1'` and `'0'`
* Add unit tests for `get_comment_count()`. Currently, there are none.

See #33414.


git-svn-id: https://develop.svn.wordpress.org/trunk@33806 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-30 02:18:18 +00:00
Boone Gorges 0c7f2237f0 Pass taxonomy name to filters in `get_adjacent_post()`.
Props sboisvert.
Fixes #33568.

git-svn-id: https://develop.svn.wordpress.org/trunk@33805 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-29 19:58:13 +00:00
Boone Gorges 27c8977af9 In `wp_list_categories()`, 'current_category' should accept an array of values.
This allows the 'current-cat' or 'current-cat-parent' classes to be applied
to more than one item in the list.

Props vilkatis.
Fixes #33565.

git-svn-id: https://develop.svn.wordpress.org/trunk@33804 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-29 19:45:35 +00:00
Boone Gorges 5b0c402e6f Simplify the weeks-per-year calculation `WP_Date_Query::validate_date_values()`.
Props luciole135.
Fixes #30845.

git-svn-id: https://develop.svn.wordpress.org/trunk@33803 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-29 01:46:53 +00:00
Sergey Biryukov a47ee912ac Make a period translatable.
props mako09.
fixes #33594.

git-svn-id: https://develop.svn.wordpress.org/trunk@33802 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-29 01:39:51 +00:00
John Blackbourn a4808224ff Bring network admin user searching to parity with single site user searching by wrapping search terms in asterisks. This means that searches don't require an exact match and therefore significantly reduces friction when searching for users on the network admin screens.
Fixes #32913


git-svn-id: https://develop.svn.wordpress.org/trunk@33801 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-29 00:18:06 +00:00
Sergey Biryukov 7b9f6f54bf Twenty Fifteen: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33800 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:52:32 +00:00
Sergey Biryukov 8fbb450852 Twenty Fourteen: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33799 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:52:14 +00:00
Sergey Biryukov f5ee92c336 Twenty Thirteen: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33798 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:52:01 +00:00
Sergey Biryukov c64c73af89 Twenty Twelve: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33797 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:51:46 +00:00
Sergey Biryukov 1b60dc074d Twenty Eleven: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33796 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:51:32 +00:00
Sergey Biryukov 6ba3956fd8 Twenty Ten: Correct license information in `readme.txt`.
props Otto42.
see #33590, #31814.

git-svn-id: https://develop.svn.wordpress.org/trunk@33795 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 16:51:02 +00:00
Drew Jaynes 002e2a0e4a Docs: Add a changelog entry to the `set_site_transient_$transient` hook doc for the `$transient` parameter, added in [33738].
Fixes #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33794 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:40:32 +00:00
Drew Jaynes 3734aa1682 Docs: Add a changelog entry to the `pre_set_site_transient_$transient` hook doc for the `$transient` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33793 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:39:11 +00:00
Drew Jaynes bddb0de4d8 Docs: Add a changelog entry to the `site_transient_$transient` hook doc for the `$transient` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33792 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:38:01 +00:00
Drew Jaynes 9a566ea593 Docs: Add a changelog entry to the `pre_site_transient_$transient` hook doc for the `$transient` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33791 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:36:49 +00:00
Drew Jaynes c71531275b Docs: Add a changelog entry to the `pre_update_site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33790 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:35:35 +00:00
Drew Jaynes d06525c8a1 Docs: Add a changelog entry to the `pre_delete_site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33789 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:34:26 +00:00
Drew Jaynes 3f8132e89e Docs: Add a changelog entry to the `pre_add_site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33788 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:33:14 +00:00
Drew Jaynes 9eb92ae5ea Docs: Add a changelog entry to the `site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33787 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:31:58 +00:00
Drew Jaynes 0d27e9b012 Docs: Add a changelog entry to the `default_site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33786 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:30:44 +00:00
Drew Jaynes 21ed57e09d Docs: Add a changelog entry to the `pre_site_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33785 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:29:26 +00:00
Drew Jaynes e2c8f3ec0d Docs: Add a changelog entry to the `pre_set_transient_$transient` hook doc for the `$transient` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33784 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:28:06 +00:00
Drew Jaynes 86a49119a2 Docs: Add a changelog entry to the `transient_$transient` hook doc for the `$transient` parameter, introduced in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33783 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:26:21 +00:00
Drew Jaynes 8336c88273 Docs: Add a changelog entry to the `pre_transient_$transient` hook doc for the `$transient` parameter, introduced in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33782 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:24:49 +00:00
Drew Jaynes 958c835f9a Docs: Add a changelog entry to the `update_option_{$option}` hook doc for the `$option` parameter, introduced in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33781 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:23:14 +00:00
Drew Jaynes 323ca7e1d3 Docs: Add a changelog entry to the `pre_update_option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33780 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:21:18 +00:00
Drew Jaynes 41370b6e97 Docs: Add a changelog entry to the `option_$option` hook doc for the `$option` parameter, added in [33738].
See #28402.


git-svn-id: https://develop.svn.wordpress.org/trunk@33779 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 15:19:54 +00:00