Commit Graph

23115 Commits

Author SHA1 Message Date
Scott Taylor 59b9a3a6f8 No need to re-map the return values of `wp_parse_id_list()` to int.
See #22074, #11823.



git-svn-id: https://develop.svn.wordpress.org/trunk@25169 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:53:03 +00:00
Scott Taylor f458d16c01 Improve the include / exclude SQL generation in `get_pages()` by using `IN` and `NOT IN` where applicable. Adds unit tests for include / exclude.
Fixes #22074.



git-svn-id: https://develop.svn.wordpress.org/trunk@25168 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:48:29 +00:00
Andrew Nacin dd78079286 Add QUnit tests for password-strength-meter.js.
props jorbin.
see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25167 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:44:36 +00:00
Andrew Nacin 1a651a4723 Add QUnit to WordPress core for JavaScript unit testing.
props jorbin.
see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25166 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:42:59 +00:00
Andrew Nacin 8045afd81b Move PHPUnit tests into a tests/phpunit directory.
wp-tests-config.php can/should reside in the root of a develop checkout. `phpunit` should be run from the root.

see #25088.


git-svn-id: https://develop.svn.wordpress.org/trunk@25165 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 18:39:34 +00:00
Scott Taylor d34baebc1d Search term `name` and `slug` when the `search` arg is passed to `get_terms()`. Adds unit test.
Props wojtek.szkutnik.
Fixes #13992.



git-svn-id: https://develop.svn.wordpress.org/trunk@25164 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 16:49:43 +00:00
Scott Taylor 9e96365b8e Pass the taxonomy around to relevant nav menu actions to avoid arbitrarily deleting all items with `menu-item-type` of `taxonomy`. Adds unit test for `wp_get_associated_nav_menu_items()`.
Props garyc40, SergeyBiryukov.
Fixes #15264.



git-svn-id: https://develop.svn.wordpress.org/trunk@25163 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 16:44:36 +00:00
Scott Taylor a4a765c5fd Improve the include / exclude SQL generation in `get_terms()` by using `IN` and `NOT IN` where applicable. Adds unit tests for include / exclude.
Props sirzooro, duck_.

Fixes #11823.



git-svn-id: https://develop.svn.wordpress.org/trunk@25162 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 16:23:30 +00:00
Scott Taylor 69785902db Support `id=>name` and `id=>slug` values for `fields` arg in `get_terms()`. Adds unit tests.
Props mikeschinkel.

Fixes #13661.



git-svn-id: https://develop.svn.wordpress.org/trunk@25161 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 15:18:08 +00:00
Scott Taylor 744a4a80a4 Respect the `fields` arg when passed to `get_children()`.
Fixes #22208.



git-svn-id: https://develop.svn.wordpress.org/trunk@25160 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 15:07:59 +00:00
Jon Cave 95cab73341 zxcvbn: Apply ROT13 when building the dynamic user_inputs dictionary.
The modified matcher assumes that the dictionaries are ROT13 encoded.
All of the static dictionaries were, but user_inputs wasn't. See #21737.


git-svn-id: https://develop.svn.wordpress.org/trunk@25159 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-29 08:40:51 +00:00
Andrew Nacin 0b9a70d548 Return to 'Item' for term updated messages for the link_category taxonomy.
props SergeyBiryukov, pavelevap.
fixes #18714.


git-svn-id: https://develop.svn.wordpress.org/trunk@25158 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 18:58:57 +00:00
Andrew Nacin 444d333872 Use Dropbox's zxcvbn library for our password meter.
The library was added in [25156].

props duck_.
see #21737.


git-svn-id: https://develop.svn.wordpress.org/trunk@25157 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 16:08:19 +00:00
Andrew Nacin b9f05488aa Add Dropbox's zxcvbn library for realistic password strength estimation.
Upstream: https://github.com/lowe/zxcvbn. MIT License.
Modified for WordPress with a rot13 of the included word dictionaries, for PG-ness.

props duck_.
see #21737.


git-svn-id: https://develop.svn.wordpress.org/trunk@25156 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 16:02:53 +00:00
Dion Hulse a044fcf1ae WP_HTTP: Fix a variable typo in [25153] See #23463
git-svn-id: https://develop.svn.wordpress.org/trunk@25155 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 07:29:09 +00:00
Dion Hulse de7d430280 WP_HTTP: Update the documentation regarding HTTP/1.1 support. Props leewillis77 Fixes #25074
git-svn-id: https://develop.svn.wordpress.org/trunk@25154 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 06:54:22 +00:00
Dion Hulse 2785826961 WP_HTTP: Improve WP_HTTP::chunkTransferDecode() to properly handle binary data and chunked responses which include data in the page that looks like a chunked response.
This also fixes a case where the gzip'd data would become corrupt after chunked decoding as \r\n was replaced with \n in the data stream. Fixes #23463 


