Commit Graph

24999 Commits

Author SHA1 Message Date
Scott Taylor
2b06a387fe Register wp.media.controller.GalleryEdit and wp.media.controller.GalleryAdd using the new wp.media.controller.Collection* abstraction code.
See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27215 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 18:33:39 +00:00
Scott Taylor
fc5a96502f In media-views.js, add wp.media.controller.CollectionAdd and wp.media.controller.CollectionEdit to provide an abstraction for Add and Edit screens in the media modal for collection-type things.
There are currently no instances of this. Those will be forthcoming.

See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27214 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 18:25:01 +00:00
Scott Taylor
6fed18847c Replace the current wp.media.gallery instance in media-editor.js with one that leverages wp.media.collection.
See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27213 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 18:12:05 +00:00
Scott Taylor
863c141ba8 Add an abstraction of the gallery code in media-editor.js called wp.media.collection. This will be the basis for parsing [gallery]-like shortcodes in the media editor (thing playlists, collections of PDFs, etc).
There are currently no instances of this. Those will be forthcoming.

See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27212 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 18:06:31 +00:00
Drew Jaynes
b85d8ddbd8 Remove now-unnecessary vanity spacing of various hooks in wp-includes/query.php.
See #25514.


git-svn-id: https://develop.svn.wordpress.org/trunk@27211 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:58:42 +00:00
Drew Jaynes
efd0b5081e Inline documentation hooks in wp-includes/query.php.
Covers documentation for the various remaining query hooks, notably including but not limited to:
* `parse_query`
* `parse_tax_query`
* `pre_get_posts`
* `posts_results`
* `the_posts`
* `found_posts`
* `the_post`

Props dougwollison, DrewAPicture.
See #25514.



git-svn-id: https://develop.svn.wordpress.org/trunk@27210 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:53:33 +00:00
Scott Taylor
ae603ef26d Allow pseudo post types attachment:audio and attachment:video to get the media modal on Edit Media when they support featured images.
Introduces `post_supports_thumbnails( $post )` and `theme_supports_thumbnails( $post )` to cut down on duplicated code everytime this needs to be checked. There will be more cases forthcoming.

See #26631.



git-svn-id: https://develop.svn.wordpress.org/trunk@27209 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:49:30 +00:00
Drew Jaynes
3776fd7d5d Inline documentation for various SQL clause hooks in wp-includes/query.php.
Covers documentation for SQL clause hooks related to comment feeds, including:
* `comment_feed_join`
* `comment_feed_where`
* `comment_feed_groupby`
* `comment_feed_orderby`
* `comment_feed_limits`

Props dougwollison, DrewAPicture.
See #25514.



git-svn-id: https://develop.svn.wordpress.org/trunk@27208 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:45:19 +00:00
Drew Jaynes
5f068b8a11 Inline documentation for various SQL clause hooks in wp-includes/query.php.
Covers documentation for SQL clause hooks specified for use by caching plugins, including:
* `posts_selection`
* `posts_where_request`
* `posts_groupby_request`
* `posts_join_request`
* `posts_orderby_request`
* `posts_distinct_request`
* `posts_fields_request`
* `post_limits_request`
* `posts_clauses_request`

Props dougwollison, DrewAPicture.
See #25514.



git-svn-id: https://develop.svn.wordpress.org/trunk@27207 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:40:14 +00:00
Drew Jaynes
5fbf05a2cb Inline documentation for various SQL clause hooks in wp-includes/query.php.
Covers documentation for general SQL clause hooks, including:
* `posts_where`
* `posts_join`
* `posts_where_paged`
* `posts_groupby`
* `posts_join_paged`
* `posts_orderby`
* `posts_distinct`
* `post_limits`
* `posts_fields`
* `posts_clauses`

Props dougwollison, DrewAPicture.
See #25514.



git-svn-id: https://develop.svn.wordpress.org/trunk@27206 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 17:33:16 +00:00
Sergey Biryukov
76ba2667c1 Update $parent_file value in wp-admin/update-core.php.
props bcworkz.
fixes #27109.

