Commit Graph

28550 Commits

Author SHA1 Message Date
Sergey Biryukov
d33e517bb9 Themes: Fix position of admin notice with .notice class.
fixes #30895.

git-svn-id: https://develop.svn.wordpress.org/trunk@31054 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 20:05:19 +00:00
Sergey Biryukov
7d7b33ff49 Pass comment author name and comment ID to 'get_comment_author_link' filter on Edit Comment screen, for consistency with [30092].
props tyxla.
fixes #30894.

git-svn-id: https://develop.svn.wordpress.org/trunk@31053 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 19:09:36 +00:00
Gary Pendergast
eb4d356e29 size_format() incorrectly included a trailing space for B values: less than 1024 bytes.
Also add a unit test to check for this, so we don't do it again.

Fixes #30908.

Props tillkruess.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@31052 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 13:12:06 +00:00
Gary Pendergast
aada083f3c WPDB: To ensure we're not asking MySQL to read data using queries that it can't handle, make sure that we run all read queries through the character set sanity checks.
See #21212.



git-svn-id: https://develop.svn.wordpress.org/trunk@31051 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 04:39:26 +00:00
Gary Pendergast
ea660736eb WPDB Docs: Update the @since version from 4.1.0 to 4.2.0, for all the methods/members that were punted from 4.1.
See #21212.



git-svn-id: https://develop.svn.wordpress.org/trunk@31050 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 03:50:14 +00:00
Dion Hulse
8cce0f1607 Preinitialize WP_User::$data to an object in the event an empty user object is created. Avoids a "Creating default object from empty value" PHP Warning.
Fixes #28019


git-svn-id: https://develop.svn.wordpress.org/trunk@31049 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-05 01:40:43 +00:00
Sergey Biryukov
44c0c4a9cd A couple more tweaks to the post-thumbnail-template.php description.
see #30867.

git-svn-id: https://develop.svn.wordpress.org/trunk@31048 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 23:09:53 +00:00
Boone Gorges
969808e7bb Add tests for the 'post_status' behavior of WP_Query.
See #29167.

git-svn-id: https://develop.svn.wordpress.org/trunk@31047 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 20:35:12 +00:00
Boone Gorges
04eef529b0 Remove non-built-in post statuses during each unit test teardown.
See #29167.

git-svn-id: https://develop.svn.wordpress.org/trunk@31046 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 20:05:53 +00:00
Scott Taylor
2003fcae83 In Media Views, use this.listenTo( this.model, .... ) instead of this.model.on( .... ) to fix garbage collection and to avoid "ghost views."
Fixes #30896.


git-svn-id: https://develop.svn.wordpress.org/trunk@31045 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 05:24:24 +00:00
Scott Taylor
49d19a367a ImageMagick expects TIFF files to have .tiff as an extension, so the key in wp_get_mime_types() should be 'tiff|tif' not 'tif|tiff' so the proper extension is returned in WP_Image_Editor->get_extension() subclass invocations.
Fixes #30211.


git-svn-id: https://develop.svn.wordpress.org/trunk@31044 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 03:08:48 +00:00
Scott Taylor
14ddc6c9c0 If IMAGE_EDIT_OVERWRITE is defined as true, ensure that multiple edits to the same image does not result in the file being deleted (updating the meta fails because the old and new paths are identical).
Props hew.
Fixes #30394.


git-svn-id: https://develop.svn.wordpress.org/trunk@31043 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:51:20 +00:00
Scott Taylor
621e909a9b Improve the handling of comma-separated mime-types in wp_match_mime_types(), particularly as pertains to the mime-type selector on the Media list table screen.
Props mdgl.
Fixes #30788.


git-svn-id: https://develop.svn.wordpress.org/trunk@31042 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:31:29 +00:00
Scott Taylor
efc61d054e After [31037], ensure that the library is passed as a map to the Media Grid instance. Remove useless query vars.
Fixes #30584.


git-svn-id: https://develop.svn.wordpress.org/trunk@31041 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-04 02:06:04 +00:00
Scott Taylor
3d3e1fb72a Preserve alpha transparency when rotating a PNG while GD is the active image editor.
Adds unit tests.

