Scott Taylor
641e372432
Media: in wp_get_attachment_image_sizes(), ensure that $img_width exists when the image does not.
...
Props kraftbj.
See #33641 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35250 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 22:11:28 +00:00
Drew Jaynes
0bb4a1bdd0
Docs: Improve the hook doc for the get_post_status filter, introduced in [35233].
...
Also adds a missing parameter description for `$post`.
See #23458 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35240 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 14:23:05 +00:00
Ella Iseulde Van Dorpe
112af0751f
Admin: fix repositioning notices
...
Fixes #34294 .
Props afercia.
git-svn-id: https://develop.svn.wordpress.org/trunk@35238 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 07:03:30 +00:00
Sergey Biryukov
9b591d6b09
Embeds: Rename files, functions, and hooks added in [34903] to make it more clear what is oEmbed-specific and what isn't.
...
See https://core.trac.wordpress.org/ticket/34272#comment:7 for full list of renamed functions and hooks.
Props swissspidy.
Fixes #34272 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35235 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 01:20:19 +00:00
Aaron Jorbin
7db19dcda2
Improve get_post_permalink compatibility with non standard post status
...
This adds a new filter named `get_post_status` to the function named `get_post_status` which can be used to make additional post types behave like unpublished post status in `get_post_permalink`.
Props misterbisson, antpb, iamfriendly
Fixes #23458
git-svn-id: https://develop.svn.wordpress.org/trunk@35233 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 00:43:54 +00:00
Sergey Biryukov
fe72320f33
Merge two strings for expanding accordion and Customizer sections.
...
Props pavelevap.
Fixes #33939 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35232 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-17 00:27:44 +00:00
Weston Ruter
370057b5d7
Customizer: Always show Widgets panel initially if sidebars are registered; show notice to users in panel if no widget areas are in current preview.
...
Widgets panel will not wait to display until the preview loads.
Also fixes problems with `margin-top` in panels where other panels' `active` states change, as well as ensuring sections of deactivated panel collapse before panel is hidden to prevent the pane from becoming empty of controls.
Fixes #33052 .
Fixes #33567 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35231 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 23:47:56 +00:00
Sergey Biryukov
de182f7736
Merge two warning strings.
...
Props pavelevap.
Fixes #29740 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35230 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 23:30:29 +00:00
Sergey Biryukov
af36c261e3
Sample permalink: Improve accessibility of changing the permalink on Edit Post screen.
...
Props afercia.
Fixes #34255 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35229 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 23:01:58 +00:00
Sergey Biryukov
7b6454bf6b
Embeds: In print_oembed_embed_styles(), load non-minified file if SCRIPT_DEBUG is true.
...
This is consistent with `print_oembed_embed_scripts()`.
Props MikeHansenMe.
Fixes #34321 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35228 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 22:42:47 +00:00
Boone Gorges
f22ba848df
Return null from get_term() on taxonomy mismatch.
...
[34997] caused `get_term()` to return an error object in the case when
`$taxonomy` did not match the taxonomy of the located term. This was an
inadvertant change from the previous behavior, when `get_term()` would return
null in these cases.
Props dlh.
See #14162 . Fixes #34332 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35227 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 21:41:51 +00:00
Ella Iseulde Van Dorpe
4abf64eb14
TinyMCE: add lang attribute
...
This is needed to make `hyphens: auto;` work correctly.
Fixes #32555 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35217 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 10:10:32 +00:00
Ella Iseulde Van Dorpe
093b6b5d11
TinyMCE: make sure markers are removed after first init
...
This is only relevant to non embeddable URLs.
After first init, markers were set but not removed,
causing an edited URL to revert when switching to text mode
or any paragraph after the URL to just contain that URL.
Fixes #33954 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35216 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 05:42:22 +00:00
Dominik Schilling (ocean90)
f75321f3ec
Multisite: Remove the strictness for $using_paths in WP_Network::get_by_path().
...
The network lookup was broken when using an external object cache because `$using_paths` isn't always a boolean. Added in [34099].
See #31985 , #31491 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35212 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 22:06:38 +00:00
Drew Jaynes
c8bf2ce727
Docs: Fix a typo in an inline comment in wp_get_attachment_image_srcset_array().
...
Props neoxx.
Fixes #34319 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35210 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 20:51:58 +00:00
Sergey Biryukov
acce286d34
In WP::parse_request() and url_to_postid(), don't skip objects that have a post status with 'exclude_from_search' => false, e.g. inherit.
...
This fixes pretty permalinks for attachments, broken in [35195].
Fixes #21970 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35205 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 17:52:36 +00:00
Ella Iseulde Van Dorpe
017daba3d8
TinyMCE: make captioned images draggable
...
See #28003 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35199 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 15:19:04 +00:00
Sergey Biryukov
65390cd9cf
In WP::parse_request() and url_to_postid(), if a post slug clashes with a trashed page, return the post instead of the page.
...
Props kovshenin, SergeyBiryukov, igmoweb.
Fixes #21970 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35195 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 06:48:22 +00:00
Sergey Biryukov
e675e2ccf0
Users: Add 'illegal_user_logins' filter to allow certain usernames to be blacklisted.
...
Props danielbachhuber, chriscct7, crazycoolcam, SergeyBiryukov.
Fixes #27317 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35189 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 05:42:05 +00:00
Drew Jaynes
0cb7c0bd9f
Docs: Add missing descriptions for the $wpdb global in DocBlocks all the places.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35170 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 23:43:10 +00:00
Drew Jaynes
5ffe8f5aef
Docs: Add missing file headers to two Toolbar API files: wp-includes/admin-bar.php and wp-includes/class-wp-admin-bar.php.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35157 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 17:26:28 +00:00
Jeremy Felt
224efdf892
MS: Add "Settings" link under "Network Admin" toolbar menu.
...
Props johnjamesjacoby.
Fixes #34287 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35156 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 16:59:33 +00:00
John Blackbourn
ad519f2ee0
Reinstate the Link Category admin screen after [34359].
...
See [13216]
Fixes #34284
git-svn-id: https://develop.svn.wordpress.org/trunk@35153 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-14 01:50:25 +00:00
John Blackbourn
61a40366e6
Improve the docs for the $expiration parameter in set_transient(), set_site_transient(), and associated filters.
...
See #32246
git-svn-id: https://develop.svn.wordpress.org/trunk@35149 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 21:30:41 +00:00
Drew Jaynes
7cb8fc1b3b
Multisite: Improve two error strings specifying allowed characters in usernames and site names.
...
Also removes two error strings that were likely never being triggered anyway due to the stricter character matching higher up.
Props atomicjack, bjornjohansen, DrewAPicture.
Fixes #33336 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35142 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 17:32:17 +00:00
Scott Taylor
16b02b6768
KSES: have you ever heard of the <bdo> HTML tag? Same. http://www.w3schools.com/tags/tag_bdo.asp
...
Adds unit test.
Props iandunn.
Fixes #34063 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35141 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 17:17:13 +00:00
Scott Taylor
55a42e8afa
Taxonomy: in wp_list_categories(), add an arg: separator, to allow the overriding of <br/>.
...
Props wojtek.szkutnik.
Fixes #9025 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35140 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 17:01:10 +00:00
Drew Jaynes
0a8b41c950
Users: Restore changes from [35114] accidentally reverted in [35135].
...
See #28631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35138 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 15:44:14 +00:00
Drew Jaynes
5e37130fcd
Docs: Add a changelog entry mentioning that the number argument now supports -1 (all).
...
Also fixes the argument description.
-1 support was added in [35114].
See #28631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35135 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 15:15:30 +00:00
Sergey Biryukov
c5c5bd31dd
Toolbar: Improve padding of toolbar submenu items on small screens.
...
Props tillkruess.
Fixes #28608 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35132 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 07:39:54 +00:00
Scott Taylor
da6e194d93
Admin Bar: fix the alignment of secondary menu item arrows.
...
Props juhise.
Fixes #33836 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35125 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 03:53:16 +00:00
Scott Taylor
a6a0045460
Fotmatting: in sanitize_file_name(), escape % when uploads contain them, otherwise attachment URLs will unescape the char and break.
...
Adds unit tests.
Props mordauk, simonwheatley, dd32, solarissmoke.
Fixes #16226 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35122 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 03:21:13 +00:00
Sergey Biryukov
0f2f946736
Feeds: Remove a confusing comment from add_feed(), added in [3638].
...
It always overrides the default callback if it's set, regardless of the `in_array()` check.
See #34259 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35121 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 03:13:31 +00:00
Boone Gorges
0d28b59c0b
Use a more reliable method for generating get_terms() cache key.
...
Previously, the cache key included a serialization of `list_terms_exclusions`
callbacks, to ensure that the cache was differentiated properly for different
uses of the `list_terms_exclusions` filter. This strategy was flawed in a
couple of ways: serialization doesn't work equally well for all callable types;
the serialization required reaching into the `$wp_filter` global; serializing
the callback itself didn't properly account for the possibility that the
callback might return different values in different contexts; the cache key
didn't account for other filters that similarly affect the cached values, such
as `terms_clauses`.
We skirt all these issues by concatenating the cache key using the SQL query
string, which will reflect all filters applied earlier in `get_terms()`.
Props boonebgorges, wonderboymusic.
Fixes #21267 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35120 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 03:06:27 +00:00
SergeyBiryukov
d5e0f87530
Docs: Describe the $feedname argument of add_feed().
...
Fixes #34259 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35119 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 03:00:03 +00:00
Sergey Biryukov
77e2cd9e18
Feeds: Pass the second parameter of "do_feed_{$feed}" action, feed name, to callbacks added via add_feed().
...
The `$feed` parameter was added in [35115].
Props slimndap.
See #34259 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35118 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:58:21 +00:00
Boone Gorges
f9094e546a
In get_terms(), don't store WP_Term objects in cache.
...
Fixes #34282 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35117 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:57:21 +00:00
Scott Taylor
34cb01e2f1
Users: when passing a WP_User instance to wp_update_user(), ensure that the user password is not accidentally double-hashed. This is terrifying.
...
Adds unit tests.
Props tbcorr, salcode.
Fixes #28435 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35116 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:47:09 +00:00
Sergey Biryukov
4a2184d00c
Feeds: Pass the feed name to do_feed_{$feed} action.
...
Props johnbillion.
See #34259 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35115 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:43:30 +00:00
Scott Taylor
4c0b89553a
Users: allow -1 (no limit, use with extreme caution on large sites) as the value for number in WP_User_Query - similar to posts_per_page => -1 in WP_Query.
...
Adds unit tests.
Props mordauk, jesin, nofearinc.
Fixes #28631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35114 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:39:05 +00:00
Boone Gorges
ae96d16ed9
Remove dead code from WP_Query::lazyload_term_meta().
...
git-svn-id: https://develop.svn.wordpress.org/trunk@35111 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 02:35:30 +00:00
Scott Taylor
65c8adc252
Widgets: When using the_widget(), the $before_widget argument only receives the widget class if using the default sidebar arguments. Run sprintf after parsing the args to fix this.
...
Adds unit test.
Props coffee2code.
Fixes #19450 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35106 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:48:41 +00:00
Sergey Biryukov
c0c0305749
Replace get_bloginfo( 'wpurl' ) with site_url() in rsd_link().
...
Ensure the correct scheme is used for the `application/rsd+xml` link URL.
Props johnbillion.
See #34280 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35105 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:48:32 +00:00
Drew Jaynes
72c81e01d4
Widgets: Rename the $name parameter in is_registered_sidebar() to $sidebar_id and adjust the accepted types to string|int as sidebar IDs can be numeric.
...
See #24878 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35104 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:44:44 +00:00
Scott Taylor
b272dc68b9
Widgets: add a default filter for widget_text (used by the Text widget), balanceTags, which respects the option for use_balanceTags.
...
Props MikeHansenMe.
Fixes #23083 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35103 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:39:43 +00:00
Scott Taylor
3616fe5939
Widgets: add a function, is_registered_sidebar() - helps us avoid touching the $wp_registered_sidebars global.
...
Props GaryJ, wonderboymusic.
Fixes #24878 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35102 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:32:27 +00:00
Boone Gorges
9f551a4630
Don't match partial roles in WP_User_Query.
...
Because 'role=ocean90' shouldn't match 'role=bocean901'.
Props bocean901, ocean90.
Fixes #22212 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35101 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:31:53 +00:00
Scott Taylor
d936110f7c
Widgets: when getting settings, and none exist, set them to empty to avoid extraneous database queries on subsequent requests.
...
Adds unit tests.
Props kovshenin, MikeHansenMe, dlh.
Fixes #26876 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35100 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:12:12 +00:00
Drew Jaynes
681d100fd6
Feeds: Simplify logic for checking if the do_feed_{$feed} action is hooked to any callbacks.
...
See [35097] for where the aforementioned hook was renamed to actually be dynamic, thus rendering creation of the extra `$hook` variable moot.
See #34264 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35098 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:06:26 +00:00
Drew Jaynes
1246590769
Feeds: Adjust the do_feed_{$feed} hook name to actually be dynamic, rather than pre-storing the tag name in a variable and referencing that.
...
Props johnbillion.
Fixes #34264 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35097 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 01:02:47 +00:00