git-svn-id: https://develop.svn.wordpress.org/trunk@27205 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 16:41:50 +00:00
nacin
4397095aa8 Remove accidental change in [27203]. see #20729.
git-svn-id: https://develop.svn.wordpress.org/trunk@27204 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 06:59:02 +00:00
Andrew Nacin
f176ab98fc Simplify how admin color schemes are enqueued.
Removes a piece of [27111].

fixes #20729.


git-svn-id: https://develop.svn.wordpress.org/trunk@27203 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 06:58:10 +00:00
Drew Jaynes
d3aa609740 Inline documentation for hooks in wp-admin/includes/image.php.
Props theorboman, kpdesign.
Fixes #25832.


git-svn-id: https://develop.svn.wordpress.org/trunk@27202 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 06:26:51 +00:00
Drew Jaynes
1b45201476 Fixes for hooks documentation wp-includes/nav-menu-template.php.
See #26869, #25229 and [25410].


git-svn-id: https://develop.svn.wordpress.org/trunk@27201 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 05:07:39 +00:00
Helen Hou-Sandi
bc8302d050 Login styles do not depend on common.css. see #12506.
git-svn-id: https://develop.svn.wordpress.org/trunk@27200 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 03:27:54 +00:00
Helen Hou-Sandi
1c5f1cebff Make login styles standalone. see #12506.
git-svn-id: https://develop.svn.wordpress.org/trunk@27199 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 03:23:49 +00:00
Andrew Nacin
b21202c457 Add .editorconfig file, see http://editorconfig.org/.
"EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs."

props jorbin, netweb.
fixes #26429.


git-svn-id: https://develop.svn.wordpress.org/trunk@27198 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 02:35:38 +00:00
Sergey Biryukov
1cda3b44cf Add @ticket references. see #26903.
git-svn-id: https://develop.svn.wordpress.org/trunk@27197 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 02:20:40 +00:00
John Blackbourn
a0536406a1 Add screen-reader friendly variations of some short text links in the Publish meta box. Fixes #25459.
git-svn-id: https://develop.svn.wordpress.org/trunk@27196 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-19 22:43:55 +00:00
Helen Hou-Sandi
c4848bbac4 Once upon a time not long ago,
The admin CSS was merged in #18314.
After a couple years as it stood,
The mess it had become just was no good.
One day we realized Grunt is pretty cool,
And said "we should use this as our build tool!"
Now we can maintain separate files with ease,
Using @import and cssmin meets all our needs.
Welcome to the future of the WordPress stylesheets,
And thanks to Slick Rick for the beats.

props jorbin for the initial patch.
fixes #26669.


git-svn-id: https://develop.svn.wordpress.org/trunk@27195 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-19 21:42:36 +00:00
Sergey Biryukov
073d970d1f Use correct variable. props avryl. fixes #27153.
git-svn-id: https://develop.svn.wordpress.org/trunk@27194 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-19 15:28:17 +00:00
Andrew Ozz
377c5520ea TinyMCE: revert style for the blocks drop-down in the toolbar, limit the styles imported for the same drop-down, make the menu highlight color grey. Part props avryl, see #26952
git-svn-id: https://develop.svn.wordpress.org/trunk@27193 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-19 03:50:09 +00:00
Sergey Biryukov
47510a2092 Correct @since value. see #26869.
git-svn-id: https://develop.svn.wordpress.org/trunk@27192 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-18 21:44:14 +00:00
Sergey Biryukov
013a4e3381 Correct return values for update_metadata() and related functions.
fixes #21864.

git-svn-id: https://develop.svn.wordpress.org/trunk@27191 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-18 21:35:07 +00:00
Andrew Ozz
0d52823908 TinyMCE: style the modals to match WordPress admin (first-run). Fix couple of IE problems in tiny_mce_popup.js. Props avryl, see #26952, see #24067
git-svn-id: https://develop.svn.wordpress.org/trunk@27190 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-18 06:31:30 +00:00
Scott Taylor
6d00fb3fe8 Remove code from a previous patch. See [27188].
git-svn-id: https://develop.svn.wordpress.org/trunk@27189 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 22:45:52 +00:00
Scott Taylor
1b8da3d0d6 Use selected() where appropriate in touch_time(), page_template_dropdown(), and parent_dropdown(). Also, add proper docs.
Props meloniq, DrewAPicture.
Fixes #25889.