git-svn-id: https://develop.svn.wordpress.org/trunk@25153 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 06:52:09 +00:00
Sergey Biryukov 1d00e1d88a Make sure $args is an array before treating it as such. fixes #25151 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@25151 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 05:27:03 +00:00
Dion Hulse 7f0891c1a1 WP_HTTP: When requesting a document with HTTP/1.1 include the 'Connection: Close' header (unless a Connection header is already specified) to prevent the connection being held open and hanging the request process. See #23463
git-svn-id: https://develop.svn.wordpress.org/trunk@25150 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 04:58:51 +00:00
Dion Hulse 4f410dc9f3 WP_HTTP: More relaxed host matching for WP_PROXY_BYPASS_HOSTS and WP_ACCESSIBLE_HOSTS, allowing for subdomains in wildcards to include dashes (and anything else which [\w.] didn't catch). Fixes #24201
git-svn-id: https://develop.svn.wordpress.org/trunk@25149 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 04:53:41 +00:00
Andrew Nacin 022e5c2227 The main site of a secondary network should not use the original wp-content/uploads upload path.
props jeremyfelt.
fixes #25030.


git-svn-id: https://develop.svn.wordpress.org/trunk@25148 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 03:35:44 +00:00
Andrew Nacin dc0d29b59b Introduce is_main_network().
By default, a network ID of 1 is assumed to be the main network.
Otherwise, it is the first network listed in the wp_site table.

If PRIMARY_NETWORK_ID is defined, it is considered main network.

props jeremyfelt.
see #25030.


git-svn-id: https://develop.svn.wordpress.org/trunk@25147 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 03:34:50 +00:00
Dion Hulse d9bd6e7039 Use a better variable name in antispambot() introduced with [25055]. Props duck_ Fixes #16754
git-svn-id: https://develop.svn.wordpress.org/trunk@25146 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 01:46:57 +00:00
Dion Hulse b38ac8cd66 Unit Tests: Make it more compatible with PHPUnit when installed as a Phar, or, Composer package, by removing a duplicate require (Phpunit already includes the file itself). Props scribu Fixes #25065
git-svn-id: https://develop.svn.wordpress.org/trunk@25145 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-28 01:43:14 +00:00
Dominik Schilling (ocean90) c1827f73cd Replace duplicated lines in [25143] with an assignment. see #18714.
git-svn-id: https://develop.svn.wordpress.org/trunk@25144 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 21:24:59 +00:00
Andrew Nacin d37203df8e Add a terms_updated_messages filter to edit-tags.php, along with taxonomy-specific strings.
props johnbillion.
fixes #18714.


git-svn-id: https://develop.svn.wordpress.org/trunk@25143 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 21:12:40 +00:00
Andrew Nacin 713c6cfb88 Pass $taxonomies to the get_terms_orderby filter.
props johnbillion.
fixes #18754.


git-svn-id: https://develop.svn.wordpress.org/trunk@25142 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 21:05:03 +00:00
Helen Hou-Sandi 6ce20d366c Make shift-click checkbox range selection work in both directions. props c3mdigital, SergeyBiryukov. fixes #23427.
git-svn-id: https://develop.svn.wordpress.org/trunk@25141 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 20:49:33 +00:00
Andrew Nacin 65465e9c88 Don't create an edit link to a non-UI post type in the media list table.
props johnbillion.
fixes #20453.


git-svn-id: https://develop.svn.wordpress.org/trunk@25140 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 20:48:40 +00:00
Andrew Nacin c637de7316 WP_Date_Query.
props Viper007Bond.
see #18694.


git-svn-id: https://develop.svn.wordpress.org/trunk@25139 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 16:38:32 +00:00
Andrew Nacin 86f5f6ac78 Don't cast the 'm' query variable to an integer as the value can exceed the range of a 32-bit signed integer.
props Viper007Bond.
fixes #24884.


git-svn-id: https://develop.svn.wordpress.org/trunk@25138 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 15:19:54 +00:00
Jon Cave 8d72fd31d4 Initialize kses filters if _wp_unfiltered_html_comment nonce isn't set.
See #24752.


git-svn-id: https://develop.svn.wordpress.org/trunk@25137 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 13:56:17 +00:00
Andrew Nacin 2b280c5761 Ensure a user exists in get_comment_author().
props azaozz.
see #24084.


git-svn-id: https://develop.svn.wordpress.org/trunk@25136 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 13:16:34 +00:00
Andrew Nacin 328117ffbf Only show 'Preview' on the custom header screen if there is something to show.
props nickmomrik.
fixes #14531.


git-svn-id: https://develop.svn.wordpress.org/trunk@25135 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 12:27:00 +00:00
Andrew Nacin eb1485529f Remove unnecessary loops in default-filters.php.
props Jayjdk.
fixes #25011.


git-svn-id: https://develop.svn.wordpress.org/trunk@25134 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-27 11:58:03 +00:00
Dominik Schilling (ocean90) ad422b8366 Introduce show_in_menu for register_taxonomy.
Accepts boolean: true to show, false to hide. If not set, the default is inherited from show_ui.

fixes #20930.

git-svn-id: https://develop.svn.wordpress.org/trunk@25133 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 22:34:56 +00:00
Andrew Ozz afe41b9134 TinyMCE: fix editor focus issues after ontouchstart event on the parent document in iOS Safari. Fixes #25131 for 3.7.
git-svn-id: https://develop.svn.wordpress.org/trunk@25132 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 21:23:58 +00:00
Andrew Nacin 7694a64c06 Press This: Add admin_head-like hooks that are specific to the page.
props sillybean.
fixes #18843.


git-svn-id: https://develop.svn.wordpress.org/trunk@25131 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 20:59:44 +00:00
Dominik Schilling (ocean90) d0365d1383 Improve inline docs for register_post_type() and register_taxonomy().
* register_taxonomy: Use the same doc format for the associative array arg as used for register_post_type()
* register_taxonomy: Improve docs for _builtin, capabilities, hierarchical and rewrite args
* register_taxonomy: Use the same order in $defaults as in docblock
* register_taxonomy: Replace is_null with null ===, to be consistent
* register_post_type: Use the same order in $defaults as in docblock
* register_post_type: Improve docs for @uses and default fallbacks
And while we're on it: Whitespaces.

fixes #25150.

git-svn-id: https://develop.svn.wordpress.org/trunk@25130 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 20:23:34 +00:00
Andrew Nacin fdae6fb0a5 Twenty Thirteen: Ensure custom headers are set up after the localization is initialized.
props pavelevap.
fixes #24943.


git-svn-id: https://develop.svn.wordpress.org/trunk@25129 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 19:28:50 +00:00
Sergey Biryukov 6d050b262f Ignore case differences when checking file extension in wp_audio_shortcode() and wp_video_shortcode(). props nofearinc, bhengh. fixes #25140.
git-svn-id: https://develop.svn.wordpress.org/trunk@25128 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 19:20:36 +00:00
Sergey Biryukov 35e43e187d Avoid a PHP notice in wpmu_create_blog() if $meta is not passed. props duck_, jeremyfelt, SergeyBiryukov. fixes #20793.
git-svn-id: https://develop.svn.wordpress.org/trunk@25127 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 18:56:32 +00:00
Andrew Nacin 7bc3ebf033 Return 1 from get_comment_pages_count() when pagination is disabled.
props obenland.
fixes #17778.


git-svn-id: https://develop.svn.wordpress.org/trunk@25126 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 18:51:53 +00:00
Andrew Nacin d41c30be7a Network Admin: Hide the bulk actions checkbox for the main site.
props ericlewis.
fixes #24463.


git-svn-id: https://develop.svn.wordpress.org/trunk@25125 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 18:45:30 +00:00
Andrew Nacin 42dee6ccf0 Add post-type-$post_type and taxonomy-$taxonomy admin body classes.
props johnbillion.
fixes #19247.


git-svn-id: https://develop.svn.wordpress.org/trunk@25124 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 18:17:23 +00:00
Sergey Biryukov a679d43131 Add 'taxonomy_parent_dropdown_args' filter for the parent dropdown on taxonomy term editing screens. props leewillis77. fixes #18166.
git-svn-id: https://develop.svn.wordpress.org/trunk@25123 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 17:30:46 +00:00
Ryan Boren 71793b661c Don't show the "Get Shortlink" button for pages with a ?page_id=x permalink.
Props sillybean
fixes #14760


git-svn-id: https://develop.svn.wordpress.org/trunk@25122 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 16:05:46 +00:00
Sergey Biryukov 5615aef0bf Avoid an undefined index notice when submitting a comment with JavaScript disabled. fixes #24752.
git-svn-id: https://develop.svn.wordpress.org/trunk@25121 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 15:39:12 +00:00
Andrew Nacin 512c12ba55 Network Admin toolbar menu: Add Plugins and Themes, remove Visit Network.
props Ipstenu, SergeyBiryukov.
fixes #21674.



git-svn-id: https://develop.svn.wordpress.org/trunk@25120 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-26 15:21:42 +00:00
Sergey Biryukov 65d047cde2 Make in_category() an alias of has_category(). fixes #16718.
git-svn-id: https://develop.svn.wordpress.org/trunk@25119 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-24 22:53:39 +00:00