Scott Taylor
dad0455ef9
Avoid a notice in get_the_category_by_ID()
when is_wp_error( $term )
is false but $term->name
is not set. Clarify the @return
value of get_category()
and get_tag()
which return the same possible types as get_term()
, which they wrap.
...
Props ericmann, SergeyBiryukov.
Fixes #25429 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27521 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-13 04:03:06 +00:00
Scott Taylor
dc73f008ce
Add a class property to wp.media.view.MediaDetails
called instances
that is incremented every time the class is invoked. This mimics what happens in the shortcodes: the sources receive an incremented cache-buster so that the browser won't ignore the file when preload="metadata"
is set.
...
See #26779 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27520 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-13 03:54:38 +00:00
Scott Taylor
d018152785
Account for preload="metadata"
in audio and video shortcodes when multiple versions of the same <source>
appear on the page by appending a query arg to "cache-bust" passed sources. The query arg is used to make the sources "unique." They will still be cached by the browser and won't bust the cache on every request.
...
Fixes #26779 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27519 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-13 03:41:53 +00:00
Scott Taylor
abf794f75c
In wp.media.view.AttachmentFilters
, when creating its inner HTML content, pass filter.text
via .html( str )
instead of .text( str )
to allow more formatting options.
...
Props tlovett1.
Fixes #25010 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27518 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-13 03:18:42 +00:00
Helen Hou-Sandi
14615cd317
Ensure the correct model is selected when editing an image from gallery mode. props gcorne. fixes #27363 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27517 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 22:04:56 +00:00
Helen Hou-Sandi
5f936ab3dd
Smooth out some display and race condition issues with the media modal loading spinner. props kadamwhite, gcorne. see #24859 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27516 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 21:06:30 +00:00
Andrew Nacin
395b466fb7
Revert [27203], restore JIT color scheme stylesheets. Restores [27111].
...
fixes #27175 . see #20729 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27515 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 16:11:38 +00:00
Sergey Biryukov
96b39f3363
Avoid a notice in trackback_rdf() if user agent is not set.
...
props joostdevalk.
fixes #27374 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27514 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 12:53:49 +00:00
Andrew Ozz
8fc52817b9
TinyMCE modals: re-enable the Close button in charmap, fix arrows in listboxes, add and position dashicons to the menu (when visible), see #26952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27513 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 08:18:56 +00:00
Scott Taylor
61bc04deff
Change string "Create Playlist" to "Create Audio Playlist." Open new tickets for individual issues.
...
Fixes #26631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27512 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 04:39:28 +00:00
Scott Taylor
36df368171
In WP_Query::get_queried_object()
, account for pre_get_posts
by checking for tag
when tag_id
isn't present. Tags still need to be rolled up into tax_query
. Add a unit test confirming expected query vars during and after pre_get_posts
.
...
Props mattonomics for a patch.
See #27362 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27511 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 04:07:41 +00:00
Andrew Ozz
0336d4c265
wpLink: bring back the Cancel link, improve responsive styles, see #26952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27510 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 03:06:11 +00:00
Andrew Nacin
3a126c0452
Use correct variable in themes JS, fixes themes.php.
...
props SergeyBiryukov.
fixes #27360 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27509 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-12 00:28:26 +00:00
John Blackbourn
f3629139a5
Correct the "View Post" button link when changing a post slug. Fixes #16477 . Props aubreypwd.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27508 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 22:59:03 +00:00
John Blackbourn
f45c06c09c
Avoid searching HTML tags when searching plugins and themes. Fixes #27136 . Props enej.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27507 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 22:23:51 +00:00
John Blackbourn
961899214e
Present a normal admin page when bailing out of the Plugin Editor screen. Fixes #27067 . Props SergeyBiryukov.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27506 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 22:13:05 +00:00
John Blackbourn
b7fbb777e9
Add missing hyperlink styles to the login screen. Fixes #27245 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27505 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 20:50:55 +00:00
Sergey Biryukov
11f58c181f
Avoid unintentional overriding of .spinner styles for HiDPI displays.
...
props mauryaratan for initial patch.
fixes #27269 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27504 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 19:41:22 +00:00
Sergey Biryukov
28dd458547
Avoid a warning in wpdb::db_connect(). before_needle parameter of strstr() was added in PHP 5.3.
...
props klihelp, pento.
fixes #27277 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27503 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 19:26:02 +00:00
Sergey Biryukov
1a769c0e11
Remove duplicate description of WP_List_Table class.
...
props bravokeyl.
fixes #27346 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27502 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 16:22:44 +00:00
Andrew Nacin
6aa60cf530
Assign correct variable.
...
props nendeb55.
fixes #27351 . see #14424 , [27373].
git-svn-id: https://develop.svn.wordpress.org/trunk@27501 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 13:23:14 +00:00
Andrew Nacin
1f5eec43cd
A nice round commit number for a beta 1.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27500 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 07:53:15 +00:00
Andrew Nacin
96176b269d
Bring the theme browsing experience from 3.8 to the theme installer. First pass.
...
props matveb with assists from me and gcorne.
see #27055 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27499 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 07:46:27 +00:00
Andrew Nacin
a9b6b9339f
JS linting for [27497].
...
see #21785 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27498 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 04:19:25 +00:00
Andrew Nacin
6f2544944f
Add header image uploads with cropping to the customizer.
...
props mcsf, ehg, gcorne.
see #21785 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27497 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 04:12:17 +00:00
Andrew Ozz
a186292eba
wpLink: better structural and responsive styles, see #26952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27496 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 03:35:52 +00:00
Andrew Ozz
a927982d0c
wpLink: set max-height to 500px (like before) and vertically center the modal (except in IE8), see #26952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27495 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 02:35:04 +00:00
Andrew Ozz
7812a3fa77
wpLink: stop using UI dialog, restyle the modal, add better responsive behaviour.
...
Fix UI dialog styling to match the rest of the admin styling.
Props avryl, see #26952
git-svn-id: https://develop.svn.wordpress.org/trunk@27494 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-11 00:03:54 +00:00
Andrew Nacin
020ba8e15a
Revert [27492]. see #27112 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27493 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-10 23:29:49 +00:00
Andrew Nacin
f36e40de2c
Add widget customizer tests missing from [27419]. see #27112 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27492 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-10 23:04:53 +00:00
Drew Jaynes (DrewAPicture)
6308a3c93d
Fix docs for the deactivate_$plugin
and deactivated_plugin
hooks.
...
Props wpsmith for the original patch.
Fixes #27189
git-svn-id: https://develop.svn.wordpress.org/trunk@27491 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-10 21:33:54 +00:00
Scott Taylor
b005551879
A string was missing its translation wrapper in the Underscore template for video details.
...
Props Jayjdk.
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27490 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-10 00:18:12 +00:00
Scott Taylor
7770275918
Add a class, wp-playlist-playing
, to the currently loaded track when tracks are displayed. Add some subtle styles for light and dark playlist themes.
...
See #27321 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27489 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-10 00:14:42 +00:00
Scott Taylor
c2cd0d6215
Add a filter and document it: playlist_styles
. Allows users to roll their own playlist themes.
...
Props DrewAPicture for the docs.
See #26631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27488 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 23:36:57 +00:00
Scott Taylor
975cf5574a
Update the UI styles for Playlist Settings.
...
Props melchoyce for the design.
See #26631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27487 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 23:18:06 +00:00
Scott Taylor
c87fc83bf8
Playlists:
...
* Add an action, `wp_playlist_scripts`, where a user can turn off all default script and style loading for playlists and roll their own.
* Move the script and style loading for playlists to a function, `wp_playlist_scripts( $type )`, that hooks into `wp_playlist_scripts`.
* Make the `<noscript>` playlist output an `<ol>`, instead of a list of links with no surrounding markup.
See #26631 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27486 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 22:44:22 +00:00
Andrew Ozz
bfbb7ee78a
Adjust the height of the header and footer in the Find Posts modal on the Media Library screen, see #26952
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27485 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 22:19:36 +00:00
Andrew Nacin
517de7ea31
Allow for custom authentication handlers for all requests.
...
Turn the logic used by wp_get_current_user() into a determine_current_user filter.
props rmccue.
fixes #26706 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27484 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 15:22:13 +00:00
Andrew Nacin
e4bb7b0e8c
Editor: Show 'View Post' for any post the author can read.
...
This expands it to private posts and matches the logic in the toolbar.
props mordauk, SergeyBiryukov.
fixes #27059 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27483 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 13:52:08 +00:00
Dominik Schilling (ocean90)
292f70aba3
Admin Menu: Set default value of $icon_url
in add_menu_page()
to dashicons-admin-generic
, fixes #26630 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27482 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 11:12:35 +00:00
Scott Taylor
d39e5ecafd
Video editing in the media modal:
...
* Add a state: `Add Subititles`
* Add `text/vtt` to the list of allowed mime-types, files end in `.vtt`. `.srt` files are served as `text/plain`.
* The content body of a video shortcode should be used for adding `<track>` elements only. This happens dynamically in the modal. If added by hand, they can still be parsed and managed.
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27481 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 10:31:36 +00:00
Scott Taylor
29e2d9f66a
Since audio and video shortcodes don't point at actual attachments, don't persist the library's selection. Move the media instructions in the block that scrolls.
...
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27480 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 06:23:18 +00:00
Scott Taylor
7361703264
Add wp.media.view.MediaFrame.MediaDetails
, which wp.media.view.MediaFrame.AudioDetails
and media.view.MediaFrame.VideoDetails
extend. The subclasses subsequently only need to set createStates()
and bindHandlers()
, as well as any missing toolbar views.
...
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27479 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 06:04:29 +00:00
Scott Taylor
3c8d2a99f2
Audio/Video shortcodes in the media modal:
...
* Make a generic model, `wp.media.model.PostMedia`, which replaces `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Make a generic library, `wp.media.controller.MediaLibrary`, which replaces `wp.media.controller.ReplaceVideo` and `wp.media.controller.ReplaceAudio`
* `wp.media.controller.MediaLibrary` is used to create new states that want to load a library filtered by type, making it incredibly simple to add states to frames. See `wp.media.view.MediaFrame.VideoDetails` and `wp.media.view.MediaFrame.AudioDetails`.
UX changes:
* Add the ability to manage HTML5 fallbacks - add additional `<source>`s or remove specific `<source>`s
* In the Video Details state, add the ability to select a poster image
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27478 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 05:24:10 +00:00
Scott Taylor
8064f5dbc4
In wp.media.model.PostAudio
and wp.media.model.PostVideo
, use Underscore's unset
method when clearing out properties when the attachment changes.
...
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27477 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 01:05:48 +00:00
Scott Taylor
67512aa18a
Audio/Video shortcodes in the media modal:
...
* Add `embedMimes` to `_wpMediaViewsL10n`
* Use `escape` instead of `interpolate` when setting attributes in Underscore templates
* When creating the `<audio>` and `<video>` tags dynamically, set inner `<source>` nodes instead of the `src` attribute and properly set the mime-type per source as the `type` attribute. This is also drastically reduces the amount of code used to generate the tags.
See #27016 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27476 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-09 01:00:53 +00:00
Andrew Nacin
f6d9b60cd0
Add context to an internal HTTP API hook.
...
props kovshenin.
fixes #27021 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27475 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 21:53:51 +00:00
Andrew Nacin
036cb74d46
Add unit tests for searching by relevance.
...
props wonderboymusic.
see #7394 , #20044 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27474 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 21:26:26 +00:00
Drew Jaynes
5fde82be76
Better standardize parameter value types in PHPDocs where both a post ID or WP_Post
would be acceptable.
...
Covers cases where previously only `int` or `int|object` types were notated.
Props coffee2code for the original patch.
See #20495 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27473 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 19:31:51 +00:00
Andrew Nacin
f225973b62
Allow $crop in add_image_size() to receive crop anchors (top, left, right, bottom, center).
...
This also applies to set_post_thumbnail_size() and image_resize_dimensions().
props bradt, wonderboymusic, DH-Shredder.
fixes #19393 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27472 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-08 06:13:27 +00:00