git-svn-id: https://develop.svn.wordpress.org/trunk@27188 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 22:26:14 +00:00
Scott Taylor
c2efafbddb Add some more assertions to Tests_Query_Conditionals, specifically for is_single(), is_page(), and is_attachment().
See [27016].
Fixes #24257.



git-svn-id: https://develop.svn.wordpress.org/trunk@27187 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 22:10:57 +00:00
Scott Taylor
664bf1fea2 Remove extraneous type-casting in wp_get_object_terms().
Props OriginalEXE.
Fixes #27133.



git-svn-id: https://develop.svn.wordpress.org/trunk@27186 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 21:55:41 +00:00
Scott Taylor
7bdca44b97 Make WP_User_Query::prepare_query() public by allowing it to be passed an array of args. Previously, if the WP_User_Query constructor was not passed args, the object was basically unusable. Adds unit tests, all other tests pass.
Props scribu, for the initial patch.
Fixes #21119.



git-svn-id: https://develop.svn.wordpress.org/trunk@27185 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 21:40:04 +00:00
Scott Taylor
db1c44bc42 wp_get_post_revisions() should have a default orderby of date ID to tie-break rapidly added revisions - namely, when unit tests are run. There is a test that occasionally fails when running all tests, and always fails when running phpunit tests/phpunit/tests/post/revisions.php . This fixes that.
Fixes #26042.



git-svn-id: https://develop.svn.wordpress.org/trunk@27184 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 21:22:25 +00:00
Scott Taylor
a31a167359 Reset $wp_query and $post during WP_UnitTestCase::tearDown() to avoid spillage of globals between tests.
See #26321.



git-svn-id: https://develop.svn.wordpress.org/trunk@27183 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 21:03:43 +00:00
Andrew Ozz
4283c76461 TinyMCE: wrap the toolbars buttons on narrow screens, props mikemanger, fixes #26882
git-svn-id: https://develop.svn.wordpress.org/trunk@27182 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-17 02:12:07 +00:00
Andrew Nacin
6351b0b3a4 Rename the old media.css file, used for the pre-3.5 media library. Clean up script-loader CSS registrations.
see #26669.


git-svn-id: https://develop.svn.wordpress.org/trunk@27181 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-16 00:35:12 +00:00
Andrew Ozz
920a9799cf TinyMCE tests: remove 'coverage' for now, has unsatisfied dependencies. Tweak the test runner so it auto-starts. See #27014.
git-svn-id: https://develop.svn.wordpress.org/trunk@27180 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-15 21:25:15 +00:00
Andrew Ozz
5a9624b834 TinyMCE: when clicking on a character in the Charmap modal, don't close it if the Crtl key is pressed. Makes it possible to insert several special chars in a row. See #27107.
git-svn-id: https://develop.svn.wordpress.org/trunk@27179 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-14 19:19:28 +00:00
Andrew Nacin
31d3af406c Multisite: Add get_network_by_path() and wp_get_network() to begin cleanup of multisite load.
Tries to get network detection under control by simplifying wpmu_current_site(). It now also pops off each subdomain to find a more general match. Adds unit tests for get_network_by_path() and a new network factory for unit tests.

Much of this is likely to change in 3.9 as more of ms-load.php and ms-settings.php gets hacked to bits.

props jeremyfelt.
see #27003.


git-svn-id: https://develop.svn.wordpress.org/trunk@27178 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 23:06:12 +00:00
Andrew Ozz
f6af16cd76 TinyMCE: add support for audio and video shortcodes without closing, fix jshint warning, see #27016.
git-svn-id: https://develop.svn.wordpress.org/trunk@27177 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 20:12:46 +00:00
Andrew Nacin
f1e7635a2d Add grunt precommit for running front-end dev and test tasks before commit.
This includes autoprefixer, imagemin, jshint, and qunit.

props jorbin.
fixes #27121. see #25169 and #27078.


