Commit Graph

12979 Commits

Author SHA1 Message Date
Andrew Nacin
5f0981788d Detect and handle symlinking of plugins in plugin_basename().
props rmccue, MikeSchinkel, jdgrimes.
see #16953.

Built from https://develop.svn.wordpress.org/trunk@27158


git-svn-id: http://core.svn.wordpress.org/trunk@27024 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 23:00:15 +00:00
Drew Jaynes
c8665c5973 Fix a typo in the PHPDoc for comment_author_email_link().
See #27083.

Built from https://develop.svn.wordpress.org/trunk@27157


git-svn-id: http://core.svn.wordpress.org/trunk@27023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 04:07:12 +00:00
Drew Jaynes
8eb2d3610b Inline documentation cleanup in wp-includes/comment-template.php.
This cleanup follows [25567] and brings the docs in-line with standards that at the time had not yet been finalized.

These changes include
* Moving in-line `@see` tags to their own lines
* Using docs-specific variables in hook docs
* Fixing line-wrapping throughout
* Typos and punctuation
* Converting hash notation values to variables per the standard

Fixes #27083. See #20495.

Built from https://develop.svn.wordpress.org/trunk@27156


git-svn-id: http://core.svn.wordpress.org/trunk@27022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-10 03:20:12 +00:00
Andrew Ozz
eba12cfaf4 Remove unused arg from wp_auth_check(), see #27081.
Built from https://develop.svn.wordpress.org/trunk@27154


git-svn-id: http://core.svn.wordpress.org/trunk@27021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 22:34:11 +00:00
Andrew Nacin
60cc98b86d Run wp_auth_check on every heartbeat tick.
wp_heartbeat_received only runs when data is sent. We want to always pass this data back, though.

fixes #27081.

Built from https://develop.svn.wordpress.org/trunk@27153


git-svn-id: http://core.svn.wordpress.org/trunk@27020 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 22:28:12 +00:00
Scott Taylor
c2adc15b45 Collect the post and link ids that will be reassigned before running the update in remove_user_from_blog(). Use array_walk() instead of array_map() when invalidating the caches for the collected ids.
Props kovshenin.
Fixes #25545.


Built from https://develop.svn.wordpress.org/trunk@27152


git-svn-id: http://core.svn.wordpress.org/trunk@27019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 21:47:12 +00:00
Dominik Schilling
31d1f909a4 Nav Menu: Remove post/page items from the Nav Menu when the post/page is deleted.
This was broken through a change in [25163]. `_menu_item_object` in wp_get_associated_nav_menu_items() is not relevant for post types.
Adds unit tests.

props UmeshSingla for initial patch.
fixes #26795.
Built from https://develop.svn.wordpress.org/trunk@27150


git-svn-id: http://core.svn.wordpress.org/trunk@27017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 21:37:11 +00:00
Drew Jaynes
db605f4767 Improve inline documentation for wp_new_user_notification().
Props antorome for the initial patch.
Fixes #26703.

Built from https://develop.svn.wordpress.org/trunk@27149


