WordPress.org

Ready to get started?Download WordPress

Make WordPress Core

Welcome to the official blog of the core development team for the WordPress open source project.

Here, we make WordPress core. Follow our progress with general updates, status reports, and the occasional code debate.

We’d love for you to help out.

Looking to file a bug?

It’s easy to create a ticket on our bug tracker.

Want to contribute?

Get started quickly. We have some tickets marked as good first bugs for new contributors. There’s more on our reports page, like patches needing testing.

We also have a detailed handbook for contributors, complete with tutorials.

Weekly meetings

We use Slack for real-time communication. As contributors live all over the world, there are discussions happening at all hours of the day.

We have a project meeting every Wednesday at 20:00 UTC in the #core channel on Slack. (Find out more about Slack.)

You can find meeting agendas on this blog. You’re welcome to join us or listen in.

Recent Updates Toggle Comment Threads | Keyboard Shortcuts

  • Konstantin Obenland 10:57 pm on October 29, 2014 Permalink | Log in to leave a Comment
    Tags: , ,   

    Title Tags in 4.1 

    For over three years we have been trying to make it easier for plugins and themes to manage the document title. Kubrick didn’t necessarily set a great example to theme authors by appending the blog name to wp_title(), a practice we have been trying to correct ever since.

    #18548 was created to find a solution to that problem, but after initial excitement hasn’t seen any noteworthy action until a few weeks ago. Yesterday @johnbillion committed a first step towards a brighter future in [30074], introducing a forward compatible way to make document titles fully customizable.

    Adding titles to themes

    Starting with 4.1 and Twenty Fifteen, the recommended way for themes to display titles is by adding theme support like this:

    function theme_slug_setup() {
       add_theme_support( 'title-tag' );
    }
    add_action( 'after_setup_theme', 'theme_slug_setup' );
    

    Support should be added on the after_setup_theme or init action, but no later than that. It does not accept any further arguments.

    By declaring support like this, themes acknowledge that they are not defining titles on their own and WordPress can add it safely without duplication.

    To maintain full forward compatibility, plugins can not check for theme support of title tags, and are discouraged from building functionality around it just yet. The long term plan is to enable users to manage document titles from their admin, independent of which theme they’re using. At that time it will also become more plugin friendly. To make sure this can be achieved however, it was important to rule out backwards compatibility concerns as much as possible.

    While there is no consensus on how the final implementation will look like yet, this should be a good way to get themes started to opt into a more user friendly way. It will also make any future changes that much more impactful when the final version ships.

    Backwards compatibility

    To enable support in existing themes without breaking backwards compatibility, theme authors can check if the callback function exists, and add a shiv in case it does not:

    if ( ! function_exists( '_wp_render_title_tag' ) ) :
    function theme_slug_render_title() {
    	echo '<title>' . wp_title( '|', false, 'right' ) . "</title>\n";
    }
    add_action( 'wp_head', 'theme_slug_render_title' );
    endif;
    

    This would also be the place to optionally add a filter to enhance the document title, along the lines of what recent default themes have been doing.

     
  • Pascal Birchler 8:21 pm on October 29, 2014 Permalink | Log in to leave a Comment
    Tags:   

    WordPress Core Weekly 

    Hi everyone!

    It’s this time of the week again: WordPress Core Weekly is here. This updates covers all commits since last week up to to today, October 29th.

    In case you missed it, the new default theme, Twenty Fifteen, is coming along very well, the feature plugins planned for 4.1 are being tested extensively and the Customizer JavaScript API is getting more and more complete.

    But there are many more things going on behind the scenes and Core has even passed revision [30,000]! Let’s have a look at this week:

    Admin

    • Add labels to the Personal Options input fields on the user profile editing screen. [30027] #30101
    • Editor: Use <button> instead of <a> for the Visual/Text buttons, make them focusable. [30002] #27553
    • Customizer: Add the ability for a customizer control to render its controls via a JavaScript template. Switches the default color picker control to a JavaScript template. [30014] #29572

    Themes

    • Twenty Fifteen: If the sidebar is taller than the viewport scroll it with the content, if it’s shorter keep it fixed. [30025] #29979
    • Introduce a new means of outputting a <title> tag in the theme head. Requires a theme to add support by calling add_theme_support( 'title-tag' ). [30074] #18548
    • Introduce some new template functions for navigation [30065] #29808
      • get_the_post_navigation() and the_post_navigation() for navigation to the next and previous post.
      • get_the_posts_navigation() and the_posts_navigation() for navigation to the next and previous page of posts.
      • get_the_pagination() and the_pagination() for paginated navigation between pages of posts.
      • Uses paginate_links(). This reduces the need for themes to define their own sets of navigation functions.

    Internals

    • Deprecate admin_created_user_subject() [30005] #29915
    • Introduce an edit_form_before_permalink action which gets fired after the title field but before the permalink fields. [30028] #29691
    • In wp_link_pages(), only output link separators between actual pagination links. [30030] #24940
    • Rename _wp_password_hint() to _wp_get_password_hint() to bring it inline with core terminology. [30033] #21243
    • Don’t add sticky class in get_post_class() if ignore_sticky_posts query var is set. [30036] #18035
    • Don’t display Standard post format twice in the meta box if the theme unnecessarily mentions it in the add_theme_support() call. [30038] #16555
    • Add comment_reply_link_args filter for get_comment_reply_link() arguments. [30039] #10569
    • Allow slug param of get_terms() to accept an array. [30042] #23636
    • Introduce orderby=include support for get_terms(). [30052] #23261
    • Remove UNIQUE key from slug column of terms table. [30056] #22023
    • Add wp_json_encode(), a wrapper for json_encode() that ensures everything is converted to UTF-8. Change all core calls from json_encode() to wp_json_encode(). [30055] #28786
    • Introduce wp_is_trusted_network(). A first step to establish concepts around trusted and untrusted networks. [30071] #30145
    • Don’t hardcode height for videos – this was a workaround for MediaElement internals causing problems. Responsive videos now work properly and don’t cause extra whitespace. [30082] #30078
    • Introduce some actions and filters which aid plugins in revisioning post meta. [30091] #20564

    Queries

    • Allow ORDER BY in WP_Comment_Query::query() to be disabled. [30004] #29902 DisableORDER BY by passing boolean false, an empty array, or the string none to the orderbyparameter. This mirrors the behavior of WP_Query.
    • Accept orderby=include in WP_User_Query. [30016] #30064 This lets the results of a user query be sorted manually by the value of the include param.
    • Fix count in WP_Comment_Query when using meta_query. [30026] #23369
    • Optimize site query when performing network database upgrades [30029] #30097
    • Improve WP_Tax_Query param sanitization for empty strings. [30031] #30117
    • Support multiple status values in WP_Comment_Query. [30084] #29612

    Thanks to @peterwilsoncc, @iamtakashi, @nacin, @mnelson4, @afercia, @psycleuk, @rianrietveld, @davidakennedy, @celloexpressions, @DrewAPicture, @jipmoors, @ipm-frommen, @mattwiebe, @avryl, @heshiming, @desaiuditd, @ankit-k-gupta, @captaintheme, @marcosf, @obenland, @tmtrademark, @briandichiara, @tareq1988, @jakub.tyrcha, @johneckman, @kosvrouvas, @ptahdunbar, @nacin, @pushplaybang, @joedolson, @aaroncampbell, @jfarthing84, @dlh, @danielbachhuber, @wpsmith, @hotchkissconsulting, @JustinSainton, @jwenerd, @wonderboymusic, @tollmanz, @chrisbliss18, @joostdevalk, @TobiasBg, @nofearinc, @karpstrucking, @ebinnion, @boonebgorges, @mattheu, @adamsilverstein, @momo360modena, @tareq1988 for their core contributions!

    Revisions covered: [29995] to [30093]. For the complete list of commits to trunk, check out the log on Trac.

    Interested in joining in? Write or test a patch for 4.1.

     
  • John Blackbourn 12:24 am on October 29, 2014 Permalink | Log in to leave a Comment
    Tags: , slack   

    Modernising our real-time communication 

    The WordPress project is testing out Slack as our main real-time communication platform, replacing IRC and ad hoc Skype chats.

    chat.wordpress.org is our new information hub for Slack. All wordpress.org users will be able to access WordPress Slack with immediate effect.

    This change was announced by Matt during his State Of The Word presentation at WordCamp San Francisco this weekend, and was overwhelmingly positively received. In fact, it was so well received that this week’s dev chat (October 29 2014 20:00 UTC) will be hosted in the WordPress #core channel on Slack, rather than in the #wordpress-dev channel on IRC.

    There will be volunteers hanging out in #wordpress-dev to inform users that the dev chat has moved to Slack. For those of you who don’t want to leave IRC just yet, you can connect to WordPress Slack using the IRC gateway.

    The #core and #announcements channels on Slack have just surpassed 1,000 users, which is five times as many as we’ve ever had in the channels on IRC. Join us at chat.wordpress.org!

     
  • Ian Stewart 5:52 pm on October 28, 2014 Permalink | Log in to leave a Comment  

    Twenty Fifteen Chat Summary October 28 

    Notes for our weekly chat about Twenty Fifteen:

    Twenty Fifteen continues to feel pretty robust — thanks to everyone who’s been testing the theme, reporting bugs, and contributing to patches with code or comments. We’re in good shape.

    The biggest change in the past week for a lot of people will have been the closing of #29979. Scrollbar is no longer a plural in Twenty Fifteen. :)

    We’ve also had lots of great accessibility improvements.

    In todays weekly chat we reviewed the remaining tickets for the theme. We’ve entered a phase of cleanup and nice-to-haves, with one remaining blocker, activation in older versions of WordPress. We’ll follow the lead of previous default themes with a back compat check.

    Customizer-related tickets that could use more eyes:

     
  • Aaron Jorbin 4:50 pm on October 28, 2014 Permalink | Log in to leave a Comment
    Tags: ,   

    WordCamp San Francisco User Testing Results 

    WordCamp San Francisco, @johnbillion and I conducted some user tests.  We focused on three feature plugins planned for 4.1: Focus, Author Select, Session Manager.  When possible, we created an editor account for users and had them participate on there own device.  When they didn’t have a device, they participated on one of our laptops.

    Below are the notes.

    Dan – developer. using a macbook

    “Wow” was first reaction to focus. Kind of felt like it was shocking and he needed some frame of reference. Maybe keep 5px or so of menu so you know you can go back to it. Fading of buttons kind of make it feel like they are disabled.
    Author select – Immediately knew what to do. super natural
    “Where are you logged in” – knew to go to profile page, found the panel right away.

    Michelle – designer/developer. using a macbook

    It’s disconcerting not to see all the things. “If the point of things is to be distraction free, it’s weird not to see publish since that is what people want to do”. Fading of buttons seems a bit weird. Not sure she like automatically going into distraction free. It’s jarring.
    Author select -didn’t search, just selected.

    Janneke – Developer. using an iPad mini

    Author select on iPad mini – Super hard to use. Can’t really scroll down. Not at all intuitive.
    Profile manager – Looks horrible on iPad mini
    Focus – She is building it, so I didn’t test it :)

    Josh – Developer. using a macbook

    Likes not having the sidebar menu. Losing the meta boxes seems odd. Might be weird for some people.
    Author select. Select 2. Using display name instead of user name. Seems odd.
    First looked to tools to find where he was logged in.

    Joe – Developer. using a macbook

    Lag on the editor screen makes things feel slow and confusing.
    Author – Not used to to having it enabled by default is different. Seems to be able to use

    Cory – WP business owner. using his macbook

    Loves the focus. Seems super natural.
    Author – Very usable.
    Profile – Didn’t quite understand question at first, but once he did, made it and found that info right away.

    Mel – designer. using our laptop

    Focus – It’s weird that it’s not centered. Less things on the page makes it harder to focus.
    Author – “I heart Select2″

    Jen –  Freelance writer and photographer. Has her own blog, using a MacBook.

    Initially wasn’t enthusiastic about the fact that the meta boxes and menu disappeared, “oh, what’s going on?”. Was confused about how to get them to re-appear, erroneously clicked an unrelated button in the browser in an attempt to get the UI to reappear. After figuring out that the UI re-appears when you move your mouse or tab away, actually very much liked the behaviour.

    I mentioned that we were considering adding a feature pointer pointing to the DFW button. Jen said she thinks this will be important. User has no other idea of what’s going on otherwise.

    Couldn’t find where the user sessions may be listed. Mentioned that she is the only user on her site so she would have no interest in it. Expected it to be on the dashboard, or on the same screen as Jetpack analytics.

    Christen –  blogger

    “Create a new post” – First went to quick draft. When I sent her to the regular draft screen, it seemed natural to her. She liked the “Distraction free writing”. It felt natural to her. Once it was in place though, she didn’t really look for anything else on the page.

    Andre – Theme Builder. Design and build.

    Focus Was natural. Really liked and it seemed 100% natural to him.
    Author – Select two was a natural choice and he really likes it.
    Went to tools page to find sessions.

    Matt – developer and project manager

    Not enthusiastic about using the editor focus improvements himself, but said he would leave it enabled for his clients who write more long form content than he does. Suggested that some form of A/B testing may be desirable if we have the time. No other feedback.

    User session list will be of interest to him as a project/site manager, not so much use to his clients themselves. Suggested that we could implement a dashboard widget which displayed the “last accessed” time for the current user, or listed other current sessions if there is more than one. Also suggested adding an “active sessions” column to the user list screen, visible to site admins.

     
  • Weston Ruter 4:46 am on October 27, 2014 Permalink | Log in to leave a Comment
    Tags: , customizer, , widget-customizer   

    Toward a Complete JavaScript API for the Customizer 

    The Customizer is the first true JS-driven feature in core. That’s awesome, especially coming out of WCSF where JavaScript has been highlighted so prominently between Backbone.js, the WP REST API, Node.js, and socket.io. The Customizer has a great architecture with models for settings, controls, watchable-values, collections, events, and asynchronous callbacks. Nevertheless, the JavaScript API in the Customizer is incomplete.

    Existing Challenges

    When widgets were added to the Customizer in 3.9, adding widget controls to sidebar sections required direct DOM manipulation. For controls there is at least a Control model to manage state For sections and panels, however, there are no JS models at all, and so adding them dynamically is even more of a challenge. And this is the exact challenge that Nick Halsey’s Menu Customizer plugin currently has to struggle through.

    When Customizer panels were added in 4.0 to group all widget area sections into a “Widgets” panel, a bug was introduced whereby shift-clicking a widget in the preview no longer revealed the widget control in the Customizer pane because the sections were inside of the collapsed Widgets panel: there were no models to represent the state for whether or not a panel or section were currently expanded. Without models, a fix of this would require more messy DOM traversal to check if parent accordion sections were expanded or not. Storing data in the DOM is bad.

    In 4.0 the concept of contextual controls were added to the Customizer. This allowed controls to be registered with an active_callback, such as is_front_page, which the preview would execute and pass back up to the Customizer pane to then show/hide the control based on which URL was being previewed. This worked well, except when all controls in a section were inactive: then the result was a Customizer section without any visible controls. Instead, the expected behavior would be for the section to automatically collapse as well when all controls inside become inactive. Again, this problem stems from the fact that there is no JS model to represent a section and to list out the controls associated with it.

    For the past three weeks I’ve been focused on fleshing out the Customizer API to address these challenges, and to facilitate doing new dynamic things in the Customizer. The parent ticket for this is #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels.

    Models for Panels and Sections

    As noted above, there is a wp.customize.Control model, and then there is a wp.customize.control collection (yes, it is singular) to store all control instances. So to follow the pattern established by controls, in the patch there is a wp.customize.Panel and wp.customize.Section, along with wp.customize.panel and wp.customize.section collections (both singular again). So just as with controls, you can iterate over panels and sections via:

    wp.customize.panel.each( function ( panel ) { /* ... */ } );
    wp.customize.section.each( function ( section ) { /* ... */ } );
    

    Relating Controls, Sections, and Panels together

    When registering a new control in PHP, you pass in the parent section ID:

    $wp_customize->add_control( 'blogname', array(
    	'label' => __( 'Site Title' ),
    	'section' => 'title_tagline',
    ) );

    In the proposed JavaScript API, a control’s section can be obtained predictably:

    id = wp.customize.control( 'blogname' ).section(); // => title_tagline

    To get the section object from the ID, you just look up the section by the ID as normal: wp.customize.section( id ).

    You can move a control to another section using this section state as well, here moving it to the Navigation section:

    wp.customize.control( 'blogname' ).section( 'nav' );

    Likewise, you can get a section’s panel ID in the same way:

    id = wp.customize.section( 'sidebar-widgets-sidebar-1' ).panel(); // => widgets

    You can go the other way as well, to get the children of panels and sections:

    sections = wp.customize.panel( 'widgets' ).sections();
    controls = wp.customize.section( 'title_tagline' ).controls();
    

    You can use these to move all controls from one section to another:

    _.each( wp.customize.section( 'title_tagline' ).controls(), function ( control ) {
    	control.section( 'nav' );
    });
    

    Contextual Panels and Sections

    Also just as with controls, when you invoke $wp_customize->add_section() you can pass an active_callback param to indicate whether the section is relevant to the currently-previewed URL; the same goes for panels. A good example of a contextual section is only showing the “Static Front Page” section if the preview is currently on the front-page:

    function contextual_static_front_page_section( $wp_customize ) {
    	$wp_customize->get_section( 'static_front_page' )->active_callback = 'is_front_page';
    }
    add_action( 'customize_register', 'contextual_static_front_page_section', 11 );

    Nevertheless, this will not usually be needed because a section inherits its active state from its control children (and a panel inherits from its section children), via the new isContextuallyActive() method. If all controls within a section become inactive, then the section will automatically become inactive.

    As with controls, Panel and Section instances have an active state (a wp.customize.Value instance). When the active state changes, the panel, section, and control instances invoke their respective onChangeActive method, which by default slides the container element up and down, if false and true respectively. There are also activate() and deactivate() methods now for manipulating this active state, for panels, sections, and controls:

    wp.customize.section( 'nav' ).deactivate(); // slide up
    wp.customize.section( 'nav' ).activate({ duration: 1000 }); // slide down slowly
    wp.customize.section( 'colors' ).deactivate({ duration: 0 }); // hide immediately
    wp.customize.section( 'nav' ).deactivate({ completeCallback: function () {
    	wp.customize.section( 'colors' ).activate(); // show after nav hides completely
    } });
    

    Note that manually changing the active state would only stick until the preview refreshes or loads another URL. The activate()/deactivate() methods are designed to follow the pattern of the new expanded state.

    Expanded State

    As noted above, in 4.0 when panels were introduced, a bug was introduced whereby shift-clicking a widget in the preview fails to show the widget control if the Widgets panel is not already open. With the proposed changes, panels, sections, and (widget) controls have an expanded state (another wp.customize.Value instance). When the state changes, the onChangeExpanded method is called which by will handle Panels sliding in and out, and sections sliding up and down (and widget controls up and down, as they are like sections). So now when a widget control needs to be shown, the control’s section and panel can simply have their expanded state to true in order to reveal the control. Expanding a section automatically expands its parent panel. Expanding a widget control, automatically expands its containing section and that section’s panel.

    As with activate()/deactivate() to manage the active state, there are expand() and collapse() methods to manage the expanded state. These methods also take a similar params object, including duration and completeCallback. The params object for Section.expand() accepts an additional parameter “allowMultiple” to facilitate dragging widget controls between sidebar sections. By default expanding one section will automatically collapse all other open sections, and so this param overrides that. You can use this, for instance, to expand all sections at once so you can see all controls without having to click to reveal each accordion section one by one:

    wp.customize.section.each(function ( section ) {
    	if ( ! section.panel() ) {
    		section.expand({ allowMultiple: true });
    	}
    });

    Focusing

    Building upon the expand()/collapse() methods for panels, sections, and controls, these models also support a focus() method which not only expands all of the necessary element, but also scrolls the target container into view and puts the browser focus on the first focusable element in the container. For instance, to expand the “Static Front Page” section and focus on select dropdown for the “Front page”:

    wp.customize.control( 'page_on_front' ).focus()

    This naturally fixes the #29529, mentioned above.

    The focus functionality is used to implement autofocus: deep-linking to panels, sections, and controls inside of the customizer. Consider these URLs:

    • …/wp-admin/customize.php?autofocus[panel]=widgets
    • …/wp-admin/customize.php?autofocus[section]=colors
    • …/wp-admin/customize.php?autofocus[control]=blogname

    This can be used to add a link on the widgets admin page to link directly to the widgets panel within the Customizer.

    Priorities

    When registering a panel, section, or control in PHP, you can supply a priority parameter. This value is now stored in a wp.customize.Value instance for each respective Panel, Section, and Control instance. For example, you can obtain the priority for the widgets panel via:

    priority = wp.customize.panel( 'widgets' ).priority(); // => 110

    You can then dynamically change the priority and the Customizer panel will automatically re-arrange to reflect the new priorities:

    wp.customize.panel( 'widgets' ).priority( 1 ); // move Widgets to the top

    Custom types for Panels and Sections

    Just as Customizer controls can have custom types (ColorControlImageControlHeaderControl…) which have custom behaviors in JS:

    wp.customize.controlConstructor.FooControl = wp.customize.Control.extend({ /*...*/ });

    So too can Panels and Sections have custom behaviors in the proposed changes. A type parameter can be passed when creating a Panel or Section, and then in JavaScript a constructor corresponding to that type can be registered. For instance:

    PHP:

    add_action( 'customize_register', function ( $wp_customize ) {
    	class WP_Customize_Harlem_Shake_Section extends WP_Customize_Section {
    		public $type = 'HarlemShake';
    	}
    	$section = new WP_Customize_Harlem_Shake_Section(
    		$wp_customize,
    		'harlem_shake',
    		array( 'title' => __( 'Harlem Shake' ) )
    	);
    	$wp_customize->add_section( $section );
    	$wp_customize->add_setting( 'harlem_shake_countdown', array(
    		'default' => 15,
    	));
    	$wp_customize->add_control( 'harlem_shake_countdown', array(
    		'label' => __( 'Countdown' ),
    		'section' => 'harlem_shake',
    		'setting' => 'harlem_shake_countdown',
    		'type' => 'number',
    	));
    });
    

    JS:

    wp.customize.sectionConstructor.HarlemShake = wp.customize.Section.extend({
    	shake: function () {
    		// This can be invoked via wp.customize.section( 'harlem_shake' ).shake();
    		console.info( 'SHAKE!!' );
    	}
    });

    Next Steps

    • Continue discussion on parent ticket #28709: Improve/introduce Customizer JS models for Controls, Sections, and Panels.
    • Review JavaScript changes in pull request. Anyone is free to open a PR to onto the existing branch on GitHub to make changes. Props to Ryan Kienstra (@ryankienstra) and Nick Halsey (@celloexpressions) for their contributions.
    • Update logic for adding widget controls to use new API (adding widgets is using the old pseudo-API and it is currently broken); allow controls to be added manually.
    • Work with Nick Halsey to make sure that dynamically-created sections and controls suit the needs of Menu Customizer, and make sure that it works for other plugins like Customize Posts.
    • Build upon the initial QUnit tests to add coverage for existing JS API and newly added API (#28579).
    • Harden the logic for animating the Customizer panel into view.
    • Get feedback from other Core devs and get initial patch committed.

    Thanks to Nick Halsey (@celloexpressions) for his proofreading and feedback on the drafts of this blog post.

     
    • nikeo 6:38 am on October 27, 2014 Permalink | Log in to Reply

      Really awesome improvements! This customizer JS API is sooo currently missing in core!
      Thanks

    • Fab1en 9:09 am on October 27, 2014 Permalink | Log in to Reply

      This new API sounds great ! Thanks a lot for this great work.

      I’m wondering if it will be sufficient for my use case : I’m currently using the customizer to customize each posts that appear on the front page. In the same way widgets can be selected on the preview side by a simple click, clicking on a post on my theme preview will reveal the editing panel on the customizer side.

      I’m facing two issues to implement this properly :

      1 During the control creation JS callback, I have to wait until the preview loading is complete to bind the events. There is no event that tells me the preview is loaded and the iframe DOM is ready. Here is my implementation :

      (function( exports, $ ){
      	var api = wp.customize;
      
      	api.controlConstructor.myCustomControl = api.Control.extend({
      		ready: function() {
      			var control = this;
      
      			// wait for the preview iframe to be ready
      			var timer = setInterval(function(){
      				if(control.previewer.preview && control.previewer.preview.iframe && control.previewer.preview.iframe[0].contentDocument) {
      					clearInterval(timer);
      
      					// get iframe document
      					var doc = control.previewer.preview.iframe[0].contentDocument;
      
      					// bind events using doc
      				}
      			}, 200);
      
      		}
      	});
      
      })( wp, jQuery );

      Am I missing something ?

      2 To open the correct customizer section, I need to parse the customiser panel DOM :

      var $section = control.container.closest('.accordion-section');
      if(!$section.hasClass('open')){
      	$section.find('h3').click();
      }

      For this one, I think your API can solve my issue :

      wp.customize.section(control.section()).expand()

      But would not it be simpler to get the section model directly from the control ?

      control.section.expand()

    • Ryan Kienstra 5:18 am on October 28, 2014 Permalink | Log in to Reply

      Dear Fab1en,
      Regarding your second question, you only need to call .expand() on the control instance.

      This will expand the control and its containing section.

      For example, to expand the header image:

      var headerImageControl = wp.customize.control.instance( 'header_image' );
      headerImageControl.expand();

      You could also use .focus() instead of .expand() This will expand it and scroll it to the top.

  • Aaron Jorbin 5:26 pm on October 24, 2014 Permalink | Log in to leave a Comment
    Tags:   

    Feature Testing at WordCamp San Francisco 

    Getting feedback from real users is incredibly valuable, and WCSF occurs at a great time in the 4.1 dev cycle to do that. We will have a space next to the happiness bar to solicit feedback on upcoming features. In order to accomplish this, if you will be at WordCamp SF this weekend and want to get feedback on a feature that you are working on, please comment below.

    I will setup some test sites with trunk and the trunk version of the feature plugins (along with some test data) to help expedite this. The plugins I am planning on having are:

    https://github.com/johnbillion/wp-session-manager

    https://github.com/avryl/focus

    https://github.com/helenhousandi/wp-19867-9864/tree/select2-19867

    If you can help with staffing this area, please comment below.

     
    • Drew Jaynes (DrewAPicture) 5:33 pm on October 24, 2014 Permalink | Log in to Reply

      I’m in to help test for a while.

    • Daniel Bachhuber 6:08 pm on October 24, 2014 Permalink | Log in to Reply

      I’ll co-opt people who come to visit me at the Happiness Bar to do some testing.

    • Janneke 6:14 pm on October 24, 2014 Permalink | Log in to Reply

      I can help too.

    • Ipstenu (Mika Epstein) 10:59 pm on October 24, 2014 Permalink | Log in to Reply

      I can help

    • Luke Carbis 1:35 pm on October 25, 2014 Permalink | Log in to Reply

      Happy to help staff the area. @lukecarbis

    • Nick Halsey 5:38 pm on October 25, 2014 Permalink | Log in to Reply

      I’m not there, but it would be cool if you have enough interest to test some of the non-4.1 plugins like the Front End Editor and Menu Customizer as well.

    • Ryan Boren 11:40 pm on October 26, 2014 Permalink | Log in to Reply

      Feature plugins should be updated every week in the plugin repo (every day would be even better). With the beta tester plugin, auto updating to each nightly is effortless. Following feature plugin development should be as convenient.

      • Knut Sparhell 1:57 am on October 28, 2014 Permalink | Log in to Reply

        I have the beta tester plugin, but not Twenty Fifteen. I have the session management plugin from Github, but not a one click update for it. I’m the dog and wordpress.org is the dogfood here.

    • Ryan Boren 1:02 am on October 27, 2014 Permalink | Log in to Reply

      Instead of just testing new stuff, have them show how they usually work. Capture real flows. Be an Alan Lomax of flow. Seeing how people work with and around our interfaces is very interesting. For example, Android users use the Android sharing mechanism to push images to the media library through the Android app. Later, they create galleries from wp-admin on the desktop. Why? Because creating galleries is impossible in the apps and painful on the mobile web due to things like lack of multi-select and aggravating tab switching in the media modal. Another example, some use upload.php to edit image meta because they can’t use the small input fields in the sidebar of the media modal. Those are revealing flows.

  • Pascal Birchler 10:31 am on October 23, 2014 Permalink | Log in to leave a Comment
    Tags:   

    WordPress Core Weekly 

    Hi everyone!

    It’s this time of the week again: WordPress Core Weekly is here. This updates covers all commits since last week up to today, October 23rd.

    In case you missed it, there has been quite some activity here. I recommend you to check out these great summaries from this week to stay up-to-date:

    Now, let’s have a look at the recent comments!

    Admin

    • Themes: Make “Live Preview” the primary action and “Activate” secondary. [29957] #26899
    • Themes: Fix some theme install stylings [29959] #28148 #29556
    • Live-update site title in toolbar when changing the corresponding field in General Settings. [29963] #28682
    • Allow apostrophes in email addresses when adding users via the Dashboard. [29966] #18039
    • Admin menu changes [29978] #29806
      • Fix scrolling the pinned menu with a mouse wheel.
      • Fix pinning when the menu is only slightly taller than the viewport.
      • Disable pinning on IE8, updating CSS top makes it jump when scrolling with a mouse wheel.

    Customizer

    • Introduce customize_preview_$setting->type action to handle multiple settings of the same type. [29948] #29165
    • Extract content markup for panels to its own method,WP_Customize_Panel::render_content(). This allows to override the behavior of a panel and its contents. [29950] #29324

    Editor

    • Editor-expand [29929] #29954
      • Better calculation for the caret position when auto-scrolling while typing.
      • Fix auto-scrolling for non-WebKit browsers when the caret is above the top of the editor.
    • TinyMCE: update the default styles: make the font size larger and make it the same size in tables. [29986] #30038
    • TinyMCE: update to 4.1.6+. Adds support for cache-busting when auto-loading JS and CSS. [29994] #30079

    Twenty Fifteen

    • Make font-size/line-height in editor-style.css the same as in style.css. Remove margins from the editor body, interferes with autoresize in some browsers and is overriden in the default styles. [29909] #29799
    • No rem in editor-style.css for now. [29910] #29799
    • Add print styles. [29919] #29967

    Internals

    • Add a 6th (!) attribute to wp_get_attachment_link() to allow aria-describedby to be added to gallery output. [29914] #27402
    • Cache get_term_by() calls [29915] #21760
      • Add a helper function, wp_get_last_changed(), to retrieve a last-modified timestamp by cache group.
      • Original term cache entries maintain BC
    • wp_schedule_single_event() should not prevent scheduling a future duplicate event. It should only reject an event as a duplicate if there is already a similar event scheduled within 10 minutes of the given timestamp. [29939] #28213
    • Add ID attribute to style element from wp_add_inline_style(). [29956] [29958] #30032
    • Move password hint text to a function. Add password_hint filter. [29962] #21243
    • HTTP API: Support both the limit_response_size and stream parameters at the same time, allowing a partial file download. [29968] #26726

    Comments

    • Don’t print an empty HTML markup when comment_reply_link() returns no link. [29908] #29895
    • Use the comment API rather than direct SQL queries in comments_template(). [29965] #19623

    External Scripts

    Queries

    • Check that search value is scalar before parsing. Prevents PHP notices when non-scalar values are passed. [29912] #29736
    • Introduce nested query support to WP_Date_Query. [29923] #29822
    • Throw notices _doing_it_wrong() notices are now generated when passing out-of-range values (month=13) or invalid dates (2014-02-29) to WP_Date_Query. [29925] #25834
    • Support date_query by user_registered in WP_User_Query. [29934] #27283
    • Comment/post author in/not_in for WP_Comment_Query. [29935] #29885
    • Better “inclusive” support for string values in WP_Date_Query. [29936] #29908

    Thanks to @westonruter, @obenland, @tivnet, @joedolson, @DrewAPicture, @rianrietveld, @wonderboymusic, @tollmanz, @boonebgorges, @Manoz69, @iamtakashi, @kwight, @pauldewouters, @ideag, @ChriCo, @NikV, @nofearinc, @ew_holmes, @neoxx, @Viper007Bond, @nacin, @chriscct7, @tellyworth, @sc0ttkclark, @jorbin, @socki03, @ocean90, @convissor, @TobiasBg, @TomHarrigan, @jdgrimes, @jcastaneda, @celloexpressions, @avryl, @simonwheatley, @hardy101, @georgestephanis, @jesin, @hugodelgado, @nobleclem, @afercia, @bradyvercher for their core contributions!

    Revisions covered: [29906] to [29994]. For the complete list of commits to trunk, check out the log on Trac.

    Interested in joining in? Write or test a patch for 4.1.

     
  • John Blackbourn 7:27 pm on October 22, 2014 Permalink | Log in to leave a Comment
    Tags: ,   

    Agenda for October 22nd dev chat 

    Agenda for today’s dev chat in #wordpress-dev (October 22 2014 20:00 UTC)

    • Twenty Fifteen is coming along really well, main issue appears to be sidebar scrolling behaviour.
    • 4.1 Beta 1 is scheduled for next week, so we have a busy week ahead. Also WCSF and the community summit.
    • Not much progress so far on the install/update UI changes, how shall we progress?
    • IRC meeting schedules: @drewapicture
    • Editor focus: needs a decision on default behaviour, user testing, anything else?
    • User/Post Dropdown Performance: status update
    • Meta/Term/Date Query Enhancements: lots of progress. Any other blockers?
    • User session UI, currently awaiting w.org geolocation API details.
    • Friday’s bug scrub coming LIVE from San Fran.
    • Any other business.
     
  • Ian Stewart 4:25 pm on October 21, 2014 Permalink | Log in to leave a Comment  

    Twenty Fifteen Chat Summary October 21 

    Notes for our first weekly chat about Twenty Fifteen:

    We started off our office hours for today precisely right on the minute — one hour early. Apologies to anyone who missed the chat time. Maybe we were too eager to chat about Twenty Fifteen.

    Twenty Fifteen is in great shape right now but we still need bug finders and patch testers/contributors to help us make this the best default theme yet. Right now, our biggest priorities are mobile, accessibility, and the big ticket: double scrollbars.

    Our big ticket right now, the blocker, is #29979 — the double scrollbar. The more eyes we have on this ticket the better. The goal is a fixed sidebar, only when the height is just right for it. When the height isn’t right, it should scroll with the content.

    It would be great to have some help with #29980.

    The accessibility team has done a great review of Twenty Fifteen. (Thanks!) Our top priority right now is to make sure we have those tickets prioritized and in trac. @davidakennedy is going to lead the charge with getting those tickets in.

    @davidakennedy and @karmatosed will be continually looping the a11y and theme review teams into Twenty Fifteen testing and development.

    We also chatted about Sass and determined that the discussion around shipping Sass with a default theme will be best to have ahead of, and for, Twenty Sixteen. Let’s decide to do it, if we do it, then. It doesn’t seem like it would have helped with any of the tickets so far, and even including it for development at this time is one more feature to keep track of at this point. There’s no ticket for it yet, but including it will be a wontfix.

    The chat log is here. Join us weekly in IRC, Tuesdays at 15:30 UTC.

     
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