Props frankpw, voldemortensen.
Fixes #30596.


git-svn-id: https://develop.svn.wordpress.org/trunk@31040 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 22:01:54 +00:00
Scott Taylor
6d858cc6e2 In Media Grid, don't immediately load full size images if the requested size passed to wp.media.view.Attachment.imageSize() does not exist, look for other suitable sizes.
Fixes #30861.


git-svn-id: https://develop.svn.wordpress.org/trunk@31039 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 21:31:23 +00:00
Scott Taylor
3fe38d959a Fix spacing of .compat-item .field form widgets in media modal.
Props trepmal.
Fixes #30886.


git-svn-id: https://develop.svn.wordpress.org/trunk@31038 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 20:46:16 +00:00
Scott Taylor
5df9963414 Respect query vars for taxonomies passed as URL parameters when in grid mode of Media Library.
Fixes #30584.


git-svn-id: https://develop.svn.wordpress.org/trunk@31037 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 08:23:06 +00:00
Scott Taylor
fdef2cc755 Remove whitespace side effects from comment_form().
Props timersys.
Fixes #30500.


git-svn-id: https://develop.svn.wordpress.org/trunk@31036 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 06:26:38 +00:00
Scott Taylor
ca8fe1a7a4 Use the 'not_found' label when there are no items for a taxonomy in the terms list table.
Props SergeyBiryukov.
Fixes #30586.


git-svn-id: https://develop.svn.wordpress.org/trunk@31035 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 06:19:46 +00:00
Scott Taylor
47f2c42528 Inline <script>s that are only printed in the admin for pages that are served with the HTML5 doctype absolutely do not need CDATA comments.
Props tw2113 for the initial patch.
See #18788.


git-svn-id: https://develop.svn.wordpress.org/trunk@31034 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 05:45:17 +00:00
Scott Taylor
5db95f22d0 After [31030]: if a callable is passed as the 3rd arg to wp_localize_script()/WP_Scripts->localize(), pass $handle and $object_name to the user func when invoking it.
Props jtsternberg.
Fixes #26111.


git-svn-id: https://develop.svn.wordpress.org/trunk@31033 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 05:12:56 +00:00
Scott Taylor
c21e4f95ce Add the ability to print data *after* a script, whether it is concatenated or not:
* Add a third argument to `WP_Scripts->print_extra_script()`, `$key`, which will be passed to `->get_data()` (no longer passes hardcoded `'data'`)
* When `$key` is set to `'data-after'`, the inline script will be printed after the `<script>` tag. If the scripts are being concatenated, all scripts' `'data-after'` data will be printed after the concatenated `<script>` has been rendered.

Props hakre, wonderboymusic.
Fixes #25277.


git-svn-id: https://develop.svn.wordpress.org/trunk@31032 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 05:07:15 +00:00
Scott Taylor
d699ce8b13 Ensure that inline styles attached to conditional stylesheets are also conditional.
Adds unit test.

Props georgestephanis.
Fixes #29180.


git-svn-id: https://develop.svn.wordpress.org/trunk@31031 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 04:09:12 +00:00
Scott Taylor
c69dbc8b5a Allow the 3rd argument to wp_localize_script()/WP_Scripts->localize() to be a callable, allowing data to be lazy-loaded when the script is actually enqueued.
Props jtsternberg.
Fixes #26111.


git-svn-id: https://develop.svn.wordpress.org/trunk@31030 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 03:53:30 +00:00
Scott Taylor
d5328fc674 When outputting JS with a Content-Type header:
`text/javascript` is obsolete, `application/x-javascript` was experimental. `application/javascript` is the recommended type per RFC 4329.

Props sergej.mueller.
Fixes #29196.


git-svn-id: https://develop.svn.wordpress.org/trunk@31029 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:56:14 +00:00
Scott Taylor
8476a2e2fa When calling wp_enqueue_script() with a registered $handle, no $src (using the default value, false), and true as the value for $in_footer, ensure that the script actually loads in the footer. If the handle was registered with $in_footer equal to true, this already worked. Make it work for scripts like where $in_footer was initially false, example: wp_enqueue_script( 'json2', false, array(), false, true );
Props SergeyBiryukov.
Fixes #14488.


