WordPress.org

Ready to get started?Download WordPress

Make WordPress Core

Updates from January, 2014 Toggle Comment Threads | Keyboard Shortcuts

  • Andrew Nacin 7:48 pm on July 2, 2014 Permalink | Log in to leave a Comment
    Tags: ,   

    Here’s where we are on the five goals for internationalization outlined previously:

    1. The first step installing WordPress should be to choose a language. The rest of the install process would then be in that language.

    First pass done in #28577. There is a list of things to do in the ticket, which includes:

    • Improved error handling when the API or filesystem isn’t accessible. Working on this.
    • Bring this to setup-config.php. Working on this.
    • Place browser-based language suggestions at the top. Working on this.
    • Use better markup rather than simple select/option HTML, currently being worked on by @jorbin.

    2. You should be able to choose/switch a language from the general settings screen, after which the language pack should be downloaded.

    This simply requires replacing mu_dropdown_languages() with a new method that handles uninstalled languages gracefully. This is easy to implement and relies on much of the same code as the install process, so it’s simply on hold until that’s done. I’ve also worked out a UX flow with @sonjanyc.

    3. You should be able to search from the dashboard for plugins and themes that are available in your language.

    This is handled on the WordPress.org side. The updated plugins screen will need to pass a new argument to filter by language, and then remove that argument if the user requests showing plugins in any language. We’ll need to hack in readme/description translation support but that’s a small API change and otherwise WordPress.org work, not core work.

    4. All localized packages should be able to be automatically generated and made available immediately as part of the core release process.

    A script for this is written. While it needs more work, it was used as a test to build 3.9.1 packages, which are doubling as 4.0-alpha testing packages. This does not require changes in core.

    5. Localized packages should only be used for initial downloads from WordPress.org. Instead, language packs should be transparently used for updates.

    This is ready. A flag needs to simply be flipped in the API.

    Ongoing problems to solve:

    • I have a proposal to type up for how to handle readmes, license files, etc., in both core and plugins. Requires no core changes.
    • No one has picked up the plan to limit the code modifications still done in some locales. This may end up being a July project for me.
    • The relevant APIs we need in core were deployed to WordPress.org. Also, the plugin and theme directories are fully internationalized; we need to get those strings to translators and shoehorn them onto existing international sites.
     
  • Mike Schroder 2:18 am on May 21, 2014 Permalink | Log in to leave a Comment
    Tags:   

    Last Week in WordPress Core 

    Hi Everyone! This is the first Last Week in WordPress Core for WordPress 4.0! Last week, a minor update, 3.9.1 was released, and autoupdates started shortly afterwards. Development on 4.0 is ongoing, and you can see notes and meeting details posted by @helen on this blog as well.

    Media:

    • In wp.media.view.Settings::update(), when handling checkboxes, check for a value of false in addition to casting value to boolean. !! false evaluates to true. [28371] #23954
    • Allow users to set overrides for MediaElement instances by always passing _wpmejsSettings instead of just _wpmejsSettings.pluginPath. [28370] #25243
    • When pausing “all” players attached to MCE views, don’t reach into global scope and pause every player. Only pause the players bound to MCE views. [28364] #27971
    • In wp_read_image_metadata(), the values from exif_read_data() should only override values from iptcparse() that are empty. [28367] #23706
    • Support loop for [audio] and [video] shortcodes that specify files that are played using MediaElement’s Flash plugin bridge. [28363] #27368
    • MediaElement players need clear: both to play nice with adjacent floated elements. [28361] #27385

    Widgets:

    • Custom Navigation Widget: Force users to choose a nav menu in the custom nav menu widget, for a better customizer UX. Before, they had to make a dummy change to get it to render. Now they are made to choose a nav menu from the dropdown, which feels more natural. [28197] #27878
    • Recent Posts Widget: Use ob_end_flush() instead of ob_flush(). ob_end_flush() flushes the output buffer and turns output buffering off, same as ob_get_flush(). [28195] #28009

    Themes and Templates:

    • Prevent paged-* from being added to body classes and prevent Page %s from being added to page title on 404 error pages on default themes. [28249] #16468
    • Bundled Themes:Prevent Page %s from being added to page title on 404 error pages in bundled themes. [28250] #16468.
    • Bundled Themes: Use correct logic in IE conditional comments in header template. [28341] #28151
    • Set the proper value for wp_title() when is_author() and is_post_type_archive() are both true. post_type should always win due to the precedence indicated in get_queried_object(). [28251] #25398
    • Update the default (WP-defined) styles for MediaElement players to be more in-line with our flat aesthetic. Use the new official colors. [28365] #27516

    Custom Headers:

    • Allow to skip cropping header images if image width is smaller than or equal to theme width. [28219] #27936
    • Avoid hiding ‘Remove’ buttons unrelated to custom headers. [27882] #27848
    • Keep header image from being removed when background image is removed. [28269] #28046
    • Avoid warnings in the process_default_headers() method. #27850
    • Fix logic when a theme doesn’t set default-text-color. [28294] #28042

    Internals:

    • Move home option to the top of populate_options() to make it easier to find next to siteurls for manual changes. [28260] #28141
    • Scrutinizer Cleanup: @wonderboymusic has started the process of cleaning up core with Scrutinizer. Check out the full list of fixes so far on #27882.
    • Hack/HHVM Compatibility: More from @wonderboymusic. See #27881 and #22400.
    • Dev Tools: Introduce default wp-cli.yml for core development. [28221] #28036
    • Add .dfxp and .srt files to mime-type whitelist in wp_get_mime_types(). They are both captioning formats supported by MediaElement. [28259] #27643
    • Add .xps and .oxps extensions to list of supported document types. More about the types on Wikipedia. [28372] #15697
    • When $type is atom in get_the_category_rss(), use get_bloginfo_rss( 'url' ) when setting the scheme attribute for the <category> node. [28258] #24444
    • In WP_Date_Query::get_sql_for_subquery(), don’t parse duplicate parameters – only parse one of w and week or month and monthnum. [28252] #25835
    • Add a filter for wp_list_comments() arguments. [28285] #19581
    • In get_the_author_posts(), if there is no current $post, return 0 and bail. [28362] #27998
    • In WP_Terms_List_Table::single_row(), call sanitize_term() on the passed term ($tag). [28360] #16864

    Externals:

    TinyMCE:

    • First pass at wpview logic for the shortcode. URLs pasted on their own line are parsed as well. The toolbar will appear with the “remove” button when the view is clicked. Edit has not been implemented yet, nor have safety measures for non-iframe embeds. [28358] #28195
    • Audio, video, and playlist shortcodes: [28342] #22400, #27881
      • Convert all instances of variable variables to array properties
      • Stop using extract()
      • Rename $atts to $html_atts where collision with new $atts (shortcode atts holder) var might occur
    • Shortcode JS: Avoid errors when an escaped shortcode includes a newline between brackets. [28223] #27907

    Multisite:

    Thanks to @andrezrv, @arnee, @avryl, @azaozz, @boonebgorges, @celloexpressions, @Clorith, @danielbachhuber, @dimadin, @ebinnionm, @ehg, @ericlewis, @feedmeastraycat, @GaVrA, @gcorne, @greenshady, @helen, @hlashbrooke, @imath, @jartes, @jdgrimes, @jeremyfelt, @johnbillion, @jorbin, @jupiterwise, @mattwiebe, @MikeHansenMe, @m_i_n, @obenland, @ocean90, @pavelevap, @psoluch, @rob1n, @rzen, @sergej.mueller, @SergeyBiryukov, @t4k1s, @Tmeister, @westonruter, and @wonderboymusic for their help!

    For the complete list of commits to trunk, check out the log on Trac. We’ve been chatting about 4.0 plans, and things are shaping up. Come chat this Wednesday to continue the discussion, and please note if you encounter issues with 3.9.1 on Trac.

     
  • Mike Schroder 7:33 pm on April 9, 2014 Permalink | Log in to leave a Comment
    Tags:   

    Last Week in WordPress Core 

    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 wpdialogs. This means it now needs to be enqueued by any plugin that wants to use it. As of [28024], there is a clarified warning that will appear in the JavaScript console if you attempt to use it, and it’s not enqueued.

    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.

    Media:

    • Playlists: Make elements in playlists responsive and fix playlist advancement on mobile. [27894] [27895] #27625
    • Playlists: Set preload='none' for the empty <audio|video> tag. [27974] #26779
    • Playlists: Make tracks keyboard-accessible. [28023] #27644
    • A/V Shortcodes: Remove support for a caption in audio and video shortcodes. This was part of a UX iteration for the related MCE views, but these captions have since been excluded. See [27640]. [27979] #27320
    • Edit Image Modal: Make the calculation of the aspect ratio more robust. [27942] [27948] #27366
    • Do not show featured images for image attachments; remove post_supports_thumbnails() and theme_supports_thumbnails() for now. [28051] #27673

    HTML5 Galleries:

    • Remove <br> elements for HTML5 galleries; see #26697. [27914] #27637
    • Twenty Thirteen and Fourteen: Update styles to support the new HTML5 line-break-less galleries. [27926] #27637

    Admin:

    Theme Installer:

    Widgets

    • Trigger jQuery events for widget updates. widget-added when a widget is added to a sidebar and widget-updated/widget-synced for widget soft/hard updates. [27909] [27969] #19675; #27491
    • In WP_Widget, introduce is_preview() method to allow widgets to check to see if they’re currently being previewed via the customizer. [27966] #27538
    • Widget Customizer: Improve compatibility with plugin custom scripts and styles for widgets. [27907] #27619
    • Widget Customizer: Rename inject_preview_css to print_preview_css. [27968] #27534
    • Widget Customizer: Use postMessage to highlight widgets in preview or sections/controls in Customizer. [27892] [27893] #27622
    • Widget Customizer: Refactor and clean up WidgetCustomizer as wp.customize.Widgets, and make available widgets panel a Backbone view. [27985] [27986] [27988] [27995] [28034] #27690

    TinyMCE

    • Update TinyMCE to 4.0.21. [27897] #24067
    • Image Details Modal Improve look-and-feel, and add a Custom Size option to the size drop-down that reveals fields for soft-resizing the inserted image. [27918] #27366
    • Image Details Modal: Move all advanced options under a single toggle, bring back the field for CSS Class, and optimize CSS for responsive layout. [27898] #27366
    • Drag and Drop Uploading: Add new argument to wp_editor() to enable. [27901] #27465
    • Gallery Views: Avoid JS errors when image attachments lack metadata. [28008] #27691
    • Return to loading /langs/[locale].js and /langs/[locale]_dlg.js from 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; [27922] #27610
    • Clarify error when wpdialogs is not enqueued. Add wp_enqueue_editor action fired when scripts and styles for the editor are being enqueued. [28024] #16284
    • Update translatable strings. [27927] #27453, #24067
    • Tighten up toolbar and tab styles. [27978] [27983] #27279
    • Expose toolbar keyboard shortcut in Help documentation for TinyMCE, and clean up TinyMCE help dialog, removing duplicated text and leaving only Keyboard Shortcuts. [28029] #27024; [28032] #27100

    Database:

    • Fall back from ext/mysqli to ext/mysql if the connection fails. This allows us to avoid breaking a site that works under ext/mysql but is misconfigured for ext/mysqli. [27935] #21663
    • Add $allow_bail argument to wpdb::check_connection() to match the connect method. [27925] #27240
    • Don’t pass a second argument to mysqli_fetch_field(). [28002] #27693
    • Rename USE_EXT_MYSQL to WP_USE_EXT_MYSQL. [28022] #21663

    Internals:

    • Updates: Record Plugin & Theme update statistics like we do for Core updates. [27905] [27906] #27633
    • Pingbacks: Forward pingback IP during verification. [27872] #27613
    • Dashicons: [27989] [28005] [28013] #26936
      • New icons: .dashicons-external, .dashicons-editor-contract and .dashicons-universal-access-alt.
      • Updated icons: .dashicons-code, .dashicons-universal-access, .dashicons-arrow-x-alt and .dashicons-arrow-x-alt2.
      • Restores .dashicons-post-trash as an alias for .dashicons-trash, which is the new one.
      • Use new icons in Widget Customizer.
    • Don’t try to resolve symlinks for single-file plugins. plugins_url() should not be used in this context anyway. [27999] #16953
    • Remove old links_recently_updated_* DB options that never had a UI. [27916] #27649
    • Deprecate wpmu_current_site(). [28009] #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.

     
  • Mike Schroder 8:12 am on April 3, 2014 Permalink | Log in to leave a Comment
    Tags:   

    Last Weeks in WordPress Core 

    Hi! This is a late Last Week in WordPress Core for the two weeks of March 17-30. Lots going on as we approach RC.

    Beta 3 is out, and you can check out the release post here. There are a few big things that have landed that are included. In particular, please test video and audio playlists by uploading more than one file of either, and check to see if you see any oddities in quote formatting, as much of wptexturize() was revamped.

    Admin:

    • Theme Installer: Restore the feature filter, improve responsiveness, update router, make ‘Upload Theme’ button more consistent with the admin, and avoid theme-count causing filters to jump. [27636] #27055
    • Theme Installer: Bring keyboard accessibility to the theme install screen and theme action buttons. [27804] #27521
    • Dashboard: Restore the update message in the dashboard that was removed in 3.8. [27711] #26664
    • Distraction Free Writing: Allow the fullscreen editor’s content area to be responsive. [27821] #27569
    • Accessibility: Better focus styles for form elements in the admin. [27741] #27173

    Widget Customizer:

    • Restore highlighting of widgets in preview. [27584] [27702] #27358
    • Use WP_Error for errors, and add handling for when user is missing cap to change widgets or is logged out. [27652] #27419

    Themes:

    • Introduce HTML5 caption support: When supported by a theme via add_theme_support( 'html5', 'caption' ), use figure and figcaption instead of div and p. With HTML5 captions, no longer include extra 10 pixels within inline styles. img_caption_shortcode_width is skipped when the theme supports HTML5 captions. [27668] #26642 #9066
    • On attachment pages for audio and video, add support for players. [27622] #27243
    • Default Themes: Improve accessibility for keyboard and voice-over interactions. [27594] #27147 [27606] [27607] #24839
    • Default Themes: Update editor styles for A/V and Galleries. [27638] [27637] [27641] #27462
    • Default Themes: Enable thumbnail support for attachment:audio and attachment:video. Check for theme OR post type support when determining whether to enable Featured Image UI in the admin. [27657] #27460

    Media

    • There is no more video-playlist shortcode. To use video, it is now [playlist type='video' ...]. Core playlist styles removed; the style attribute is still supported, defaulting to light. [27785] [27812] #27552
    • Only enqueue the media modal image editor within the admin. [27625] #21811
    • Support a caption attribute for audio and video shortcodes. [27640] #27320
    • Create a new file, media-audiovideo.js, to house all of the audio and video JS code in core, and improve UX. [27608] [27631] #27437
    • With Plupload, switch to urlstream upload method when the flash runtime is used in non IE browsers. This ensures cookies are sent but limits the maximum file size that flash can handle. By default only IE9 and older use flash, so it would only affect things if a plugin disables the html5 runtime. [27662]
    • Provide a metabox to edit audio metadata (initially from ID3) on the “Edit Media” page. [27862] [27862] [27864] [27869] #27574.

    TinyMCE:

    Internals

    • Masonry: Update Masonry v2/v3 shim from upstream. [27779] [27780] [27781] #27510
    • Texturize: Massive performance improvements (~600% faster); better handling of braces, nbsp, double, and weird spaces; 136 new unit tests. [27839] [27844] #22692
    • Cookie Session Checks:: Only show test cookie warnings on submit as caching/proxies may intercept the test cookie for GET requests. Introduce a new string for when headers are sent and link them to a new Cookies page on the codex. [27859] #27373
    • Object Cache:: Introduce pre_update_option filter, available in update_option(). Allows filtering of any option before its value is (maybe) serialized and updated. [27815] #27504
    • wpautop: Remove select and input from wpautop()‘s HTML blocks list. [27761] #22230
    • Heartbeat: Hooks should always receive unslashed data. This affects the privileged hooks; the unprivileged hooks already did so. [27576] #27260
    • Customizer: Use esc_url_raw to escape customizer URL settings to prevent double encoding. [27574] #26569
    • Template: Encode spaces in get_template_directory_uri() and get_stylesheet_directory_uri(). [27710] #21969
    • Filesystem: Fix getchmod() for direct and ssh2 transports, for directories. [27566] #26598
    • Text/i18n Cleanup: Many text changes and updates. Check out all of them in the full log on Trac.
    • i18n: In is_serialized(), use substr() rather than array access, for compatibility with multibyte overloading. [27565] #18007
    • Postmeta: Return false from metadata_exists() if the get_$type_metadata filter returns a false value. [27562] #22746
    • Pagination: Introduce before_page_number and after_page_number arguments for paginate_links(). [27600] #24709
    • E-mail: Always decode special characters for email subjects. [27801] #25346
    • WP Class: Add post_parent to the private query vars list. Fixes detached media queries. [27782] #27532.
    • Post: Use wp_parse_id_list() when parsing exclude_tree in get_pages(). Ensure a URL string, array with string as value, and array with array as value for exclude_tree can be used to specify multiple IDs. [27767] #9153

    WP_Query

    Multisite:

    • Introduce a ms_site_not_found filter to replace NOBLOGREDIRECT. Bail if there’s no site. [27663] #21143; #27003
    • In multisite load, cache the main site lookup query. [27664] #27003
    • Ensure the $path is trailing-slashed in domain_exists(). [27717] #20589

    For the complete list of commits to trunk, check out the log on Trac. Interested in helping close out the release? Write or test a patch for 3.9.

    Thanks to @adamsilverstein, @adelval, @afercia, @aliso, @aubreypwd, @avryl, @azaozz, @barry, @bcworkz, @celloexpressions, @cgaffga, @Chouby, @chriseverson, @chrisguitarguy, @cramdesign, @danielbachhuber, @dannydehaan, @DavidAnderson, @DrewAPicture, @drozdz, @dustyf, @eatingrules, @ehg, @eightface, @ejdanderson, @eliorivero, @empireoflight, @ericlewis, @ericmann, @ethitter, @fahmiadib, @frank-klein, @gcorne, @grahamarmfield, @GregLone, @hakre, @helen, @jackreichert, @janw.oostendorp, @jartes, @jbkkd, @jdgrimes, @jeremyfelt, @joedolson, @johnbillion, @jorbin, @kawauso, @kovshenin, @kpdesign, @kwight, @lancewillett, @lkwdwrd, @markjaquith, @mattheu, @mattonomics, @matveb, @mauryaratan, @mcsf, @melchoyce, @MikeHansenMe, @miqrogroove, @mordauk, @nacin, @Nao, @Nessworthy, @nofearinc, @obenland, @ocean90, @paulwilde, @pavelevap, @pbearne, @philiparthurmoore, @prettyboymp, @raamdev, @rachelbaker, @ramonchiara, @roothorick, @ryelle, @sabreuse, @sandyr, @SergeyBiryukov, @shahpranaf, @siobhyb, @spmlucas, @stevenkword, @tbrams, @tlovett1, @TobiasBg, @tomauger, @Toru, @vanillalounge, @westonruter, @wonderboymusic, @xknown, and @yoavf for their efforts!

     
    • jadpm 11:29 am on April 3, 2014 Permalink | Log in to Reply

      Hi.

      I’m implementing the and shortcodes in a project I’m working on, and I’m wondering about the caption attribute that was introduced. Although I’m running the latest 3.9beta3 with TwentyFourteen on my local dev, I see no change whether my shortcodes include that attribute or not. Also, I do not see them being used anywhere in the code.

      Maybe I’m missing something or this is intended for a future iteration use?

    • jadpm 11:33 am on April 3, 2014 Permalink | Log in to Reply

      Hi and congrats! WordPress 3.9 is looking nicer every day.

      I’m currently implementing the and shortcodes on a project I’m working on, and after updating to the latest beta using the WordPress Beta Tester plugin, I see no difference whether I use the new caption attribute or not. Looking at the code I’d say this is not used anywhere yet.

      Am I missing something or is this intended for a future use?

      Thanks.

    • Scott Smith 12:55 am on April 7, 2014 Permalink | Log in to Reply

      With HTML 5 captions enabled in theme, is the editor supposed to use the new tags? It doesn’t as of 3.9-beta3-27857 for me.

      • Andrew Ozz 6:39 pm on April 7, 2014 Permalink | Log in to Reply

        No, the tags in the editor have always been different. There is also a div wrapper for each caption. These nodes are used when editing/managing the captions.

    • cyrilleduclos 8:27 am on April 8, 2014 Permalink | Log in to Reply

      Hi,

      I’m testing the playlist shortcode. I don’t see a way to specify alternate sources for maximum HTML5 playback for each video displayed in the playlist (as it is done when you insert a single video).
      Is it planned ?

      Thanks

  • Mike Schroder 10:29 am on March 13, 2014 Permalink
    Tags: ,   

    Last Week in WordPress Core 

    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.

    Admin:

    • Widgets: Add widget management to the customizer. This brings in the Widget Customizer plugin. [27419] #27112
    • Admin Menu: Introduce a .dashicons-before CSS class and use it in the admin menu. Lets you use a Dashicon before an element without copying the entire .dashicons styling to your :before styling. [27418] [27425] [27444] [27482] #26630
    • Editor: Show “View Post” for any post the author can read. This expands it to private posts and matches the logic in the toolbar. [27483] #27059

    Media:

    • First pass at bringing the Image Editor into the media modal. Please test me! [27445] #21811
    • First pass adding a loading indicator to the Media Library. [27438] #24859
    • Allow $crop in add_image_size() and set_post_thumbnail_size() to receive crop anchors (top, left, right, bottom, center). [27472] #19393.
    • Add subtitle support to Video editing in the Media Modal. [27481] #27016
    • Do not output default gallery styles if the theme has opted into HTML5 galleries. [27396] #27045; see #26697
    • Add a class attribute to the caption shortcode to allow additional classes to be specified. [27404] #25295
    • Add playlist_styles and wp_playlist_scripts filters to allow users to roll their own playlist themes. [27486] #26631 & [27488] #26631

    TinyMCE:

    • Update TinyMCE to 4.0.18. [27387] #24067
    • Add TinyMCE placeholders for audio and video shortcodes and provide a UI to both edit shortcode attributes and replace the src media file in an audio or video shortcode. Also, a flurry of improvements and fixes to them, visible in the full changelog. [27411] #27016
    • Add a Ctrl+K shortcut to open the linking dialog, which is the “de-facto standard”. [27449] #27305
    • Add the <hr> plugin and button to the toolbar. [27428] #27159
    • With drag-and-drop uploading, support multiple editor instances, limit to IE10+, and other small fixes. [27378] [27372] [27464] #19845
    • When parsing a caption shortcode, recreate missing width attributes using the image tag’s width. [27426] #23103
    • Restore the “link” button state to disabled by default and enabled when text or image is selected. Remove the (recently added) default link plugin; not needed. [27447] #27309

    Templates:

    • Add has-post-thumbnail as a post class. [27429] #18804
    • Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context. [27470] [27471] #13265
    • Introduce get_the_permalink() as an alias for get_permalink(). This better aligns it with other the_* and get_the_* function pairs. [27409] #24164
    • Let get_the_date() accept a post object. [27380] #13771
    • Add the ability to short-circuit wp_nav_menu() via the pre_wp_nav_menu hook. [27386] #23627
    • Better plural handling for labels in wp_generate_tag_cloud() / wp_tag_cloud(). [27376] #27262, see #7989, #14424

    Multisite:

    • Incremental improvements and bug fixes with the multisite load process. Please test your networks! [27406] [27439] [27407] #27003
    • Fix bulk activation of network-only plugins. [27413] #26487

    Query:

    • Add has_password and post_password query variables to WP_Query. has_password true means posts with passwords, false means posts without. post_password can query for posts with a particular password. [27395] #20308
    • Allow a posts_per_rss query variable to be set to override the posts_per_rss option. [27456] [27455] #25380
    • Allow get_page_by_path() and get_page_by_title() to accept an array of post types. [27423] #24763

    Internals:

    • Allow for custom authentication handlers for all requests. Turn the logic used by wp_get_current_user() into a determine_current_user filter. [27484] #26706
    • Allow the role attribute in kses for all elements. [27388] #24098
    • Add a pre_set_theme_mod_$name filter to set_theme_mod(), modeled after pre_update_option_$option in update_option(). [27393] [27402] #14721.
    • Improve HHVM compatibility by eliminating some of our last remaining create_function() calls and making OBJECT a case sensitive constant. [27373] [27374] [27465] #14424 [27377] #27231
    • Pass $reassign parameter to delete_user and deleted_user actions. [27462] [27466] #23057
    • Bail early from shortcode functions if no delimiter is present. It’s the little things; performance results on-ticket. [27394] #23855
    • Update PHPMailer to 5.2.7 from 5.2.4. Includes two trivial modifications for WordPress (no impact to plugin developers); see the commit message. [27385] #25560
    • Use SSL when linking to WordPress.org. [27469] #27115

    For the complete list of commits to trunk, check out the log on Trac. Interested in joining in? Write or test a patch for 3.9.

    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!

     
  • Mike Schroder 8:23 am on March 5, 2014 Permalink
    Tags: ,   

    Last Week in WordPress Core 

    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.

    Editor

    • Add the ability to drag and drop files directly onto the editor. Upon drop, the media manager will open, and file will begin to upload. [27343] #19845
    • Throttle scrolling of the main window when the editor is active and is being scrolled with the mouse wheel or a trackpad. [27368]. Expect some major tweaks here, though; see #27013.

    Templating

    • Introduce HTML5 gallery support. When a theme supports HTML5 galleries via add_theme_support( 'html5', 'gallery' ), figure, and figcaption will be used instead of definition list markup. [27302] #26697
    • Add a filter to remove or rename page templates for a theme. This does not yet handle adding page templates. [27297] #13265
    • Move comment-reply.js to 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. [27303] #12641
    • Return 404 when querying author’s posts who is not a member and has no posts on the site. [27290] #20601
    • Make get_adjacent_post() wrap a new WP_Adjacent_Post object that uses WP_Query. [27285] [27286] #26937
    • Add exclude and include arguments to wp_list_authors(). [27274] #9902

    Internals

    • Multisite: Introduce 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. [27359] #27003
    • Database: Use MySQLi for WordPress development versions, regardless of PHP version, to increase testing footprint. There’s also a constant for testing purposes. [27257] [27278] #21663
    • Plugin API: Introduce doing_filter() and doing_action() to identify hooks in progress. You can also use this with to identify a hook that has completed. For more, see [27294] #14994.
    • Formatting: Strip backslashes, not just forward slashes, from untrailingslashit(). trailingslashit() will now remove any forward or backslashes from the end of a string before appending a forward slash. [27344] #22267
    • Date/Time: Allow current_time() to accept a date format string, adding to timestamp and mysql. [27259] #21653
    • Updates: During core upgrade, copy wp-includes/version.php over last, to avoid an installation failing with the new version.php in place. [27336] #25860
    • Rewrite API: Allow rewrite endpoints to specify a query variable name. [27327] #20905
    • Cache API: Revert [27115] and let cache backends handle the stripping of spaces in cache keys as necessary. microtime() returns greater precision than microtime(true). [27300] #27000, #23448, #26903, #14485
    • Query: Add a $default argument to get_query_var() and WP_Query::get(). Helpful when working with endpoints. [27304] #16471
    • Comment Query: Allow user_id to be an array of IDs in WP_Comment_Query. [27258] #27064
    • Users: Make the user arguments for get_edit_profile_url() and get_dashboard_url() optional, defaulting to the current user. [27260] [27265] #16686

    External Libraries

    • Update the Masonry JavaScript library to version 3. [27271] #25351
      • The new script handle is masonry. The old jquery-masonry handle 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.
      • Themes should switch to masonry and declare jQuery as a dependency on their own if they need it.
      • Upgrade guide on Masonry’s site, with the exception that, for core, we continue to include imagesLoaded.
    • Upgrade Plupload to 2.x (2.1.1) [27316] #25663
    • Update the Root Certificate bundle used for SSL communication by WP_HTTP from the latest Mozilla release NSS. [27307] #27017

    Developer Tools

    • Add grunt-patch-wordpress for applying patches directly from Trac. Mapped to grunt patch, which declares usage. Requires npm install to install. [27299] #27023
    • Add JSHint to Travis CI config. [27267] #26446

    For the complete list of commits to trunk, check out the log on Trac. Interested in joining in? Write or test a patch for 3.9.

    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!

     
  • Andrew Nacin 3:06 pm on February 6, 2014 Permalink
    Tags:   

    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:

    • Settings review is in the ideas/sketch/wireframe stage. They have a meeting today. (@jenmylo, @melchoyce)
    • Lots of audio/video changes landed. Needs review on #27026 and UI feedback on #26631. (@wonderboymusic)
    • Work continues bringing the image editor into the media manager. #21811. (@gcorne, @tomauger)
    • TinyMCE/editor: modals are getting redesigned. #26952. (@melchoyce, @avryl) QUnit tests are being added. #27014. (@azaozz) @gcorne also sunk some time into MCE views, for gallery rendering.
    • THX plugin is being revived to take a crack at the theme install screen. If it works out, these patches could land in 3.9. (@matveb)
    • A Grunt patch tool needs testing. #27023. (@jorbin)
    • Some refactoring of the multisite bootstrap will begin this week. #27003. (@jeremyfelt)
    • Volunteer(s) wanted: If anyone wants to work on expanding autocomplete in core, there is some work in that area to be done. @helen will help shepherd.

    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.

     
    • helgatheviking 2:58 pm on February 8, 2014 Permalink | Log in to Reply

      Is there any chance 3.9 will tackle the issues with nav-menus.php saving a lot of data? Apparently this is the reason for the hold up on adding action hooks to the admin menu UI (for adding additional meta to the menu items), which is a feature that has been requested (at least 4 duplicates that I can find) a few times. Plugins and themes that are replacing the custom Walker with their own would finally be able to work together.

  • Mike Schroder 2:46 pm on February 4, 2014 Permalink
    Tags: ,   

    Last week in WordPress core 

    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

    Database changes

    • Initial patch to reconnect when the MySQL server “goes away” has landed, with a request for feedback on how to make the solution more fool-proof on #5932.
    • Improved Compatibility with MySQL 5.6, which has stricter default SQL modes.
      Disables NO_ZERO_DATE, ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, STRICT_ALL_TABLES, TRADITIONAL. Introduces filterable wpdb::set_sql_mode(), with incompatible_sql_modes filter for plugins. #26847
    • We now throw a notice when wpdb::prepare() is called without a placeholder. #25604
    • In wpdb::db_connect(), allow the loading of a translatable custom database error template. #25703

    Miscellaneous, including library updates

    3.9 status reports

    Here are roughly where each of the 3.9 teams/tasks stood as of last week’s meeting:

    Media/editor related:

    • Media Modal: “Initial version of the single image editor landed, which includes the ability to replace the image and update the main set of attributes (e.g. caption, alt, alignment, link).” (@gcorne) (#21811)
    • Image Editor: “have a proof-of-concept plugin ready awaiting input on how to modularize the Editor and make it extensible and flexible. Working on a patch that introduces a few well-placed hooks.” (@tomauger) (#21811)
    • Rendering in the editor: “Going to dig into rendering galleries in the visual editor using a wpview and building on some of the work that i did in https://github.com/gcorne/gallery-editor.&#8221; (@gcorne) (#26628, #26959)
    • TinyMCE: All looks good on this front, #24067. “We’ve also started looking at restyling TinyMCE modals to match the admin, #26952″(@azaozz, @melchoyce)
    • Audio/Video: There’s an update post by @wonderboymusic.

    Other UI work:

    • Widget Customizer: “We’re running more users tests; Working on keyboard accessibility features; Trying to figure out support for wide widgets; Asked for some code review/notes; And digesting feedback from our recent p2 post.” (@shaunandrews)
    • Settings screens: “We had a meeting yesterday to divvy up the redux. I’m looking at reordering of information across screens, @melchoyce is experimenting with UI approaches, and @Ipstenu is looking at cleaning up the multisite ‘edit site/settings’ view. We hope to be posting sketches/wireframes [this] week.” Also, they’re again looking at lifting post by email from core. (@jenmylo)
    • Accessibility: we are testing 3.8.1 admin screens for keyboard accessibility. (@joedolson)
    • Autocomplete: After the new site email address autocomplete landed (#25348), now looking into other areas — users (#19867) and pages (#9864). (@helen)
    • CSS: Work continues on the colors.css merge to prep for splitting up wp-admin.css. (@helen, #18380, #26669).

    Fun with internals:

    • Multisite: “Our tickets are focused. [As in, reorganized into the 'multisite' focus.] I’ve been digging through ms-load.php, ms-settings.php, etc in prep for some fun domain routing work. Would like to compare thoughts on approach soon and get moving on that.” (@jeremyfelt)
    • New Grunt-based Patching Tool: “I’ve been using it locally and haven’t run into any issues. Will be opening a ticket on Trac with a patch and instructions in the next few days.” (@jorbin)
    • Taxonomy: Hope to start with the first few tickets on the roadmap this week. (@nacin)

    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, gcornehelen, 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!

     
  • Weston Ruter 11:52 pm on January 28, 2014 Permalink
    Tags:   

    Widget Customizer Feature-as-Plugin Merge Proposal 

    Widgets in WordPress provide an easy way to add functionality to predefined areas of your theme templates. However, once you add a widget to a sidebar you have to leave the WordPress admin to go back to the frontend to actually see how the updated widget appears in the sidebar on your site’s public frontend. While you are making these changes and experimenting with a widget, it could be completely broken and everyone visiting your site will see this broken widget since there is no core way to preview changes made to widgets. But WordPress also provides an excellent way to preview changes to various settings on your site via the (Theme) Customizer. Changes made when using the Customizer are not visible to site visitors until you hit Save & Publish. So what if widgets could be edited in the Customizer? That’s what the Widget Customizer plugin makes possible. No longer do you have to edit your widgets blind!

    A widget control open the customizer

    Each registered sidebar on your site gets its own section in the Customizer panel. Within each section, widgets appear in their sidebar order. The widget controls appear there just as they appear when editing widgets in the widgets admin page. Upon making a change to the widget control, pressing the form’s Update button causes the changes to appear in the preview window; no changes to the widgets are saved permanently for others to see until you hit the Customizer’s Save & Publish button. This goes for whether you’re adding a new widget, editing existing widgets, reordering widgets, dragging widgets to other sidebars, or even removing widgets from the sidebars entirely: all of these actions are previewable.

    Adding a widget to a sidebar slides open a panel for browsing the available widgets, complete with the usual names and descriptions, but also featuring widget icons to help quickly identify widgets. The list of available widgets can also be filtered down with a search input.

    When you remove a widget from a sidebar, it is not deleted. Instead, it is moved from an active sidebar to the “Inactive Widgets” sidebar which can currently be seen on the widgets admin page. As such, removing a widget now is the same as trashing a widget.

    Adding a widget

    Customizer control sections for sidebars are shown and hidden dynamically when the preview window is initially loaded or when navigating the site within the preview window, based on whether or not the sidebar gets rendered in the previewed URL. (You may not know this, but you can navigate your site by clicking links in the preview window.) Only sidebars which can be previewed will be shown in the customizer panel. Likewise, widgets that are not rendered in the preview (for example, by means of Jetpack’s Widget Visibility module) will appear in the Customizer as semi-transparent.

    Accessibility has also been a key concern for Widget Customizer. The current keyboard navigation on the widgets admin page feels cumbersome, having to open screen options to enable a separate accessibility mode. We wanted to make re-ordering with widgets as seamless as possible. So now when any sidebar section is open, you can invoke a reorder mode to reveal up/down arrows to reorder widgets, as well as a subpanel to open for moving the widget to another sidebar entirely. (This feature is nearing completion in pull request #21.)

    Here’s an older walkthrough of the plugin:

    Live Previews

    (This did not make it into WordPress 3.9 — that also means themes do not need to indicate support for the widgets customizer. Read more about Live Widget Previews: Widget Management in the Customizer in WordPress 3.9.)

    While all themes and widgets should work with Widget Customizer, for the best experience the themes and widgets need to indicate they support live previews of sidebars and widgets. Without such support added, each change to a sidebar or widget will result in the preview window being refreshed, resulting in a delay before the changes can be seen (settings default to transport=refresh). To enable a much more responsive preview experience, themes and widgets should indicate that they support Widget Customizer live previews; this will update the relevant settings to use transport=postMessage, the updated widgets will be loaded via Ajax, and the widgets will be re-ordered via DOM manipulation.

    All core widgets and themes distributed with WordPress core are supported by default. For other themes, simply include add_theme_support('widget-customizer') in your theme’s functions.php to opt-in. If your theme does some dynamic layout for a sidebar (like Twenty Thirteen uses jQuery Masonry), you’ll also need to then enqueue some JavaScript to listen for changes to the sidebar and reflow them when that happens; see the bundled support for Twenty Thirteen to see an example of what is required.

    Along with themes needing to indicate support for live-previewable sidebars, widgets must also indicate that they support being live-previewed with Widget Customizer. When updating a widget, an Ajax call is made to re-render the widget with the latest changes, and then the widget element is replaced in the sidebar inside the preview. If a widget is purely static HTML with no associated script behaviors or dynamic stylesheets (like all widgets in core), then they can right-away indicate support for live previews simply by including 'customizer_support' => true in the array passed to WP_Widget::__construct(). As with sidebars, if a widget has dynamic behaviors which normally only get added when the page first loads (such as a widget which includes a carousel), then a script needs to be enqueued in the Customizer preview which will re-initialize the widget when a widget is changed.

    The sidebar-updated and widget-updated events get triggered on wp.customize when sidebars and widgets get updated, each being passed the sidebar ID and the widget ID respectively as the first argument in the callbacks. For a full example demonstrating how to add theme support for live-previewing dynamic sidebars and how to add support for JS-initialized widgets, see this annotated Gist.

    Core Tickets

    A few Core tickets have been opened with patches to generally improve widgets and the customizer, and also to improve Widget Customizer itself:

    • #26633: Customizer form submission prevention impairs accessibility of links in customizer controls
    • #26061: Customizer settings with non-scalar values incorrectly trigger as changed
    • #26569: URLs exported to JavaScript in Customizer settings get double-encoded
    • #25368: Add temp hooks for Widgets UI Refresh plugin-as-feature
    • #26661: Add before/after hooks to override output of wp_widget_control()
    • #25419: Add support to widgets for icons and screenshots

    User Tests

    A couple user tests have been done, both of which went pretty well. More user testing is being queued up. Here’s the first user test video, though note it reflects an early rendition of the plugin:

    Remaining Issues

    In addition to wrapping up the keyboard-accessible widget reordering (#21), there is the dilemma of how to handle wide widget form controls (#18); various solutions have been proposed for how to display a widget control which does not fit within the customizer panel.

    The other open issues are enhancements or open questions which may or may not need actioning.

    Contributors

    While the plugin was first conceived by me (@westonruter) and I’ve been the lead developer, a ton of valuable input and contributions have come from @shaunandrews, @michael-arestad, from my X-Team colleagues (@johnregan3, @akeda, @topher1kenobe), and from others in the community (@bobbravo2, @topquarky, @ricardocorreia).

    Development on the plugin has been done on GitHub, with the WordPress.org repo serving as a read-only mirror.

    See Also

     
    • Scott Taylor 12:04 am on January 29, 2014 Permalink | Log in to Reply

      This is really cool. Since all this widget refresh activity has been going on, I have seen the light on how great they are. It would be cool if we could find a way to rename the unfortunately base-named “sidebars.” I have no recommendation for something better, but it seems like widgets would really get their due if they were named appropriately as “one of many in a theme area” or “widget collection” or belong to a “module container.”

      Anyways, great work so far.

      • PeterRKnight 12:18 am on January 29, 2014 Permalink | Log in to Reply

        In hindsight I think just ‘widget area’ would have been the simplest name. I wonder how much trouble it would be to rename it.

      • Andrew Nacin 3:27 am on January 29, 2014 Permalink | Log in to Reply

        For what it’s worth (and it isn’t worth much), while this post uses the word “sidebar” repeatedly and while core code uses it extensively in the API, it’s nowhere in the UI. When we need to refer to one, we call it a “widget area” (such as in the help tabs).

        • Jen Mylo 4:27 am on January 29, 2014 Permalink | Log in to Reply

          Yes, we started actively saying widget area instead of sidebar when it was the controversy of the day several years back.

      • tomdryan 4:32 am on January 29, 2014 Permalink | Log in to Reply

        Scott I agree with you — the term “Sidebar” is outdated and should be retired, except when referring to containers that are actual (left/right) sidebars. The term that I’ve taken a liking to is “Container”. I’m hoping to see the entire widget functionality morphs into something more universal within WordPress, so you could have widgets, text, html, etc within a container. Page templates are made up of containers and containers can have widgets, media, text, html or other containers and other content within them.

        If you look at it that way, a menu is essentially a container (with a menu widget), as is the page header, as is the login dialog, etc, etc. Eventually, everything that is displayed by a WP site could be easily accessible and modifiable by the user without the need to edit any code or text files (unless they want to of course).

      • Weston Ruter 4:48 am on January 29, 2014 Permalink | Log in to Reply

        Yes, my bad everyone. s/sidebar/widget area/g :-)

    • Todd Lahman 12:13 am on January 29, 2014 Permalink | Log in to Reply

      Nice work Weston and contributors.

    • Jose 12:20 am on January 29, 2014 Permalink | Log in to Reply

      Awesome work! Been using the .org repo but will try and make the github transfer in the next couple of days.

      I truly love the integration of the genericons. :)

    • PeterRKnight 12:22 am on January 29, 2014 Permalink | Log in to Reply

      Are there any new approaches to the wide widget controls issue (#18) to test?

      • Weston Ruter 12:34 am on January 29, 2014 Permalink | Log in to Reply

        @PeterRKnight: no, we were talking about it over Skype today some more. Still really challenged by this. @michael-arestad did some more mocks: https://cloudup.com/iqH4tGUbQPn

        I think the idea I like the most is if wide widget controls opened over the preview as draggable areas. But it is a jarring user experience for some widgets to have controls sliding down within the panel, with others appearing in these floating windows.

        • Michael Arestad 12:57 am on January 29, 2014 Permalink | Log in to Reply

          We were also considering a flyout as an option as well that operates similar to the current wide widget controls on the widgets page.

        • PeterRKnight 2:01 am on January 30, 2014 Permalink | Log in to Reply

          Ah! Is there a reason why wide *and* normally sized controls couldn’t both enjoy the draggable-over-the-preview format? It would be consistent that way.

          Nice mockup, is it pushing the width of the preview section into a smaller frame though or does it hover over the preview? Hard to tell from the mockup, but it looks like it pushed the page layout into a narrow tablet/mode layout, I think that might be less intuitive when configuring widgets.

    • Syed Balkhi 2:27 am on January 29, 2014 Permalink | Log in to Reply

      This is pretty neat.

    • sterex 4:17 am on January 29, 2014 Permalink | Log in to Reply

      This is a really cool idea. This could probably replace the current widget settings page. Unless there is something that the customizer does not support.

    • Mike Schinkel 3:46 pm on January 29, 2014 Permalink | Log in to Reply

      Super nice Weston; two thumbs up!

    • Travis Northcutt 4:01 pm on January 29, 2014 Permalink | Log in to Reply

      Weston (or others): if using a child theme, does the child theme need to `add_theme_support(‘widget-customizer’)`, or is it sufficient for the parent theme to do so?

    • mrwweb 5:34 pm on January 29, 2014 Permalink | Log in to Reply

      Some thoughts.

      1) It looks good and it’s fun to use. Nice job!

      2) If this gets into core, it seems that a bit more consistency between the backend admin and Customizer would be useful. Particularly, if the widget icons are used in the Customizer, I’d expect them to be used in core.

      3) I think it’s important to consider how these would interact with the various “Widget Visibility” plugins (Jetpack’s Widget Visibility, Widget Logic, Widget Logic Visual, Conditional Widgets, Display Widgets, Dynamic Widgets, etc.). Right now, that can result to a widget appearing in the customizer but not in the preview.

      4) My biggest concern about including this in core is that it shifts the purpose of the Customizer from one intended for modifying the visual presentation of every page on a site, to one that handles content that may change from page to page (based on widget visibility mentioned in #3 or sidebars only appearing on certain pages). The discussion over including this in core should start by clarifying the purpose of the Customizer and whether or how much it should address editing content.

      As I addressed in an article expressing concerns about front-end editing where the focus is on the display of content, I think there’s a risk that users think they’re only changing the specific instance of the widget they’re looking at. This could be learned over time, but I think there’s a chance that it could lead to a bad first experience for many.

      5) If not all widgets can be supported when the feature is launched and not all themes can fully support the customizer, I worry that this will lead to further confusion for beginning users. What does it say if there are two places to administer widgets but some widgets can only be edited in one of the two? I think that segmentation could prove very very very confusing and frustrating to users.

      6) An alternative, much simpler change to widget administration could be similar to the front-end module edit link added to Joomla 3.2. I made a pass at this in the WP Inline Access plugin as you can see in the first screenshot on the plugin’s page. I think this comes down to what the most important feature of this plugin is. Is it to show how a widget looks (advantage: Customizer) or is it to help users quickly administer widgets from the front end (advantage: Link to Admin, in my mind).

      • Weston Ruter 5:46 pm on January 29, 2014 Permalink | Log in to Reply

        3) I think it’s important to consider how these would interact with the various “Widget Visibility” plugins (Jetpack’s Widget Visibility, Widget Logic, Widget Logic Visual, Conditional Widgets, Display Widgets, Dynamic Widgets, etc.). Right now, that can result to a widget appearing in the customizer but not in the preview.

        @mrwweb Actually, support for such Widget Visibility plugins has been added. When a widget is not rendered in the preview, it gets a semi-transparent indicator in the customizer. See https://github.com/x-team/wp-widget-customizer/issues/65

      • Weston Ruter 5:55 pm on January 29, 2014 Permalink | Log in to Reply

        5) If not all widgets can be supported when the feature is launched and not all themes can fully support the customizer, I worry that this will lead to further confusion for beginning users. What does it say if there are two places to administer widgets but some widgets can only be edited in one of the two? I think that segmentation could prove very very very confusing and frustrating to users.

        @mrwweb actually, all widgets and themes should be supported already (except for widgets with wide controls, as noted above). The piece that widgets and themes have to explicitly opt-in support for is live previews. Without that support indicated, then changes to widgets and their areas will cause the preview to refresh. This is in-line with other settings exposed in the customizer: by default they cause a refresh. Themes already have to add explicit support for live previews of settings (transport=postMessage), and so too the widgets need to indicate they support being updated without a page refresh. So themes and widgets that don’t indicate support for Widget Customizer will get a less responsive preview experience, but it all should still work.

    • Weston Ruter 5:42 pm on January 29, 2014 Permalink | Log in to Reply

      2) If this gets into core, it seems that a bit more consistency between the backend admin and Customizer would be useful. Particularly, if the widget icons are used in the Customizer, I’d expect them to be used in core.

      @mrwweb Yes, icons are being worked on for the Widgets admin page as well; see #25419. Also, @shaunandrews has been incorporating them into the Better Widgets plugin, which is also targeting core inclusion. See http://make.wordpress.org/core/2013/12/16/better-widgets/

    • Gregory Cornelius 8:40 pm on January 29, 2014 Permalink | Log in to Reply

      I think this would be a nice addition to the customizer. A few ideas:

      1) The widget block should be lower in the set of customizer components
      2) When selecting a sidebar, it would be nice if it was highlighted.
      3) I think it might be nice to keep the highlighting of the selected widget so that the user can orient themselves when making adjustments
      4) I wonder if it would be better if there weren’t update buttons and instead the preview auto-refreshed like the other settings do.

      In terms of the customizer as a whole, it would be nice if we could deep link to a specific component and incorporated some pushState() functionality in so that a plugin could experiment with removing the corresponding /wp-admin/ pages and still provide menu items that pointed directly to the component.

      • Weston Ruter 9:23 pm on January 29, 2014 Permalink | Log in to Reply

        1) The widget block should be lower in the set of customizer components

        It currently uses the default priority of 10 from WP_Customize_Section but a different priority maybe supplied via the customizer_widgets_section_args filter. Is there a better default priority?

      • Weston Ruter 9:26 pm on January 29, 2014 Permalink | Log in to Reply

        2) When selecting a sidebar, it would be nice if it was highlighted.

        That’s a great point. I had considered that, but the problem is that there is not guaranteed to be a single element container for the widgets in a sidebar widget area. I suppose the highlight could be added to the element that is the common parent element to all of the widgets. Or all widgets in the area could be highlighted together.

      • Weston Ruter 9:31 pm on January 29, 2014 Permalink | Log in to Reply

        3) I think it might be nice to keep the highlighting of the selected widget so that the user can orient themselves when making adjustments

        ?

        Agreed. The red glow is more of a placeholder. @shaunandrews has done some very interesting work on the widget highlighting front. There is an open pull request that needs to further build upon his prototype, which involves an innovative use of canvas to fade-out other parts of the page: https://github.com/x-team/wp-widget-customizer/pull/16

        Also, something which will help orientation is making sure that the widget stays scrolled into view: https://github.com/x-team/wp-widget-customizer/issues/56

      • Weston Ruter 9:36 pm on January 29, 2014 Permalink | Log in to Reply

        4) I wonder if it would be better if there weren’t update buttons and instead the preview auto-refreshed like the other settings do.

        Yes, this is something we’ve discussed, and there is an issue open for it: https://github.com/x-team/wp-widget-customizer/issues/45

        The problem with this is that widget controls may vary well have form validation in place (e.g. the RSS widget) which will cause a error message to appear in the form if it gets submitted before all of the fields are populated. Also, the widget update handlers may do some processing on the instance data (e.g. sanitizing or reformatting), so the content the user entered into the field may come back different when the form is submitted.

        If such field-by-field live previews were to be supported, it would require an additional level of support from each of the widgets.

    • Rindy Portfolio 3:57 am on January 30, 2014 Permalink | Log in to Reply

      This is a great leap forward for the customizer. Nice work!

    • Patrick Hesselberg 11:22 pm on January 30, 2014 Permalink | Log in to Reply

      Looks very cool! Gettings my plugin ready for this update!
      http://wordpress.org/plugins/pco-image-widget-field/

    • Weston Ruter 12:43 am on January 31, 2014 Permalink | Log in to Reply

      Released 0.14 of Widget Customizer, adding keyboard-accessible widget reordering and moving widgets to other sidebars (#21) (props @michael-arestad). /cc @arush @jorbin @accessiblejoe

  • Andrew Nacin 7:47 pm on January 6, 2014 Permalink
    Tags:   

    Lots of improvements to Core Trac 

    Over the holidays, I was sick for two weeks (boo). While resting and recovering, I took to working on our tools (yay). Specifically, Trac. Here’s an overview of the added features, enhancements, and bug fixes. There’s a lot (and more on the way), so I’ll try to keep each point brief. If you have any questions I’d be happy to elaborate in the comments.
    (More …)

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel