21 open tickets. Last 7 days: +0 tickets
|21 open tickets||defect (bug)||enhancement||feature request|
WordPress 3.6 introduced HTML5 versions of popular template tags, starting out with comments, the comment form, and the search form. With the 3.9 release we add galleries and captions to that list. Now, when adding HTML5 support for those features, WordPress will use
<figcaption> elements, instead of the generic definition list markup.
To declare that your theme supports these new HTML5 features, add the following call to your theme’s
functions.php file, preferably in a callback to the
add_theme_support( 'html5', array( 'gallery', 'caption' ) );
For forward compatibility reasons, the second argument with the specific parts can’t be omitted when registering support. Otherwise a theme would automatically declare its support for HTML5 features that might be added in the future, possibly breaking its visually because of it.
For both galleries and captions not only the markup changes when a theme declares its support for them, there are also peripheral changes that come with it.
By default, galleries will not include inline styles anymore when in HTML5 mode. This caters to the trend of disabling default gallery styles through the
use_default_gallery_style filter, a filter that even the last two default themes used. With that, theme developers can always start with a clean slate when creating their own set of gallery styles.
We also took the opportunity to remove the line breaks between rows of images. Not only did they encourage an inferior way of positioning elements, more importantly they were non-semantic html elements that are meant for presentational use, and they made it harder to style galleries.
Up until now, captions received an additional 10 pixels of width, to keep text flowing around the caption, from bumping into the image. As @nacin put it, this has vexxed theme developers for years, and even resulted in the addition of a filter in WordPress 3.7 to manipulate the caption width.
We were not able to completely remove the inline style in HTML5 mode, it’s still necessary to force captions to wrap, but we’re no longer the adding 10px of width. We also removed caption styles in the editor, bringing it on par with how non-captioned images are displayed:[gallery ids="10229,10230,10233"]
Twenty Thirteen and Twenty Fourteen have been updated to support both features, while retaining backwards compatibility with older WordPress versions. There is a remote possibility however, that child themes that use element selectors to overwrite gallery or caption styles can lose those customizations. Please test your child themes with the current development versions of the last two default themes.
If there are any questions about the current implementation, feel free to leave a comment below.
Plupload is the library that powers most of the file upload interfaces in WordPress, and in 3.9 we’ve updated the bundled library to version 2.1.1 (#25663). Here are some of things that have changed, which may affect WordPress plugins and themes.
If you’re using direct references to Plupload’s runtime .js files, such as plupload.html5.js, note that these files are now gone. The following script handles were removed:
plupload-html4. If you need to enqueue the Plupload library, just use the
If you’re constructing your own Plupload settings array vs. using
wp_plupload_default_settings() and/or the
_wpPluploadSettings object, note that some of the arguments have changed, most notably:
flash_swf_urlshould point to the new Moxie.swf file
silverlight_xap_urlshould use the new Moxie.xap
multiple_queuesargument is no longer used
max_file_sizekey has been moved to the
filtersarray now supports multiple keys, and the list of file types array has been moved to its
To illustrate that with code:
$settings = array( // ... 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), // Unchanged 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), // Unchanged 'filters' => array( 'max_file_size' => $max_upload_size . 'b', ), );
Plupload version 2.1.1 has also added some exciting new options and methods, which you can find in the updated documentation.
As a result of this update in WordPress 3.9 we were able to add drag and drop upload support directly to our TinyMCE editor (#19845), and we’ve also added a new boolean flag to
wp_editor(), which you can use to enable drag and drop upload support in your own instance of the editor (#27465):
wp_editor( '', 'my-editor', array( // ... 'drag_drop_upload' => true, ) );
If you run into any problems with this update in 3.9, please leave a comment on this post and we’ll be happy to help you out!
Update: I opened #27763 to address some of the compatibility issues around the update. We might be renaming the swf/xap files for backwards compatibility.
Update, April 13: The original swf/xap filenames were restored.
Howdy everyone! This is Last Week in WordPress Core for the week of March 31-April 7. I’m including all of the commits up to RC1 this week, which was released yesterday. Things are looking good, with very few remaining tickets open.
3.8.2 and 3.7.2 were also released with security fixes, and automatic updates are rolling out.
Developers, please test with your plugins and themes and let us know if you find issues.
TinyMCE: As a quick note, since I’ve seen this brought up in the forums — in this release, TinyMCE no longer uses
IE8 & wpview: Due to IE7/8 compat being necessary in TinyMCE (to resolve caret issues), IE8 and
wpview are not currently the best of friends. Post RC1, fixes landed for #27546 that make
wpviews degrade more gracefully.
preload='none'for the empty
<audio|video>tag.  #26779
theme_supports_thumbnails()for now.  #27673
<br>elements for HTML5 galleries; see #26697.  #27637
widget-addedwhen a widget is added to a sidebar and
widget-syncedfor widget soft/hard updates.   #19675; #27491
is_preview()method to allow widgets to check to see if they’re currently being previewed via the customizer.  #27538
print_preview_css.  #27534
postMessageto highlight widgets in preview or sections/controls in Customizer.   #27622
wp.customize.Widgets, and make available widgets panel a Backbone view.      #27690
wp_editor()to enable.  #27465
/langs/[locale]_dlg.jsfrom PHP to prevent errors with missing translation files when
requireLangPack()is used without its second argument. Back to using ISO 639-1 (two letter) locales. #24067;  #27610
wpdialogsis not enqueued. Add
wp_enqueue_editoraction fired when scripts and styles for the editor are being enqueued.  #16284
wpdb::check_connection()to match the connect method.  #27240
mysqli_fetch_field().  #27693
WP_USE_EXT_MYSQL.  #21663
.dashicons-post-trashas an alias for
.dashicons-trash, which is the new one.
plugins_url()should not be used in this context anyway.  #16953
links_recently_updated_*DB options that never had a UI.  #27649
wpmu_current_site().  #27702
Many thanks to @adamsilverstein, @andykeith, @avryl, @azaozz, @bramd, @chiragswadia, @davidmarichal, @dd32, @dpe415, @duck_, @DrewAPicture, @DrProtocols, @ehg, @eightface, @empireoflight, @gcorne, @helen, @jackreichert, @jdgrimes, @jeremyfelt, @jesin, @joedolson, @johnbillion, @jorbin, @jond3r, @kovshenin, @kpdesign, @leewillis77, @markjaquith, @matveb, @mcsf, @melchoyce, @michael-arestad, @nacin, @Nessworthy, @norcross, @obenland, @ocean90, @pento, @plocha, @rachelbaker, @rmccue, @sdasse, @SergeyBiryukov, @siobhan, @sonjanyc, @tellyworth, Tom Adams, @vancoder, @westonruter, and @wonderboymusic for their help this week!
For the complete list of commits to trunk, check out the log on Trac. Since we’re getting very close to release, the best way to help is to test! Let us know if you run into problems in the Alpha/Beta forums or on trac.
Hi there! Welcome to Last Week in WordPress Core for the week of March 3–9. By now, you’ve heard that WordPress 3.9 Beta 1 is available! Thank you for your hard work this last week. Now we’re done adding new enhancements, and on to bugs. Your help is appreciated as we continue to test and squash bugs on the way to a stable RC.
There are a couple important things that landed on Monday that are not covered in this post, but shipped in beta. Namely, please test the Theme Install screen refresh and the ability to crop headers from within the Customizer.
.dashicons-beforeCSS class and use it in the admin menu. Lets you use a Dashicon before an element without copying the entire
.dashiconsstyling to your
:beforestyling.     #26630
set_post_thumbnail_size()to receive crop anchors (
center).  #19393.
wp_playlist_scriptsfilters to allow users to roll their own playlist themes.  #26631 &  #26631
srcmedia file in an audio or video shortcode. Also, a flurry of improvements and fixes to them, visible in the full changelog.  #27016
<hr>plugin and button to the toolbar.  #27159
has-post-thumbnailas a post class.  #18804
theme_page_templates, and pass it a post object for proper context.   #13265
get_the_permalink()as an alias for
get_permalink(). This better aligns it with other
get_the_*function pairs.  #24164
get_the_date()accept a post object.  #13771
wp_tag_cloud().  #27262, see #7989, #14424
post_passwordquery variables to
truemeans posts with passwords,
falsemeans posts without.
post_passwordcan query for posts with a particular password.  #20308
posts_per_rssquery variable to be set to override the
posts_per_rssoption.   #25380
get_page_by_title()to accept an array of post types.  #24763
determine_current_user filter.  #26706
ksesfor all elements.  #24098
update_option().   #14721.
create_function()calls and making
OBJECTa case sensitive constant.    #14424  #27231
deleted_useractions.   #23057
Thanks to @adamsilverstein, @akeda, @avryl, @bassgang, @bigdawggi, @bobbravo2, @bpetty, @bradt, @celloexpressions, @coffee2code, @danielbachhuber, @dd32, @DJPaul, @DrewAPicture, @empireoflight, @ericlewis, @ericmann, @frank-klein, @gcorne, @genkisan, @gradyetc, @hakre, @Hanni, @Jayjdk, @jenmylo, @johnregan3, @jorbin, @JoshuaAbenazer, @kadamwhite, @kasparsd, @Kopepasah, @kovshenin, @kpdesign, @lpointet, @markjaquith, @mcadwell, @melchoyce, @michael-arestad, @mikecorkum, @mordauk, @nacin, @obenland, @Otto42, @pavelevap, @Rarst, @rhyswynne, @ricardocorreia, @rmccue, @robmiller, @seanchayes, @SergeyBiryukov, @shaunandrews, @simonwheatley, @sirzooro, @tanner-m, @TobiasBg, @tomauger, @topher1kenobe, @topquarky, @toszcze, @westonruter, @wokamoto, @wonderboymusic, @zbtirrell, and @zodiac1978 for their efforts this week!
The latest major updates to Audio/Video before Beta were related to editing shortcodes in the medial modal. TinyMCE placeholders for audio and video have been added like so:
When you click the placeholder, the media modal will now be launched. And when you get there, there are some new ways to manage HTML5 playback without writing anything by hand.
MediaElement.js provides cross-browser support for many extensions by providing Flash and Silverlight files that will bridge the browser support gap when necessary. Ideally, as many browsers as possible would be using native HTML5 playback. To ensure this, you need to specify multiple versions of your files. Since 3.6, the audio and video shortcodes have supported this by allowing you specify multiple extensions as attributes:
mp3="yolo.mp3" ogg="yolo.ogg" wma="yolo.wma", etc.
A quick and easy way to encode your files is to use FireFogg (works in Firefox only). Here are some instructions for audio and video files:
There is now a workflow to make adding these extra sources to shortcodes easy:
Multiple sources are specified now. Make sure to click blue “Update” button to save your shortcode back to the editor.
Here is a video workflow, assuming your shortcode has no attributes and you click it:
Add each video source:
Optionally add a poster image:
If you’re feeling CRAZY, add some Subtitles! Here’s a post about them. They’re pretty cool. Probably make sure your web server is serving
.vtt files as
Add your subtitles using our easy workflow:
When you’ve added them, MediaElement knows to support them out of the box:
Boom. Subtitles while your video plays:
When you add your subtitles, if will show you a list of “track” elements you have added, you will still need to set your language manually – all will default to English. The idea is that you can add a track element per language. Tracks get stored as the body of your video shortcode.
Now comes the time for testing and refining, while fixing esoteric bugs. PLEASE HELP! Put your UI + UX hats on, if you wear that kind of hat.
Howdy! This is Last Week in WordPress Core for the week of February 24—March 2! Lots of activity for the past week, which is great as we head into our last few days of alpha. Please join us for daily triage at 1900 UTC to help work through the remaining enhancements scheduled for 3.9.
As a quick note, if you work with our tools in ‘develop’, and are receiving a
SELF_SIGNED_CERT_IN_CHAIN error, you can resolve it by running
npm config set ca="". For details, check out this npm blog post.
If you want to skim, each section is roughly ordered by an important and/or interesting factor.
add_theme_support( 'html5', 'gallery' ),
figcaptionwill be used instead of definition list markup.  #26697
comment-reply.jsto the footer. While it can function before the page is loaded, it works by moving the comment form, which is usually toward the bottom of the page. Please report any contraindications on the ticket.  #12641
get_adjacent_post()wrap a new
WP_Adjacent_Postobject that uses
WP_Query.   #26937
wp_list_authors().  #9902
get_site_by_path()and further rewrite the site detection process for multisite. This makes it so that a sunrise plugin could do much of its work by adding filters, if those are even needed.  #27003
doing_action()to identify hooks in progress. You can also use this with to identify a hook that has completed. For more, see  #14994.
trailingslashit()will now remove any forward or backslashes from the end of a string before appending a forward slash.  #22267
current_time()to accept a date format string, adding to
mysql.  #21653
microtime()returns greater precision than
microtime(true).  #27000, #23448, #26903, #14485
WP_Query::get(). Helpful when working with endpoints.  #16471
user_idto be an array of IDs in
WP_Comment_Query.  #27064
get_dashboard_url()optional, defaulting to the current user.   #16686
masonry. The old
jquery-masonryhandle is the official shiv that sits on top of the v3 library to be backwards compatible with v2 usage. While v3 no longer depends on jQuery, a theme or plugin may have been implicitly loading jQuery though Masonry, rather than additionally declaring it as a dependency for themselves.
masonryand declare jQuery as a dependency on their own if they need it.
WP_HTTPfrom the latest Mozilla release NSS.  #27017
grunt-patch-wordpressfor applying patches directly from Trac. Mapped to
grunt patch, which declares usage. Requires
npm installto install.  #27023
Thanks to @adamsilverstein, @andy, @avryl, @bassgang, @bootsz, @chrisscott, @danielbachhuber, @DrewAPicture, @enej, @ericlewis, @ericmann, @ethitter, @evarlese, @garyc40, @GaryJ, @gcorne, @georgestephanis, @GregLone, @helen, @iamfriendly, @Ipstenu, @jackreichert, @jeremyfelt, @johnjamesjacoby, @jorbin, @knutsp, @kovshenin, @kpdesign, @leewillis77, @markjaquith, @mattheu, @mboynes, @mitchoyoshitaka, @mjbanks, @mordauk, @morganestes, @nacin, @nicolealleyinteractivecom, @obenland, @ocean90, @patricknami, @pento, @pross, @rickalee, @salcode, @scribu, @SergeyBiryukov, @shelob9, @siobhyb, @solarissmoke, @xsonic, @stephcook22, @theorboman, @tivnet, @TobiasBg, @willmot, @wonderboymusic, @xknown, and @yoavf for their help this week!
Here’s a quick summary of yesterday’s meeting (IRC log), as a status report on WordPress 3.9:
Beta 1 will now be the week of March 3, a week later. The rest of the schedule is unchanged. I felt the extra week of alpha would be helpful given all of forward momentum right now, and others seemed to agree.
It was decided to green-light the widget customizer plugin for merge. If all goes well, it’ll be in 3.9 final. There’s still a lot to do: some UI polishing, deeper code review, etc. — and surely it will get a lot of testing.
Quick hits raised in the meeting:
We have a few more weeks of alpha, so it’s a great time to help with writing or testing a patch for WordPress 3.9. We’ll be keeping the tempo quick. Expect lots of changes.
Welcome back to Last Week In WordPress Core, for the week of January 27-February 2. Big list this time! First, a summary of the major changes; then a roundup from the various 3.9 teams:
Enhancements and hooks
resetpass_form, in wp-login.php #21044
wp_upgradehooks to the respective functions. #25762
TRADITIONAL. Introduces filterable
incompatible_sql_modesfilter for plugins. #26847
wpdb::db_connect(), allow the loading of a translatable custom database error template. #25703
Miscellaneous, including library updates
$forceargument removed from
WP_Object_Cache::delete(), which was internal-only. #22478
npm installto receive updates for
node_modulesin the project root. #26073
Here are roughly where each of the 3.9 teams/tasks stood as of last week’s meeting:
Other UI work:
Fun with internals:
Housekeeping items last week included a call for GSoC participation from @jenmylo, and trac component reorganization proposal from @nacin. The reorganization was approved during the chat on Wednesday and is well under way. Additionally, there’s now a new Trac reports overlay and Trac’s navigation got overhauled.
For the complete changelog commits to trunk, check out the log on Trac.
More than three dozen contributors had a hand in last week’s efforts. Want to help out this week? Write or test a patch for 3.9.
Thanks for contributions this week from atimmer, aubreypwd, azaozz, c3mdigital, cmmarslender, coffee2code, Denis-de-Bernardy, DrewAPicture, empireoflight, gcorne, helen, ippetkov, jeremyfelt, joehoyle, johnjamesjacoby, JoshuaAbenazer, kovshenin, kpdesign, kraftbj, mark8barnes, markjaquith, MattyRob, mdbitz, melchoyce, nacin, neoxx, nofearinc, ocean90, olivM, oso96_2000, ounziw, pento, romaimperator, sbruner, SergeyBiryukov, soulseekah, TobiasBg, toszcze, wonderboymusic, and yoavf!
WordPress uses open source software called Trac to manage bug reports and tasks. If you are looking to report a bug, please head on over.
There are many ways to contribute. We have a detailed contributor handbook to help get you started. If you want to get started quickly, try one of the Getting Started reports blow — test a patch, or grab a bug and see if you can reproduce the problem it describes.
If you have encountered a security issue in WordPress, please contact security at wordpress.org. For more, see our Security FAQ.