git-svn-id: https://develop.svn.wordpress.org/trunk@31028 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:40:11 +00:00
Boone Gorges
8d990ce6f8 Introduce 'category_css_classes' filter.
Paralleling the 'page_css_classes' filter, this allows developers to modify
the list of CSS classes used when creating category list markup via
`Walker_Category`.

Props sivel.
Fixes #16497.

git-svn-id: https://develop.svn.wordpress.org/trunk@31027 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:30:14 +00:00
Boone Gorges
3da394f499 Add tests for wp_list_categories() CSS class generation.
See #16497.

git-svn-id: https://develop.svn.wordpress.org/trunk@31026 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:22:54 +00:00
Boone Gorges
fd8b7faff6 In Walker_Category, don't generate list elements for empty cat names.
This change allows the 'list_cats' filter to be used to suppress certain
items in category lists, without creating invalid or superfluous markup.

Props samo9789.
Fixes #16792.

git-svn-id: https://develop.svn.wordpress.org/trunk@31025 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-03 02:04:17 +00:00
Boone Gorges
4cead42b26 Introduce 'name' parameter for get_terms().
This enhancement requires a modification in the way that `wp_dropdown_categories()`
prepares its arguments for `get_terms()`, so that its unrelated 'name' param is
not mistaken for the new 'name' argument in `get_terms()`.

Props danielbachhuber.
Fixes #30611.

git-svn-id: https://develop.svn.wordpress.org/trunk@31024 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-02 21:33:33 +00:00
Andrew Ozz
95fd7b1590 Move the (recently added) .notice admin notices below the first H2, same as the .updated and .error notices. Props sippis, fixes #30885.
git-svn-id: https://develop.svn.wordpress.org/trunk@31023 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-02 18:51:52 +00:00
Andrew Ozz
bc108a94ce Fix the background color in the auth. check modal. Props melchoyce, fixes #30278.
git-svn-id: https://develop.svn.wordpress.org/trunk@31022 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-02 17:20:06 +00:00
Boone Gorges
60a216d587 Add tests for wp_delete_object_term_relationships().
See #30879.

git-svn-id: https://develop.svn.wordpress.org/trunk@31021 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-02 14:02:54 +00:00
Scott Taylor
f014d0cf35 If you set '_wp_page_template' for a post, and then switch to a theme that doesn't support the template, subsequent calls to wp_insert_post() will bail early without running a plethora of hooks. This shouldn't happen. We should set the template to 'default' and continue through the rest of the function. The function will still bail if $wp_error is true via wp_insert_post( $arr, true ).
Props nofearinc.
Fixes #25334.


git-svn-id: https://develop.svn.wordpress.org/trunk@31020 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-01 20:34:19 +00:00
Scott Taylor
64784baa95 WP_List_Table's constructor registers an 'admin_footer' callback when AJAX is enabled. As such, if you create multiple instances of the class, you get multiple JS blobs on the page when the callbacks fire. Extra instances get made when wp_comment_reply() invokes the class constructor without checking for the existing instance via the $wp_list_table global.
We shall check the `$wp_list_table` global in `wp_comment_reply()`.

Props sorich87.
Fixes #17413.


git-svn-id: https://develop.svn.wordpress.org/trunk@31019 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-01 19:54:53 +00:00
Scott Taylor
186a94fb78 More-specific docs for wp_embed_handler_youtube().
Fixes #30711.


git-svn-id: https://develop.svn.wordpress.org/trunk@31018 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-01 19:20:44 +00:00
Sergey Biryukov
944ed3f980 Update license copyright year to 2015.
props valendesigns.
fixes #30877.

