Commit Graph

25034 Commits

Author SHA1 Message Date
Dominik Schilling (ocean90) 586cb2b140 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@27150 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 21:36:15 +00:00
Drew Jaynes d670819b03 Improve inline documentation for `wp_new_user_notification()`.
Props antorome for the initial patch.
Fixes #26703.


git-svn-id: https://develop.svn.wordpress.org/trunk@27149 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 21:07:01 +00:00
Drew Jaynes eaff87706b Improve inline documenation for `get_the_time()` and `get_post_time().
Props ruud@joyo for the initial patch.
Fixes #26682.


git-svn-id: https://develop.svn.wordpress.org/trunk@27148 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 21:02:36 +00:00
Drew Jaynes b013aaf4c9 Fixes for hooks documentation in wp-includes/wp-db.php.
See #26869, #25229 and [25284].


git-svn-id: https://develop.svn.wordpress.org/trunk@27147 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:50:42 +00:00
Drew Jaynes 6229ba0bb3 Fixes for hooks documentation on xmlrpc.php.
Adds spacing, changes an `@see` to `@link`, adds a docs-specific variable for a parameter.

See #26869, #25229 and [25281].


git-svn-id: https://develop.svn.wordpress.org/trunk@27146 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:38:39 +00:00
Drew Jaynes e4adb8dcfe Fixes for hooks documentation in wp-admin/admin-footer.php.
Adds some new lines, some hook-line spacing, docs-specific variables, and other language tweaks.

See #26869, #25229, [25252].


git-svn-id: https://develop.svn.wordpress.org/trunk@27145 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:28:01 +00:00
Drew Jaynes 1fcb6036ca Fixes for inline documentation for hooks in wp-comments-post.php.
Adds missing `@since` versions, spacing, and language tweaks.

See #26869, #25229, [25249].


git-svn-id: https://develop.svn.wordpress.org/trunk@27144 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 20:11:34 +00:00
Andrew Ozz 0ae2aa696a Remove a stray </div> from the Edit Image template, was breaking it in IE < 9. Props gcorne, see #24409
git-svn-id: https://develop.svn.wordpress.org/trunk@27143 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 18:44:40 +00:00
Scott Taylor e966a23683 Reuse the `terms` cache group for taxonomy cache invalidation.
See #22526, #14485, [27101], [27102].



git-svn-id: https://develop.svn.wordpress.org/trunk@27142 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 17:41:07 +00:00
Drew Jaynes eb43703bba 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@27141 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-09 02:01:28 +00:00
Andrew Nacin ee280cf8dd has_image_size()'s parameter should be required. see [27139], see #26951.
git-svn-id: https://develop.svn.wordpress.org/trunk@27140 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 23:52:40 +00:00
Drew Jaynes c0a7cd58e7 Inline documentation tweaks for `has_image_size()` and `remove_image_size()`.
See #26951.


git-svn-id: https://develop.svn.wordpress.org/trunk@27139 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 22:54:47 +00:00
Drew Jaynes 75c028e042 Inline documentation for the `wp_insert_attachment_data` filter hook, added in [27130].
Fixes #20547.


git-svn-id: https://develop.svn.wordpress.org/trunk@27138 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 22:46:25 +00:00
Drew Jaynes aa502ff35a Fix docs spacing missed in [27136].
See #27070.


git-svn-id: https://develop.svn.wordpress.org/trunk@27137 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 22:18:09 +00:00
Drew Jaynes 4993a00e05 Improve inline documentation for `submit_button()`.
See #27070.


git-svn-id: https://develop.svn.wordpress.org/trunk@27136 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 22:13:18 +00:00
Drew Jaynes 622d3e1338 Clarify `submit_button()` `$type` parameter docs to mention that the value doubles as the CSS class attribute.
See #27070


git-svn-id: https://develop.svn.wordpress.org/trunk@27135 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 22:10:19 +00:00
Sergey Biryukov a3a869fdfd Fix validation issue in get_the_password_form() caused by wpautop().
props andykeith.
fixes #27071.

git-svn-id: https://develop.svn.wordpress.org/trunk@27134 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 13:22:40 +00:00
Andrew Nacin f3cbc44076 Add meetup.com oEmbed support. see #23171.
git-svn-id: https://develop.svn.wordpress.org/trunk@27133 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 01:13:52 +00:00
Andrew Nacin 3266997d99 Improve parameter documentation of add_meta_box().
props philiparthurmoore, DrewAPicture.
fixes #26698.


git-svn-id: https://develop.svn.wordpress.org/trunk@27132 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 00:54:19 +00:00
Andrew Nacin 522670cef2 Various JSHint fixes. see #26446.
git-svn-id: https://develop.svn.wordpress.org/trunk@27131 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 00:51:14 +00:00
Scott Taylor 2238c7fb7f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27130 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 00:43:16 +00:00
Andrew Nacin baeadcfedc Add remove_image_size() and tests for it and has_image_size(), added in [27128].
props mordauk, markoheijnen.
fixes #26768. see #26951.


git-svn-id: https://develop.svn.wordpress.org/trunk@27129 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 00:40:15 +00:00
Scott Taylor d80685a46b Introduce `has_image_size( $name )`, a utility function that helps avoid loading the `$_wp_additional_image_sizes` global.
Props mordauk.
Fixes #26951.



git-svn-id: https://develop.svn.wordpress.org/trunk@27128 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-08 00:19:29 +00:00
Scott Taylor d6cb8c399e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27127 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 22:40:32 +00:00
Scott Taylor 4b047c21ab Add some inline docs to `media-views.js` and remove some unnecessary comments from a few `super` calls.
Props gcorne.
See #26870.



git-svn-id: https://develop.svn.wordpress.org/trunk@27126 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 20:20:38 +00:00
Scott Taylor 81679ef453 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27125 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 19:53:01 +00:00
Lance Willett 5ddc101010 Twenty Fourteen: fix Ephemera Widget to avoid showing full post content when displayed in single post or page. Restore the global `$more` to its original value after the widget output to avoid any issues caused by changing a global variable.
Props obenland, mor10, Frank Klein. See #26961.

git-svn-id: https://develop.svn.wordpress.org/trunk@27124 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 18:03:00 +00:00
Lance Willett 2ec5e68249 Twenty Fourteen: pinking shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@27123 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 18:01:20 +00:00
Lance Willett 9ddb14eb97 Twenty Fourteen: translate `featured` tag slug used to link to specific tags in Posts editor. See #26526.
git-svn-id: https://develop.svn.wordpress.org/trunk@27122 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:46:46 +00:00
Lance Willett 7d23aedf8b Twenty Fourteen: fix unreachable links when the content area is shorter than the sidebar in smaller viewpoints. Props celloexpressions, see #26782.
git-svn-id: https://develop.svn.wordpress.org/trunk@27121 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:42:59 +00:00
Lance Willett 6f9758f69b Twenty Fourteen: delete the `featured_content_ids` transient on theme switch to make sure child themes can override the Featured Content quantity value. Also remove quantity parameter so child themes can change the amount of featured posts with `$max_posts`.
Props obenland, see #26660.

git-svn-id: https://develop.svn.wordpress.org/trunk@27120 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:38:08 +00:00
Sergey Biryukov 5b7c8cf7c1 Use .screen-reader-text class instead of an alt attribute for overlay button labels on Themes screen.
props bramd.
fixes #26603 for trunk.

git-svn-id: https://develop.svn.wordpress.org/trunk@27119 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:32:31 +00:00
Lance Willett cb8654eade Twenty Fourteen: make sure `featured` tag is hidden on front-end views as expected. Add a check for the tag name in case we're using default values and the default ID of `0` does not match the term id of the `featured` tag.
Props obenland, fixes #26732.

git-svn-id: https://develop.svn.wordpress.org/trunk@27118 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:16:53 +00:00
Lance Willett dfb4b73fbe Twenty Fourteen: fix gap above static pages, props SergeyBiryukov. Fixes #26694.
git-svn-id: https://develop.svn.wordpress.org/trunk@27117 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 17:10:04 +00:00
Sergey Biryukov ab112fecb8 Fix typo in wp_set_auth_cookie() description.
props drozdz.
fixes #27046.

git-svn-id: https://develop.svn.wordpress.org/trunk@27116 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 09:46:19 +00:00
Andrew Nacin 4f5608f653 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@27115 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-07 08:13:37 +00:00
Andrew Nacin 3dbd4f8dcb Revisions browser: The back button should return to the post you were editing (use replaceState instead of pushState).
props adamsilverstein.
fixes #26997.


git-svn-id: https://develop.svn.wordpress.org/trunk@27114 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 23:27:47 +00:00
Andrew Nacin 99c1b7323c Add imgur to the list of oEmbed providers.
props bradparbs.
fixes #21632.


git-svn-id: https://develop.svn.wordpress.org/trunk@27113 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 23:11:21 +00:00
Andrew Nacin a2c2c3bfba Network install: When showing the path to wp-config.php make sure our slashes are normalized.
props VarunAgw.
fixes #27025.


git-svn-id: https://develop.svn.wordpress.org/trunk@27112 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 22:21:34 +00:00
Andrew Nacin 1304fb3463 Fix the conditional enqueueing/printing of colors stylesheets, without breaking dependencies.
fixes #18380.
see #20729 which should properly fix this.


git-svn-id: https://develop.svn.wordpress.org/trunk@27111 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 22:15:25 +00:00
Andrew Ozz 4d7d68b565 Fix scrolling inside the Visual editor on MacOS, add the same functionality to the Text editor, see #27013
git-svn-id: https://develop.svn.wordpress.org/trunk@27110 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 19:33:13 +00:00
Helen Hou-Sandi 1b160c1c40 Fix some hover/focus styling and specificity issues. see #18380.
git-svn-id: https://develop.svn.wordpress.org/trunk@27109 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 17:56:30 +00:00
Scott Taylor 8dad11bfe2 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27108 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 17:44:50 +00:00
Helen Hou-Sandi c2e018dd0d Some tweaks to [27106]:
* Add more @todo markings and remove one that's been resolved.
* Restore a missing comma in a `.wp-badge` background rule, and add a comment reminding us why it's there.

see #18380.


git-svn-id: https://develop.svn.wordpress.org/trunk@27107 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 07:07:42 +00:00
Helen Hou-Sandi 802baab31a 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@27106 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 06:24:36 +00:00
Andrew Nacin 7ff0442a07 JSHint fixes for media-views and Gruntfile.
props gcorne.
fixes #27032, #27033.


git-svn-id: https://develop.svn.wordpress.org/trunk@27105 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 05:31:22 +00:00
Scott Taylor 2127c9322d Move some cache related tests to the new `term/cache.php` from [27103].
git-svn-id: https://develop.svn.wordpress.org/trunk@27104 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 05:19:05 +00:00
Scott Taylor 324b2799b3 Add the unit test from #25711. The patch was unnecessary due to [27102], but the test is useful.
Props dd32.
See #25711.



git-svn-id: https://develop.svn.wordpress.org/trunk@27103 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 03:39:22 +00:00
Scott Taylor 50a96f165e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27102 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 01:58:01 +00:00
Scott Taylor e33ef0c6ac 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@27101 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-06 01:40:05 +00:00