WordPress.org

Make WordPress Core

Recent Updates Page 4 Toggle Comment Threads | Keyboard Shortcuts

  • Ella Iseulde Van Dorpe 2:14 am on April 23, 2015 Permalink |
    Tags: ,   

    TinyMCE views API improvements 

    In WordPress 4.2 there will be changes to the experimental TinyMCE views API. We don’t recommend this for use in production unless you closely follow the development.

    If you’re using it we’d love to get some feedback: bugs, suggestions, things you wish you could do with it… You’re also welcome to leave a comment with a link to your project. I’d love to know what kind of content you’re using it for and how you’re using it.

    Summary of the changes:

    • Simpler registration.
    • An easier way to update the view in the edit method.
    • You can choose to leave the text instead of replacing it with a loader. This is especially useful for our oEmbed views because we don’t know if the URL can be embedded until we get a response from the server.
    • You can now update the view text with a text of a different type (e.g. audio to playlist).
    • No need to use the setIframes method directly, render and setContent will handle it for you.
    • Already rendered views will never refresh again while editing other content. They do refresh when undoing or redoing things though, because TinyMCE resets the whole content unfortunately.
    • Options set in the match method (previously toView) will be added automatically to the view instance.
    • A couple of memory leaks were fixed and there’s a better way to bind and unbind views.
    • We added documentation for all the methods.

    How to use the API

    Registration:

    window.wp.mce.views.register( 'unique_name', {
    	...
    } );
    

    If you’re converting shortcodes to views, make sure unique_name is the same. They’ll be matched automatically. If you’re interested in custom matching, take a look at the embedURL registration in core.

    If the content of your view is static, you can set the content property directly, if it is dynamic, overwrite getContent. In most cases an ajax request is needed to generate the content, so use the initialize method and cache the content. Passing it through render will cache it automatically.

    This example will display the most recent images.

    initialize: function() {
    	var self = this;
    
    	wp.ajax.post( 'query-attachments', {
    		query: {
    			post_mime_type: 'image'
    		}
    	} )
    	.done( function( response ) {
    		self.render( _.map( response, function( data ) {
    			return '<img src=' + data.sizes.thumbnail.url + ' alt=' + data.alt + '>';
    		} ).join( '' ) );
    	} );
    }
    

    To add UI for editing a view, you need to add an edit method. This example is taken from the gallery view. Use the callback to update the view with the modified text (shortcode).

    edit: function( text, update ) {
    	var frame = wp.media.gallery.edit( text );
    
    	frame.state( 'gallery-edit' ).on( 'update', function( selection ) {
    		update( wp.media.gallery.shortcode( selection ).string() );
    	} );
    
    	frame.on( 'close', function() {
    		frame.detach();
    	} );
    }
    

    It is not recommended to run JavaScript in the editor iframe. If you need to run scripts it is best to use a sandbox iframe inside the view. The API will automatically do this for you if it detects scripts in your content. For example the Google Maps API might alter the editor’s iframe body. This is not acceptable because the body content is serialised by TinyMCE on saving.

    In this example the content will be put in an iframe and you can do anything you want in that document.

    content: [
    	'<script src="//maps.googleapis.com/maps/api/js?sensor=false"></script>',
    	'<style>img { max-width: none; }</style>',
    	'<div id="map" style="width: 100%;height: 500px;"></div>',
    	'<script>new google.maps.Map( document.getElementById( "map" ), { zoom: 0, center: new google.maps.LatLng( 0, 0 ) } )</script>'
    ].join( '' )
    

    If you do want to run scripts, use the bind and unbind methods and make sure there are no memory leaks.

     
  • Drew Jaynes 7:00 am on April 22, 2015 Permalink |
    Tags: , dry run   

    4.2 Release Dry Run 

    In preparation for a Thursday release, I’d like to do a dry run for 4.2 on Wednesday 15:00 UTC 2015.

    The goal would be to complete the dry run and freeze for about a day prior to release. We’ve pushed the scheduled release date by a day due to the 4.1.2 security release that went out on Tuesday morning.

    The dry run will include:

    • Testing various features, including Press This and the Customizer Theme Switcher
    • Generally testing the admin and common features using a multitude of devices and browsers, most notably mobile Safari on IOS and IE8
    • Running our usual unit tests including the specialty groups like multisite and AJAX
    • Doing scratch installs and upgrades from a variety of older versions

    If we’re satisfied with the results of the dry run, then we’ll freeze. If not, we’ll discuss our options and make a contingency plan going forward.

    If you’d like to help out and participate, we’d love to have you. Please come prepared to test!

     
  • Drew Jaynes 5:44 pm on April 21, 2015 Permalink |
    Tags:   

    4.2 Scrub 

    We’ll be scrubbing report 6 in the #core channel on Slack in about 20 minutes at Tuesday 18:00 UTC 2015. Join us!

    @azaozz @dd32 @nacin @helen @sergeybiryukov @ocean90 @wonderboymusic @mark @johnbillion @jorbin @boone @jeremyfelt @pento

     
  • Daniel Bachhuber 7:55 pm on April 20, 2015 Permalink |
    Tags: , ,   

    Shortcake (Shortcode UI) chat summary – April 20th, 2015 

    Present: @danielbachhuber, @matth_eu

    • Meeting focused on clearing up some of the remaining issues in the v0.3 milestone.
    • In v0.4, we’re looking into de-coupling Shortcake from the Media Library experience. If you have opinions on this regard, you should follow along on this issue
    • Matt has done some exploration of repeatable fields. The crux of the problem is our field templates include the field, and label and description. Fieldmanager and CMB use prototype HTML for repeatable fields. However, before we go about reinventing Fieldmanager, we should reach out to Metadata API working group to see how they’re approaching.
    • Supporting rich text editor for a shortcode attribute is a nice idea but has a couple fundamental flaws: 1) HTML can’t easily be stored in shortcode attributes, 2) TinyMCE views gets funky when there’s HTML in the inner_content. The idea needs more technical baking before we can commit it to a milestone.
    • Goal is to have remaining v0.3 issues into Fusion production by tomorrow morning PT, and then ship Wednesday or Thursday.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1429556549000347

    Next chat: same time and place

     
  • Drew Jaynes 3:48 pm on April 20, 2015 Permalink |
    Tags: ,   

    This Week in 4.2: April 20 – 26 

    This is the jump-start post for the fourteenth (and final!) week of the WordPress 4.2 release cycle.

    Last week, we tagged RC1 and “hard froze” strings. We’ll likely tag RC2 today as well. We’re still on track for releasing 4.2 this week.

    Core Meetings this week:

    Priorities this week:

    All commits in RC stages must be approved by at least one lead developer, preferably two.

    Please, if you’re patching open tickets, ensure you’ve provided enough context on tickets for your fixes to help out those leads who may be coming along to review them.

    As of Monday, there are 14 open tickets on report 6:

    • #31651 – Change Twemoji CDN to W.org – @pento
    • #31988 – TinyMCE: pasting an embeddable URL in Firefox doesn’t show preview – @azaozz
    • #24054 – (get_)comment_class() should include a is_user_member_of_blog() class – @jeremyfelt
    • #31669 – views improvements continued – @azaozz
    • #31890 – Link to existing content added in Text Editor disappear after switch to Visual editor and back – @azaozz
    • #31929 – 4.2 About Page
    • #31984 – Shiny Updates – some glitches – @jorbin
    • #31987 – Theme Customizer: Widget search field hidden in Safari – @helen
    • #32002 – Theme Switcher: Missing back button and marking active theme – @helen
    • #32004 – Audio/video list and gallery – date dropdown and message – @helen
    • #32006 – Problem with setting width and height of embedded media – @azaozz
    • #32007 – Twenty Fifteen: Image captions are shifted down in TinyMCE – @azaozz
    • #32022 – Press This: Margin is too big forcing wrapping on mobile – @azaozz
    • #32000 – Some translators comments – @SergeyBiryukov

    Recent notable updates:

     
  • Morgan Estes 12:43 pm on April 19, 2015 Permalink |
    Tags: ,   

    WordPress Core Weekly 

    Howdy! Sorry, I dropped the ball last week so this week’s Weekly Roundup is a double issue — it covers April 4, 2015 [32003] to April 18, 2015 [32140].

    This week marks the release of RC1, which is the first release that many plugin authors and beta testers will test heavily. If you don’t already, now is a good time to check out the Alpha/Beta forums for any issues that crop up during this testing cycle.

    We’re only days away from the release of 4.2; let’s finish strong! 🏃👏 Here’s the rundown of recent changes:

    TinyMCE

    • Update to 4.1.9+. Changes:
      • Fixed bug where extra empty paragraphs would get deleted in WebKit/Blink due to recent Quriks fix.
      • Fixed bug where the editor wouldn’t work properly on IE 12 due to some required browser sniffing.
      • Fixed bug where formatting shortcut keys where interfering with Mac OS X screenshot keys. [32058] #31895
    • Disable the wp-autoresize plugin in iOS. All iframes there are already expanded to the height of the content document. [32095] #31937
    • Update the “Keyboard Shortcuts” modal. [32060] #29558
    • Fix our shortcuts on Mac, use Ctrl + Opt + letter. [32059] #29558
    • Use window.twemoji directly in the wpemoji plugin. Gives a chance to the browser to lazy load twemoji.js when reloading the page. [32142] #31901
    • Remove the empty paragraph that sometimes is left over after adding an image caption. [32141] #32003

    wpView

    • Remove selected views when inserting content but not when loading all content, and remove the ref. to the selected view node on resetting the views. [32140] #31998
    • Resize sandbox iframes on load. [32056] #31480
    • Empty the content in the timeout, so it doesn’t render iframes twice. [32022] #31669

    Build/Test Tools

    • During PHPUnit tests, don’t autodetect permalink structure during WP installation. [32139] #31994
    • Move the built media JS files up a directory to their previous location and naming convention. [32125] #31912 (see [31373])
    • Don’t reference underscore.js source map. [32065] #31477

    General/Misc.

    • WordPress 4.2-RC1 [32137] [32138]
    • Use HTTPS URLs for codex.wordpress.org. [32116] #27115
    • Explain all placeholders in translator comment, not just the first one. [32111] #31675
    • Ensure post title input is not shortened for non-public post types. [32071] #30968
    • Improve handling of incomplete From and Content-Type headers in wp_mail(). [32070] #30266
    • wpLink: always show the URL field at the top. [32017] #28206
    • Force default avatar for HiDPI avatars on Discussion Settings. [32129] #31972

    Translation and Strings

    • Merge strings that describe the same command. [32078] #31776
    • Update placeholder for FTP credentials. [32077] #31922
    • After [31941], use the decoupled strings from wp-admin/network/themes.php in wp-admin/network/site-themes.php as well. [32029] #28502
    • Correct grammar when referring to “a user” vs “an user” in several places. [32025] #31894

    Administration

    Emoji and Smilies

    • Tweak which smiley matches which emoji. [32105] [32107] #31709
    • Update our few remaining smilies to better align with Twemoji, and add frownie.png until Twemoji provides a build containing it. [32104] #31709
    • The emoji JS files should be run through the script_loader_src filter, as they would be if they were registered scripts. [32097] #31938
    • Tidy up the wp_encode_emoji() regex, and clarify the function comment on Unicode 8 support. [32096]
    • Remove an errant / in Twemoji URLs. [32024] #31893
    • Remove executable bit from smilies. [32109] #31709

    Themes

    • Twenty Fourteen: update editor styles to better account for adaptive images in small screens. [32094] #31934
    • Twenty Fifteen: update editor styles to better account for adaptive images in small screens. [32090] #31934
    • Theme Compat: Make string translatable and add translator comments. Added in [31941]. [32084] #28502, #31921
    • Move initialization of $customizeSidebar to api.ThemesSection.initialize() to prevent cases where the result can be undefined. [32119] #31793
    • Translator comment should just reference placeholder numbers, not the actual placeholders. [32112] #31675
    • Tell developers how to correctly silence register_sidebar() notices. [32110] #31675

    Customizer

    Theme Switcher

    • Fix some esoteric breakage in iOS Safari. [32103] #31794
    • Don’t deactivate section on empty search results. [32083] #31889
    • Remove “Add New” reference from customize-controls.js. [32004] #31837
    • Use text input for the search field to prevent double tap issues for Preview and Customize buttons on iOS. [32127] #31794
    • Don’t re-render a theme control if it has already been rendered.
    • Lazy load theme screenshots. [32088] #31793
    • Fix tabbing order if section is open. [32087] #31289
    • Fix preview URL for subfolder installs. [32086] #31896

    Shiny Updates

    • Disable shiny updates from modal based on parent window [32082] #31739
    • Fix logic for details based shiny updates. [32080] #31739
    • Disable modal initiated shiny updates on wp-admin/update-core.php. [32067] #31739
    • Use dashes instead of dots as separator for jQuery events in shiny updates . is used for namespaces, so better to use dashes. [32063] #31819
    • Trigger events upon the completion of a shiny update. [32061] #31819
    • Remove Shiny Bulk Updates. Bulk updates don’t need to be ajaxified so let’s revert. [32053] #31770, #29820
    • Conditionally add AYS to leaving shiny updates. [32052] #31769
    • Enable users to initiate a shiny update from plugin detail modal. [32062] #31739

    Media

    • Don’t allow whitespace-only image captions from the Media modal. [32079] #21848
    • Fix focus and selected state for the selected attachments set. [32072] #31898
    • Rename get_media_embedded_in_content_allowed filter tomedia_embedded_in_content_allowed_types. [32113] #26675
    • Bring back spinners, now without bouncing select elements. [32101] #22839, #30725
    • Fix the media modal Insert into post button on narrow screens by limiting the width of .media-toolbar-primary and .media-toolbar-secondary only inside .attachments-browser (the top toolbar). [32121] #31908
    • Insert from URL: Make sure the link text is actually used. [32055] #29476
    • Make sure the spinner in the media modal is visible on narrow screens (without affecting the media grid). [32120] #30725

    Build Tools

    • Don’t override minified libraries included in core. [32066] #31477

    Docs

    • Remove unnecessary inline @see tags from a variety of parameter and return descriptions in wp-includes/wp-db.php. [32050] #31888
    • Remove unnecessary inline @see tags from the wpdb::process_field_charsets()DocBlock. [32049] #31888
    • Add a missing return description for has_header_image(). [32048] #31888
    • Fix a variety of inline documentation syntactical issues in wp-includes/taxonomy.php. [32047] #31888
    • Add a missing @access tag to the DocBlock for the WP_Meta_Query->$clauses property. Also adds a missing return description for WP_Meta_Query::get_clauses(). [32044] #31888
    • Add a variety of missing descriptions and fix syntax for wp_scripts(),_wp_scripts_maybe_doing_it_wrong(), and wp_script_add_data(). [32040] #31888
    • Remove an unnecessary inline @see tag and document the $wpdb global in two WP_Comment_Query methods. [32038] #31888
    • Add missing parameter and return descriptions to WP_Customize_Widgets->filter_customize_dynamic_setting_args(). [32036] #31888
    • Add parameter and return descriptions for WP_Customize_Widgets->get_setting_type(). [32035] #31888
    • Add missing @access tags to two DocBlocks in WP_Customize_Setting. [32034] #31888
    • Document the $theme property in WP_Customize_Themes_Section. Also adds a missing@access tag to the DocBlock for WP_Customize_Themes_Section->render(). [32033] #31888
    • Cleanup DocBlock syntax, add a missing parameter description for WP_Customize_Manager->set_post_value(). [32031] #31888
    • Add inline doc syntax fixes for WP_Customize_Manager->doing_ajax(). Also adds a return description. [32030] #31888
    • Add documentation for the $type and $theme properties in WP_Customize_Theme_Control. Also add some missing @access tags to various DocBlocks. [32028] #31888
    • Fix description alignment for the category_css_class filter docs. [32026] #31888
    • Add documentation for the $type, $mime_type, and $button_labels properties in WP_Customize_Media_Control. [32023] #31888
    • Clarify the DocBlock summary and parameter description forwp_edit_attachments_query_vars(). [32019] #31888
    • Add proper descriptions for the @global and @param tags in the wp_media_attach_action() DocBlock. [32018] #31888
    • Clarify the DocBlock description for wp_print_request_filesystem_credentials_modal(). [32016] #31888
    • Clarify 4.2.0 changelog entry, add global description to the DocBlock for WP_Users_List_Table->single_row(). [32015] #31888
    • Add missing @since versions from a variety of methods in WP_Press_This. [32014] #31888
    • Add missing DocBlocks for the _limit_array(), _limit_string(), _limit_url(),_limit_img(), _limit_embed(), and _process_meta_entry() utility methods in WP_Press_This. [32013] #31888
    • Add a return description to the DocBlock for WP_Posts_List_Table->is_base_request(). [32009] #31888
    • Add an @see mention for Plugin_Upgrader, plus spacing to the wp_ajax_update_plugin()delcaration. [32006] #31888
    • Add a more descriptive function summary for options_discussion_add_js(). [32005] #31888
    • Fix Docblock syntax for the taxonomy_parent_dropdown_args filter. [32003] #31888
    • Add a missing return description for wp_styles(). [32041] #31888
    • wp_install_maybe_enable_pretty_permalinks() should have a consistent @return value. [32027] #6481, #31888

    Help/About

    • All strings are available for translation. [32132] [32135] [32136] #31929
    • Change the subhead strings on credits.php and freedoms.php to match about.php.
    • Link the Emoji Codex article in the emoji blurb.
    • Add a second sentence to the JavaScript Accessibility blurb.
    • Switch positions for the JavaScript Accessibility and Complex Query Ordering sections for balance. [32131] #31929
    • Update about page for 4.2. [32118] [32123] [32130] #31929

    Upgrade/Install

    • Move wp-plugin-update-success event to after lock is released [32133] #31978, #31819
    • Use named function instead of anonymous function, making it testable and replaceable. [32126] #31964
    • When dbDelta() is checking whether an index is defined in a CREATE TABLE statement, don’t worry if MySQL has a subpart defined on an index, but the CREATE TABLE doesn’t. [32108] #31869

    Script Loader

    Press This

    • Do not show the bookmarklet upgrade notice when accessing directly press-this.php. [32122] #31968
    • Add mb_strlen() compatibility function. Works the same way as the existing mb_substr() compatibility function. [32114] #31951
    • Check the bookmarklet version and add the update notice from PHP. [32106] #31942
    • Add ARIA attributes to the alerts container. [32102] #31942
    • Fix focusing the Standard Editor link after saving draft, if the user has not focused another element. [32098] #31923
    • Change the link text to Standard Editor. [32093] #31923
    • When saving a draft change the text of the Save Draft button to “Saving…” [32092] #31923
    • Update documentation for press_this_save_redirect filter after [31992]. [32143] #31996

    Taxonomy

    • wp_update_term() should check if get_term() returned null. [32117] #31954
    • Avoid an unexpected object error when syncing global terms. Pass the expected single value, rather than object, when recursively calling global_terms(). [32064] #31914, #31149

    Editor

    Thanks to @adamsilverstein, @afercia, @awbauer, @azaozz, @boonebgorges, @DavidAnderson, @dimadin, @dlh, @DrewAPicture, @ericlewis, @hauvong, @helen, @hugobaeta, @iseulde, @jamescollins, @jeremyfelt, @joemcgill, @joen, @johnbillion, @jorbin, @kraftbj, @lancewillett, @markjaquith, @mattheu, @Michael-Arestad, @mindrun, @morganestes, @nacin, @nitkr, @obenland, @ocean90, @pavelevap, @pento, @peterwilsoncc, @samuelsidler, @SergeyBiryukov, @siobhan, @sirbrillig, @slobodanmanic, @swissspidy, @tmatsuur, @Tmeiste, @tyxla, @valendesigns, @westonruter, and @wonderboymusic for their contributions!

     
  • Drew Jaynes 8:00 pm on April 15, 2015 Permalink |
    Tags: ,   

    Dev Chat Agenda, April 15, 2015 

    Here’s the agenda for Wednesday’s Dev Chat in the #core channel on Slack.

    • RC1 was tagged just a little while ago, putting us back on trac for an April 22nd release.
    • We also entered hard string freeze today. All core and About string changes a frozen.
    • know!

    Time/Date: Wednesday 21:00 UTC 2015:

    Agenda

    1. Branching at RC1 – To do, or not to do it
    2. Since we just tagged RC1, Report 6 is pretty empty. What are any outstanding issues?
    3. Test test test!
    4. 4.2 Release Progress
      • Beta 1
        • Punt/convert all non-essential enhancements to tasks
      • Beta 2 (120 tickets on Report 6)
        • Get first run of FTP credentials modal in trunk
      • Beta 3 (90 tickets on Report 6)
        • Start finishing up tickets with string changes
        • Start About page
      • Beta 4 (50 tickets on Report 6)
        • Soft string freeze (all string changes completed save for the About page)
        • Start finishing up the About page
      • RC 1 (0 tickets on Report 6)
        • About page string finished
        • Hard string freeze
      • Release (0 tickets on Report 6)
        • About page finished
        • Remaining issues resolved
     
  • Joe Dolson 6:15 pm on April 15, 2015 Permalink |
    Tags: ,   

    Letting WordPress Speak: New accessibility feature in 4.2 

    One new accessibility feature in WordPress 4.2 is the new JavaScript method wp.a11y.speak(). The essence of this feature is to provide a consistent methodology for announcing dynamic JavaScript updates to assistive technology. For more information about how this works, why it exists, and how to use it, read the complete post at Make/Accessibility.

     
  • Daniel Bachhuber 10:59 pm on April 13, 2015 Permalink |
    Tags: , ,   

    Shortcake (Shortcode UI) chat summary – April 13th, 2015 

    Present: @danielbachhuber, @matth_eu

    • Not much development done in the past week.
    • Discussed HTML in our `description` attribute. User goal is to be able to use arbitrary formatting HTML in a field’s description. However, Underscores permits either no HTML or any HTML. It would be nice if we could use `$allowedposttags` or similar. Matt will be doing some research for any prior art.
    • Discussed whether we should use `switchEditors._wp_Nop` or roll our own. Matt will reach out to core to see why it’s private in the first place.
    • All of the issues in v0.3 have been assigned. By next Monday, we’ll be making the release decision. Code will be shipped to Fusion production throughout the week.

    Logs: https://wordpress.slack.com/archives/feature-shortcode/p1428951753000191

    Next chat: same time and place.

     
  • Drew Jaynes 10:00 am on April 13, 2015 Permalink |
    Tags: ,   

    This Week in 4.2: April 13 – 19 

    This is the jump-start post for the thirteenth week of the WordPress 4.2 release cycle.

    Last week, we missed tagging RC1 after losing momentum on our ticket goals toward the end of the week. We also missed hitting the “hard” string freeze.

    Core Meetings this week:

    Priorities this week:

    Committers: please follow up on any tickets you own. We’re running out of time to hit our release date goal. We need to freeze strings and actually tag RC1, in that order, as soon as possible

    Remaining tickets on Report 6 that must be closed or punted to tag RC1 are as follows:

    • #26111wp_localize_script array from callback for performance
      The recommendation is for @wonderboymusic to revert [31030] and [31033] and regroup in 4.3.
    • #31793Theme Switcher: Lazy load theme screenshots
      Waiting for a followup from @westonruter on the latest patch
    • #30725Add media modal – different select width
      Looking for direction from @helen on what an MVP fix would look like
    • #31794Theme Switcher: Improve mobile experience
      Latest patch needs to be reviewed and committed, and we should decide if the rest is worth tackling in 4.2.
    • #31908Insert into post button runs off the side of the screen on small devices
      The recommendation is to commit the latest patch and handle #30725 following that
    • #31912Media splitting: don’t copy the media folder to the build directory
      The latest patch from @ocean90 needs to be reviewed and committed by either @wonderboymusic or @jorbin
    • #319294.2 About Page
      The initial patch needs to be committed so we can keep design separate from content. The About page strings need to be finalized in order to institute “hard” string freeze. @melchoyce and @ryelle are in the process of engineering and designing around the content

    Recent notable updates:

     
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
Skip to toolbar