git-svn-id: https://develop.svn.wordpress.org/trunk@31017 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-01 12:24:05 +00:00
Scott Taylor
be8211beac Support chromeless Vimeo via MEjs:
* Bump MediaElement script loader versions to 2.16.2 - missed in [30634], oops!
* Add `Froogaloop` to `js/mediaelement` scripts for Vimeo
* Check for Vimeo in the same locations that YouTube is checked
* Dynamically load Froogaloop script in admin when editing a TinyMCE view
* Edit MediaElement to call `mejs.$.extend` instead of `$.extend` in `mejs.HtmlMediaElementShim.createPlugin()`, since `$` is not available via WP's jQuery (I will report this upstream):
6f9a78e008/src/js/me-shim.js (L631)

Fixes #29267.


git-svn-id: https://develop.svn.wordpress.org/trunk@31016 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 20:40:05 +00:00
Boone Gorges
bd03b2ead8 Support array values for post-related parameters in WP_Comment_Query.
Props nprasath002, c3mdigital, ianmjones.
Fixes #20006.

git-svn-id: https://develop.svn.wordpress.org/trunk@31015 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 19:37:09 +00:00
Boone Gorges
f71821dc05 In remove_all_filters(), only remove callbacks that match the $priority parameter.
Props GeertDD, valendesigns.
Fixes #20920.

git-svn-id: https://develop.svn.wordpress.org/trunk@31014 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 19:06:29 +00:00
Scott Taylor
4d69dbadee Fix docs for WP_User::allcaps:
The `allcaps` property of the `WP_User` class represents all of the caps of the user, not the caps of the user's role. Introduced in [26126].

Props dlh.
Fixes #30852.


git-svn-id: https://develop.svn.wordpress.org/trunk@31013 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 18:14:07 +00:00
Scott Taylor
32e0a1c7b8 Update/fix inline docs for update_object_term_cache().
Props DrewAPicture.
Fixes #30731.


git-svn-id: https://develop.svn.wordpress.org/trunk@31012 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 18:11:22 +00:00
Scott Taylor
b7d63c3192 Correct a typo in wp-includes/post-thumbnail-template.php.
Props ixkaito.
Fixes #30867.


git-svn-id: https://develop.svn.wordpress.org/trunk@31011 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 18:08:56 +00:00
Aaron Jorbin
43edd17097 Set the type attribute of the buttons for logging out of all sessions to buttons
By not setting this attribute, the buttons default to submit and as the first
submit button on the page, it causes pressing the enter key to log you out of
all sessions. This change restores the pre 4.1 behavior where pressing enter
while focused on a form field submits the form.

props ocean90
fixes #30871 for trunk



git-svn-id: https://develop.svn.wordpress.org/trunk@31010 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 17:32:39 +00:00
Boone Gorges
be2ea9b9f9 Back up and restore dropins during get_dropins() tests.
This change ensures that the `get_dropins()` tests don't detect any actual
dropins that you might be running on your develop.wordpress installation.

Props valendesigns.
Fixes #30860.

git-svn-id: https://develop.svn.wordpress.org/trunk@31009 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 15:00:32 +00:00
Andrew Nacin
25e332e473 Use correct function name in docs for get_plugin_data().
props eliorivero.
fixes #30699.


git-svn-id: https://develop.svn.wordpress.org/trunk@31008 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 08:07:09 +00:00
Dion Hulse
c34913eae6 Add a revision number to $wp_version for nightly update purposes. See [30411]
git-svn-id: https://develop.svn.wordpress.org/trunk@31007 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-31 05:34:07 +00:00
Boone Gorges
ae6575685c In wp_dropdown_categories(), allow the term field used to populate option valuesto be specified.
The new 'value_field' parameter makes it possible to set term slugs (or some
other term property) as the 'value' attribute of the option elements generated
by `wp_dropdown_categories()`. This additional flexibility reduces the effort
required to translate term_id to other term fields when processing form
submissions that include values from taxonomy dropdowns. See #30865 for a
use case.

Props collinsinternet.
Fixes #30306.

git-svn-id: https://develop.svn.wordpress.org/trunk@31006 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-30 21:30:16 +00:00
Boone Gorges
06b820a989 Use proper hash notation for wp_dropdown_categories() docblock.
See #30306.

git-svn-id: https://develop.svn.wordpress.org/trunk@31005 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-30 20:48:34 +00:00