git-svn-id: https://develop.svn.wordpress.org/trunk@27176 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 17:56:29 +00:00
Andrew Nacin
562046753d Dev/build tools: Skip new backbone.js and underscore.js files during jshint.
git-svn-id: https://develop.svn.wordpress.org/trunk@27175 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:58:17 +00:00
Andrew Nacin
01b809bf2b Dev/build tools: Use grunt-autoprefixer for CSS vendor prefixes.
We'll be using it for two distinct tasks:
 * Core CSS files will keep prefixes. `grunt autoprefixer:core` will update files directly in src/ as a pre-commit step, rather than doing it on build.
 * Color CSS files will receive prefixes when they are built.

This commit:
 * Adds prefixes we were missing to core CSS.
 * Removes prefixes that we no longer need from core CSS.
 * Removes all prefixes from colors CSS.

props ocean90.
fixes #27078.


git-svn-id: https://develop.svn.wordpress.org/trunk@27174 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:29:16 +00:00
Andrew Nacin
12b13fe7cf Optimize 69 images (of 127) using the new Grunt task. (See [27172].)
fixes #25169.


git-svn-id: https://develop.svn.wordpress.org/trunk@27173 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:02:48 +00:00
Andrew Nacin
877982732a Dev tools: Add grunt imagemin:core task for optimizing images pre-commit.
Adds grunt-contrib-imagemin, so an `npm install` will be required.

props jorbin, wonderboymusic for initial patches.
see #25169.


git-svn-id: https://develop.svn.wordpress.org/trunk@27172 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 08:00:47 +00:00
Andrew Nacin
110978e2d3 Update media-views and wp.Backbone.View for Backbone 1.1.
* Collection set/add/remove/reset methods now return models, not `this`, so they can no longer be chained.
 * Options passed to Backbone.View's constructor are no longer attached automatically. wp.Backbone.View now does this automatically.

See [27170] for Backbone 1.1 itself.

props gcorne.
fixes #26799.


git-svn-id: https://develop.svn.wordpress.org/trunk@27171 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 07:36:01 +00:00
Andrew Nacin
4e36f55df7 Update Backbone from 1.0 to 1.1.
Also update Underscore to 1.6. Includes the development versions of both, which are not included in the build.

Here is Backbone's changelog:
 * Made the return values of Collection’s `set`, `add`, `remove`, and `reset` more useful. Instead of returning `this`, they now return the changed (added, removed or updated) model or list of 
models. (This means they can no longer be chained.)
 * Backbone Views no longer automatically attach options passed to the constructor as `this.options` and Backbone Models no longer attach `url` and `urlRoot` options, but you can do it yourself if you prefer. (But if you extend `wp.Backbone.View`, options will be attached for you.)
 * All `"invalid"` events now pass consistent arguments. First the model in question, then the error object, then options.
 * You are no longer permitted to change the id of your model during `parse`. Use `idAttribute` instead.
 * On the other hand, `parse` is now an excellent place to extract and vivify incoming nested JSON into associated submodels.

See [27171] (next commit) for changes made to WordPress to be compatible with Backbone 1.1.

props gcorne, georgestephanis.
see #26799.


git-svn-id: https://develop.svn.wordpress.org/trunk@27170 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 07:33:29 +00:00
Andrew Ozz
fcea323396 TinyMCE: add image based placeholders for audio and video shortcodes. Props wonderboymusic, see #27016.
git-svn-id: https://develop.svn.wordpress.org/trunk@27169 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-13 05:09:04 +00:00
Andrew Nacin
36fe6c1c27 Don't use HTTPS in unit tests if OpenSSL isn't loaded.
props bpetty.
fixes #27114.


git-svn-id: https://develop.svn.wordpress.org/trunk@27168 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-12 20:39:21 +00:00
Sergey Biryukov
4db1f2cb20 Merge two similar strings. props pavelevap. fixes #27096.
git-svn-id: https://develop.svn.wordpress.org/trunk@27167 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-12 10:14:12 +00:00
Scott Taylor
fd8d6cddcd Don't iterate over $wp_query->posts in update_post_thumbnail_cache() if it is empty. Adds unit tests.
Props SergeyBiryukov, for the original patch.
Fixes #26321.
 


git-svn-id: https://develop.svn.wordpress.org/trunk@27166 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-12 04:48:14 +00:00