git-svn-id: http://core.svn.wordpress.org/trunk@27016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 21:07:12 +00:00
Drew Jaynes
cb3c7997c7 Improve inline documenation for get_the_time() and `get_post_time().
Props ruud@joyo for the initial patch.
Fixes #26682.

Built from https://develop.svn.wordpress.org/trunk@27148


git-svn-id: http://core.svn.wordpress.org/trunk@27015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 21:03:13 +00:00
Drew Jaynes
aa8b462a95 Fixes for hooks documentation in wp-includes/wp-db.php.
See #26869, #25229 and [25284].

Built from https://develop.svn.wordpress.org/trunk@27147


git-svn-id: http://core.svn.wordpress.org/trunk@27014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 20:51:13 +00:00
Andrew Ozz
025ea220c5 Remove a stray </div> from the Edit Image template, was breaking it in IE < 9. Props gcorne, see #24409
Built from https://develop.svn.wordpress.org/trunk@27143


git-svn-id: http://core.svn.wordpress.org/trunk@27010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 18:45:11 +00:00
Scott Taylor
6a626ab231 Reuse the terms cache group for taxonomy cache invalidation.
See #22526, #14485, [27101], [27102].


Built from https://develop.svn.wordpress.org/trunk@27142


git-svn-id: http://core.svn.wordpress.org/trunk@27009 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 17:42:11 +00:00
Drew Jaynes
f481bcd2db Improve inline documentation for several 'last_changed'-related functions introduced in [27101] and [27102].
Functions include:
* `get_taxonomy_last_changed()`
* `set_taxonomy_last_changed()`
* `post_taxonomy_is_fresh()`
* `taxonomy_hierarchy_is_fresh()`

Fixes #22526, #14485.

Built from https://develop.svn.wordpress.org/trunk@27141


git-svn-id: http://core.svn.wordpress.org/trunk@27008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 02:02:12 +00:00
Andrew Nacin
65f4497766 has_image_size()'s parameter should be required. see [27139], see #26951.
Built from https://develop.svn.wordpress.org/trunk@27140


git-svn-id: http://core.svn.wordpress.org/trunk@27007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 23:53:12 +00:00
Drew Jaynes
127907a85b Inline documentation tweaks for has_image_size() and remove_image_size().
See #26951.

Built from https://develop.svn.wordpress.org/trunk@27139


git-svn-id: http://core.svn.wordpress.org/trunk@27006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 22:55:11 +00:00
Drew Jaynes
8c9f7965af Inline documentation for the wp_insert_attachment_data filter hook, added in [27130].
Fixes #20547.

Built from https://develop.svn.wordpress.org/trunk@27138


git-svn-id: http://core.svn.wordpress.org/trunk@27005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 22:47:12 +00:00
Sergey Biryukov
7e969d706e Fix validation issue in get_the_password_form() caused by wpautop().
props andykeith.
fixes #27071.
Built from https://develop.svn.wordpress.org/trunk@27134


git-svn-id: http://core.svn.wordpress.org/trunk@27001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 13:23:13 +00:00
Andrew Nacin
d152663319 Add meetup.com oEmbed support. see #23171.
Built from https://develop.svn.wordpress.org/trunk@27133


git-svn-id: http://core.svn.wordpress.org/trunk@27000 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 01:14:11 +00:00
Andrew Nacin
6adabc6e4d Various JSHint fixes. see #26446.
Built from https://develop.svn.wordpress.org/trunk@27131


git-svn-id: http://core.svn.wordpress.org/trunk@26998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:52:12 +00:00
Scott Taylor
cbc1b90633 Add a filter wp_insert_attachment_data in wp_insert_attachment(). This is similar to the wp_insert_post_data filter in wp_insert_post().
Fixes #20547.


Built from https://develop.svn.wordpress.org/trunk@27130


git-svn-id: http://core.svn.wordpress.org/trunk@26997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:44:13 +00:00
Andrew Nacin
53867f3081 Add remove_image_size() and tests for it and has_image_size(), added in [27128].
props mordauk, markoheijnen.
fixes #26768. see #26951.

Built from https://develop.svn.wordpress.org/trunk@27129


git-svn-id: http://core.svn.wordpress.org/trunk@26996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:41:13 +00:00
Scott Taylor
2610e6d4ff Introduce has_image_size( $name ), a utility function that helps avoid loading the $_wp_additional_image_sizes global.
Props mordauk.
Fixes #26951.


Built from https://develop.svn.wordpress.org/trunk@27128


git-svn-id: http://core.svn.wordpress.org/trunk@26995 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 00:20:13 +00:00
Scott Taylor
03dda3b273 Introduce maybe_regenerate_attachment_metadata( $attachment ). On the Edit Media screen, call it for Audio and Video files.
The functions checks if the item is lacking metadata altogether. If a video or audio file was uploaded prior to 3.6, it does not have any metadata. This tries to fix it. Implements locking via a transient to protect against this running in parallel with another request.

This is the minimum viable product for #26825, but leaving the ticket open unless this function needs to be called in other places.

See #26825.


Built from https://develop.svn.wordpress.org/trunk@27127


git-svn-id: http://core.svn.wordpress.org/trunk@26994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 22:41:12 +00:00
Scott Taylor
f1fff8a2e9 Add some inline docs to media-views.js and remove some unnecessary comments from a few super calls.
Props gcorne.
See #26870.


Built from https://develop.svn.wordpress.org/trunk@27126


git-svn-id: http://core.svn.wordpress.org/trunk@26993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 20:21:12 +00:00
Scott Taylor
75d8688f60 When a term_id matches in _get_term_children(), recurse through its children until there is no more depth in the hierarchy. Since get_terms() return terms with a count of 0 when their children are not empty, we must return all children so that get_terms() can check their count.
In [27108], #26903 was fixed, but only because we were using the example in the ticket, leaving out infinite depth for hierarchical taxonomies.

Adds unit tests, including `Tests_Term_getTerms::test_get_terms_seven_levels_deep()`.

Fixes #26903. Again.


Built from https://develop.svn.wordpress.org/trunk@27125


git-svn-id: http://core.svn.wordpress.org/trunk@26992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 19:53:12 +00:00
Sergey Biryukov
1f86e0c1e1 Fix typo in wp_set_auth_cookie() description.
props drozdz.
fixes #27046.
Built from https://develop.svn.wordpress.org/trunk@27116


git-svn-id: http://core.svn.wordpress.org/trunk@26983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 09:47:12 +00:00
Andrew Nacin
084a7b50cd Use a float for last_changed microtime cache values.
microtime() by default returns a string with a space, which isn't allowed for keys in some cache backends.

props _jameslee, drozdz.
fixes #27000. see #23448.

Built from https://develop.svn.wordpress.org/trunk@27115


git-svn-id: http://core.svn.wordpress.org/trunk@26982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-07 08:14:12 +00:00
Andrew Nacin
784d3071c9 Add imgur to the list of oEmbed providers.
props bradparbs.
fixes #21632.

Built from https://develop.svn.wordpress.org/trunk@27113


git-svn-id: http://core.svn.wordpress.org/trunk@26980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 23:12:12 +00:00
Andrew Nacin
12a64b39db Fix the conditional enqueueing/printing of colors stylesheets, without breaking dependencies.
fixes #18380.
see #20729 which should properly fix this.

Built from https://develop.svn.wordpress.org/trunk@27111


git-svn-id: http://core.svn.wordpress.org/trunk@26978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 22:16:11 +00:00
Andrew Ozz
5ea367cfe1 Fix scrolling inside the Visual editor on MacOS, add the same functionality to the Text editor, see #27013
Built from https://develop.svn.wordpress.org/trunk@27110


git-svn-id: http://core.svn.wordpress.org/trunk@26977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 19:34:12 +00:00
Scott Taylor
c2b712e3b9 In get_terms(), don't set automatically hierarchical to false when parent => 0 is passed. The default value for parent is ''.
In `_get_term_children()`, don't skip a top-level term without first including its children in the returned term list. Ironically, the call to `_get_term_children()` in `get_terms()` has a comment stating `"Make sure we show empty categories that have children."`, but it didn't work if you were retrieving top-level categories only.

All unit tests pass. Added a unit test based on the use case described in this ticket.

Fixes #26903.


Built from https://develop.svn.wordpress.org/trunk@27108


git-svn-id: http://core.svn.wordpress.org/trunk@26975 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 17:45:12 +00:00
Helen Hou-Sandí
0100dd772a Merge colors.css into wp-admin.css. Non-default color schemes became overloads rather than swaps in the 3.8 redesign. Benefits include:
* No more border-width, border-style, border-color insanity.
* Point releases are much less likely to require extra finagling to avoid rebuilding the color schemes.
* Yours truly has a better overall vision of ~14,000 lines of admin CSS and where we go from here.

1,065 net lines of red, y'all.
props helen, jorbin. fixes #18380.

Built from https://develop.svn.wordpress.org/trunk@27106


git-svn-id: http://core.svn.wordpress.org/trunk@26973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 06:25:18 +00:00
Andrew Nacin
6169e8662b JSHint fixes for media-views and Gruntfile.
props gcorne.
fixes #27032, #27033.

Built from https://develop.svn.wordpress.org/trunk@27105


git-svn-id: http://core.svn.wordpress.org/trunk@26972 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 05:32:12 +00:00
Scott Taylor
5d03d8eb50 Regenerate the term hierarchy cache ({taxonomy}_children) when it is out of sync with the passed taxonomy's last_changed value.
Introduces `taxonomy_hierarchy_is_fresh()`, which is only called in `_get_term_hierarchy()`. The taxonomy's `last_changed` value is checked against the value of `wp_cache_get( 'hierarchy_last_changed', $taxonomy )`.

Adds a unit test - `Tests_Term:test_hierachy_invalidation()`.

See [27101], which makes this type of cache invalidation possible.
Fixes #14485.


Built from https://develop.svn.wordpress.org/trunk@27102


git-svn-id: http://core.svn.wordpress.org/trunk@26971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 01:58:14 +00:00
Scott Taylor
578dbcd9f5 Add cache invalidation when updating a term, example: create a category, assign it to a post, edit the category. Currently, the post's term cache is not updated. When updating terms in a given taxonomy, invalidate the object term caches linked to that taxonomy.
Introduce `get_taxonomy_last_changed()`, `set_taxonomy_last_changed()`, and `post_taxonomy_is_fresh()`.

`post_taxonomy_is_fresh()` is only called in `get_object_term_cache()` - at which point the taxonomy's `last_changed` value is checked against the post's `{$taxonomy}_last_changed` value.

`set_taxonomy_last_changed()` is called whenever directory database queries are made that insert new terms or affect existing terms.

Fixes #22526.


Built from https://develop.svn.wordpress.org/trunk@27101


git-svn-id: http://core.svn.wordpress.org/trunk@26970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-06 01:41:12 +00:00
Andrew Ozz
c4f8dede57 TinyMCE: set the proper caption width when clicking image resize handle on image with caption. Props gcorne, fixes #27009, see #24067.
Built from https://develop.svn.wordpress.org/trunk@27098


git-svn-id: http://core.svn.wordpress.org/trunk@26969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 02:07:13 +00:00
Scott Taylor
228fc639b9 When a video shortcode has content in its body, append it as inner HTML in the resulting <video>.
Reverts [27096].
Fixes #26628.
See #27016.


Built from https://develop.svn.wordpress.org/trunk@27097


git-svn-id: http://core.svn.wordpress.org/trunk@26968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 01:43:12 +00:00
Andrew Ozz
5e08452f49 TinyMCE: don't scroll the main window when scrolling the editor content with a mouse wheel or trackpad and reaching the end. Fixes #27013.
Built from https://develop.svn.wordpress.org/trunk@27095


git-svn-id: http://core.svn.wordpress.org/trunk@26967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 01:10:13 +00:00
Andrew Ozz
98cb4984c0 Consolidate handling of <object>, <audio> and <video> in wpautop() and add unit tests for them. Part props wonderboymusic, see #26864
Built from https://develop.svn.wordpress.org/trunk@27094


git-svn-id: http://core.svn.wordpress.org/trunk@26966 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 00:46:12 +00:00
Andrew Ozz
5ce168941a When using wp_editor(), make it easier to specify which editor is shown first, fixes #20822
Built from https://develop.svn.wordpress.org/trunk@27093


git-svn-id: http://core.svn.wordpress.org/trunk@26965 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-05 00:34:12 +00:00
Andrew Nacin
9edfc740fd Autosave: Fix typo in event namespace. props avryl, see #25272.
Built from https://develop.svn.wordpress.org/trunk@27092


git-svn-id: http://core.svn.wordpress.org/trunk@26964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-04 16:07:12 +00:00
Scott Taylor
274d2925b9 Invalidate the post cache for posts associated with a user who has been removed from a blog in remove_user_from_blog(). Adds a unit test.
Props nprasath002 for the initial patch.
Fixes #25545.


Built from https://develop.svn.wordpress.org/trunk@27087


git-svn-id: http://core.svn.wordpress.org/trunk@26959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-04 04:13:12 +00:00
Andrew Ozz
93d3e3efb6 Minor cleanup (jshint) of wp-fullscreen.js and /wordpress/plugin.js, see #24067
Built from https://develop.svn.wordpress.org/trunk@27085


git-svn-id: http://core.svn.wordpress.org/trunk@26958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 21:31:13 +00:00
Andrew Ozz
2726713764 Add back missing var definition in wplink.js, props TobiasBg, see #24067
Built from https://develop.svn.wordpress.org/trunk@27084


git-svn-id: http://core.svn.wordpress.org/trunk@26957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 21:27:12 +00:00
Andrew Ozz
12b6085865 TinyMCE: don't replace <i> with <em> and <b> with <strong> and don't remove them when empty, see #24067, see #23037.
Built from https://develop.svn.wordpress.org/trunk@27083


git-svn-id: http://core.svn.wordpress.org/trunk@26956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 20:26:12 +00:00
Sergey Biryukov
e35d675558 Add braces around conditionals. props TobiasBg. fixes #25704.
Built from https://develop.svn.wordpress.org/trunk@27082


git-svn-id: http://core.svn.wordpress.org/trunk@26955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 20:17:11 +00:00
Scott Taylor
4830eeb9ad Properly invalidate the cache for wp_count_posts() on insert, trash, or when transitioning post_status inside of _transition_post_status(). Introduces _count_posts_cache_key(). Adds unit tests.
Props mark8barnes, for bringing this to our attention in an initial patch.
Fixes #21879.


Built from https://develop.svn.wordpress.org/trunk@27081


git-svn-id: http://core.svn.wordpress.org/trunk@26954 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 19:42:13 +00:00
Andrew Ozz
2f6d9d37cc Consolidate "close on Escape" in the media modal, DFW, wpLink and Thickbox. Props kovshenin, fixes #26854.
Built from https://develop.svn.wordpress.org/trunk@27080


git-svn-id: http://core.svn.wordpress.org/trunk@26953 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-03 05:31:14 +00:00
Andrew Ozz
7e7723f1de Editor: add :focus style for the Quicktags buttons, fixes #26932
Built from https://develop.svn.wordpress.org/trunk@27078


git-svn-id: http://core.svn.wordpress.org/trunk@26951 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 22:38:12 +00:00
Andrew Nacin
fb3985663a Remove an unnecessary variable passed to wpdb::prepare() during multisite load.
props jeremyfelt.
fixes #26941.

Built from https://develop.svn.wordpress.org/trunk@27076


git-svn-id: http://core.svn.wordpress.org/trunk@26949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 22:09:12 +00:00