WordPress.org

Make WordPress Core

Tagged: comments Toggle Comment Threads | Keyboard Shortcuts

  • Ryan Boren 12:01 am on July 15, 2015 Permalink |
    Tags: , bubbles, comments, content-overrun, , edit-site, , , , , , network-admin, right-now, ,   

    Today in the Nightly: Site icons in the customizer, editor patterns, more accessible comment bubbles, row toggle focus styling 

    Install the nightly, and try out this fresh batch of shiny.

    Site Icons in the Customizer

    I’ve long wanted site icons in the customizer alongside site title and tagline. The identity information that I always want to edit when first setting up a site are now all together in the customizer.

    For more visuals, see these visual records.

    See #16434.

    Editor Patterns

    Create bulleted lists, ordered lists, and blockquotes using markdown like patterns. I find this particularly handy on phones when the editor toolbar is offscreen.

    Screen Shot 2015-07-14 at 4.39.12 PM

    See #31441.

    Better focus styling for list table row toggles

    See #32395.

    Better accessibility and design for the comments bubble

    The comments columns in our list tables were among the most confusing for screen reader users. Accessibility and visuals are now improved.

    See #32152.

    Eliminate content overruns on small screens

    An audit of content overruns on small screens resulted in many fixes.

    After:

    Before:

    See #32846.

    Styling improvements on small screens for Right Now in the network admin

    See #32962.

    Improved header information in Network Admin Edit Site tabs

    • Use the site’s name rather than URL in the Edit Site header.
    • Provide “Visit” and “Dashboard” links for the site on all tabs.

    After:

    Before:

    See #32525.

    Disambiguate “Automatically add new top-level pages to this menu”

    In the customizer, a menu’s auto-add pages option is now separated from the preceding menu location checkboxes.

    See #32820.

     Passwords UI Improvements

    Passwords received a couple of improvements. The show/hide toggles look better, and passwords ui is on the install screen. Passwords on the install screen still needs a little more flow work.

    See #32589 and #32925.

    For more visuals, see these visual records.

    Reduce link noise in media library list view

    This is visually subtle but removes confusion for screen readers.

    KL_7dmW58c

    See #32254.

     

    Previously: Today in the Nightly: Customize in the Toolbar, Passwords UI, List Tables on Phones, Dashicons

     
  • Mel Choyce 8:35 pm on July 6, 2015 Permalink |
    Tags: , comments, ,   

    Comments are now turned off on pages by default 

    In [33041] and [33054] for #31168, we’ve turned comments off on new pages by default.

    I know many of you have done the “make a bunch of pages, fill them out, realize comments are turned on, go back into the admin, turn off comments” dance. Now when you make a page, you won’t have to manually turn off comments — it’ll match the expected behavior of being off by default.

    In addition to pages, this functionality has been extended to all custom post types. Post registrations that don’t explicitly add support for comments will now default to comments being off on new posts of that type (before, they defaulted to on). Up until now, post type support for comments has only affected admin UI; a developer could omit comment support on registration but still allow comments to be posted. This is a change in behavior, and we will be closely monitoring its effects during beta. Moving to explicit support will allow core behavior to be more predictable and robust in the future, but we will always consider real-world usage.

    In trunk, you’ll notice two new things: the get_default_comment_status() function, which accepts the post type and comment type as arguments (both optional), and within it a get_default_comment_status filter, which receives the status, post type, and comment type as arguments. If you’ve been directly checking options such as with get_option( 'default_comment_status' ), you will likely want to replace those calls with get_default_comment_status(). We recommend explicit registration of post type support for comments, but as an example of using the filter, you can restore current behavior using the following:

    /**
     * Filter whether comments are open for a given post type.
     *
     * @param string $status       Default status for the given post type,
     *                             either 'open' or 'closed'.
     * @param string $post_type    Post type. Default is `post`.
     * @param string $comment_type Type of comment. Default is `comment`.
     * @return string (Maybe) filtered default status for the given post type.
     */
    function wpdocs_open_comments_for_myposttype( $status, $post_type, $comment_type ) {
        if ( 'myposttype' !== $post_type ) {
            return $status;
        }
    
        // You could be more specific here for different comment types if desired
        return 'open';
    }
    add_filter( 'get_default_comment_status', 'wpdocs_open_comments_for_myposttype', 10, 3 );
    
     
    • Ihor Vorotnov 8:39 pm on July 6, 2015 Permalink | Log in to Reply

      Gods of Codes, thank you! Less junk in my mu-plugins now. And special thanks for CPTs – really good news these are :)

    • Frankie Jarrett 8:40 pm on July 6, 2015 Permalink | Log in to Reply

      Fantastic! Thanks to everyone involved in making this happen.

    • Dave Navarro, Jr. 8:41 pm on July 6, 2015 Permalink | Log in to Reply

      Awesome! Now how about making SUNDAY the default first day of the week on install?

      • Frankie Jarrett 8:46 pm on July 6, 2015 Permalink | Log in to Reply

        Hey Dave, Monday will likely always be the default because that is the ISO standard. See https://en.wikipedia.org/wiki/Week#Week_numbering

        • Dave Navarro, Jr. 9:01 pm on July 6, 2015 Permalink | Log in to Reply

          So besides crusading for the Metric system, I need to be crusading to make American calendars start on Monday… When am I gonna find the time to finish my plugin documentation? 😉

          • Ihor Vorotnov 9:08 pm on July 6, 2015 Permalink | Log in to Reply

            If WP will ever switch to imperial system and make Sunday first, then the rest of the World (you know, that billions of folks outside of US) would have to crusade 😉 There’s no way to make everybody happy, so following ISO standards is the only way to go.

        • Tom Ryan 12:22 am on July 7, 2015 Permalink | Log in to Reply

          Isn’t this something that could be detected at install time, instead of forcing a one size fits all setting?

      • Ihor Vorotnov 9:04 pm on July 6, 2015 Permalink | Log in to Reply

        According to ISO 8601 Sunday is the 7th day of the week, that’s why we have weekENDs. WP is just obeying standards.

      • Andrew Nacin 2:43 am on July 8, 2015 Permalink | Log in to Reply

        Actually, I think we should indeed change this. But this will probably require us to bring the concept of a locale into core, beyond what we already do (date/time formats).

        I would very much like Sunday to be the default for a place (say, the United States) that uses Sunday as the default. This hasn’t been a major priority because it only affects the calendar widget. That said, there’s some traction to get locale work happening.

        Specific ticket: https://core.trac.wordpress.org/ticket/28344
        More generally, tickets like #18146 and #29783.

    • Shapeshifter 3 8:43 pm on July 6, 2015 Permalink | Log in to Reply

      Good Decision for users of WordPress as a CMS!!! Thank You!

    • Shawn Hooper 8:44 pm on July 6, 2015 Permalink | Log in to Reply

      So happy to see this getting implemented!

    • Tony Scott 8:46 pm on July 6, 2015 Permalink | Log in to Reply

      Great news!

    • Navneil Naicker 8:52 pm on July 6, 2015 Permalink | Log in to Reply

      Awesome, thank you guys.

    • Morten Rand-Hendriksen 8:55 pm on July 6, 2015 Permalink | Log in to Reply

      Small changes like these significant positive impact on the WordPress user experience. Great move.

    • webdevmattcrom 9:03 pm on July 6, 2015 Permalink | Log in to Reply

      And the world rejoiced! Thank you!

    • leemon 9:03 pm on July 6, 2015 Permalink | Log in to Reply

      At last!!!

    • nbrowe46 9:05 pm on July 6, 2015 Permalink | Log in to Reply

      Great stuff! This reduces the things I have to do on a fresh install :)

    • Marco Milesi 9:06 pm on July 6, 2015 Permalink | Log in to Reply

      In my experience i’ve used comments in ~1/10 website. I usually use WordPress as a CMS instead of a blogging platform. So i would prefer to have comments disabled for posts too…

      NVM, one step at a time. Thank You!

    • Grant Palin 9:13 pm on July 6, 2015 Permalink | Log in to Reply

      Excellent. This has been a nuisance before when creating custom post types. Explicit opt-in is the way to go for this sort of thing.

    • Sakin Shrestha 9:15 pm on July 6, 2015 Permalink | Log in to Reply

      Finally, it’s nice. Thanks :)

    • Ansel Taft 9:16 pm on July 6, 2015 Permalink | Log in to Reply

      I’m thrilled with this change! May I inquire about media attachments (aka images)? Are they comment-enabled by default? We’ve seen a rash of comment spam on a couple sites to media attachments and would be forced to name my third-born Mattilda if such a thing could come to be. Cheers!

      • Helen Hou-Sandi 9:29 pm on July 6, 2015 Permalink | Log in to Reply

        Attachments are explicitly registered with comment support, yes. I’m not personally opposed to turning them off, though there are definitely sites that use comments for attachments – worth discussing. It is at least relatively trivial to turn comments off for attachments now, via remove_post_type_support() or the aforementioned filter.

        • Morten Rand-Hendriksen 9:31 pm on July 6, 2015 Permalink | Log in to Reply

          I would definitely leave attachment comments on by default because unlike all other post types there is no clear way for the user to do this on their own. If a user decides to direct a visitor to the Attachment page, there is a good chance that same user is looking to enable the comments section on that page.

          • Ansel Taft 10:14 pm on July 6, 2015 Permalink | Log in to Reply

            Morten, we land on the other side of the fence. We have yet to build a site where we would want/need comments enabled on attachments by default. We use media attachments on posts and comments are enabled on those which is perfect for our needs.

            • Helen Hou-Sandi 12:01 am on July 7, 2015 Permalink

              We don’t expose this in any of the Backbone-driven parts, no. I’ve used attachment comments on some sites (photo commenting vs. post commenting, much like Facebook has), and hate the spam problem on others. The spam can come even if you don’t have a comment form, which is also frustrating. I’m not sure we can really turn it off by default, but again, at least it’s easier to turn them off now. Which I should go do for some sites right now. :)

            • AskKim 6:50 am on July 7, 2015 Permalink

              I have the same experience that Ansel has. Nothing we’ve developed for ourself or clients has used those pages except a singular site that could have done with a custom enabling code snippet.

              I definitely think media comments should be off by default.

    • Tom Ryan 12:21 am on July 7, 2015 Permalink | Log in to Reply

      Excellent! This is one of about 20-50 relatively small tweaks which are necessary to make WordPress more delightful for those users who are not developers. Thank you!

    • Jon Brown 12:24 am on July 7, 2015 Permalink | Log in to Reply

      Sooo many comments about comments… lmao… a most welcome change. Thank you.

    • Piet Bos 2:10 am on July 7, 2015 Permalink | Log in to Reply

      At long last something good to come to 4.3! Thank you!

    • Knut Sparhell 2:57 am on July 7, 2015 Permalink | Log in to Reply

      Congratulations!

    • intriguingnw 12:29 pm on July 7, 2015 Permalink | Log in to Reply

      Delighted, I am sure there will be more to delight us in 4.3, I hope so ! Positive thinking. I agree with Tom Ryan above! THANKS

    • Nashwan Doaqan 12:58 pm on July 7, 2015 Permalink | Log in to Reply

      Fantastic! It will save our time!

      The changeset [33041] had introduced a dynamic filter name `get_{$post_type}_default_comment_status` ! and the code snippet is using a .literate version ! Which one should we use?!

    • Seth Alling 3:00 pm on July 7, 2015 Permalink | Log in to Reply

      This is great news. It makes my plugin (No Page Comment) pretty much irrelevant (I’ll still keep it as it has an interface for the everyday user to use on custom post types), but it’s been something I’ve felt should be in core for a long time, so thanks!

    • TechDaddyK 6:34 pm on July 7, 2015 Permalink | Log in to Reply

      Thank you for making this change! I build a lot of sites that don’t have traditional blogs, etc. so I spend a lot of time building Pages. It has become a habit to turn off commenting on Pages, but I’ve forgotten many times and had to correct dozens (or even hundreds) of Pages once I remembered to do so.

    • Michael Beil 7:26 pm on July 7, 2015 Permalink | Log in to Reply

      This is wonderful.

    • Ahmad Awais 7:47 pm on July 7, 2015 Permalink | Log in to Reply

      Most needed change ever. I really had a very few pages where I actually needed to use comments.

    • tuyennv 2:22 am on August 11, 2015 Permalink | Log in to Reply

      Thanks, it’s nice

    • archon810 9:17 pm on August 18, 2015 Permalink | Log in to Reply

      So how do I re-enable this? I’d like comments on new pages to be on by default, as before.

    • archon810 9:18 pm on August 18, 2015 Permalink | Log in to Reply

      Doh, can’t edit/delete my comment as it’s probably stuck in moderation, but just realized there’s a snippet included to restore the old behavior.

  • Ryan Boren 11:04 pm on October 24, 2008 Permalink
    Tags: comments,   

    Trying to decide what to do with comment permalinks when paging is turned on.

     
  • Ryan Boren 6:14 pm on October 22, 2008 Permalink
    Tags: comments   

    Adding some options to comment paging. Sort order and page order.

     
    • Petter 7:06 pm on October 22, 2008 Permalink | Log in to Reply

      I beleive the paged comments will be my favorite new WP 2.7 feature. If you keep me waiting much longer I’ll go betatesting :-S

    • Suskun 9:07 am on October 23, 2008 Permalink | Log in to Reply

      in one of the nightly builts, there was an option in comments section called “quick edit” which was very usefull. in coming releases will it be back?

    • Fabien 2:46 pm on October 23, 2008 Permalink | Log in to Reply

      The Paged Comments plugin has some interesting options : of course the order of comments but also an option to choose if the last comment-page will contain the maximum number of comments allowed on a page or not (fill last page option).

      I don’t know if there will be any ajax stuff to browse between comment pages, but if not, repeating the same article content on each page could be bad for SEO (duplicate content). Maybe an option like on_first_comment_page() could solve the problem (with a much appropriate name of course, but you have the point).

      Thanks for your great work and sorry for my english (French) .

    • monika 10:44 pm on October 25, 2008 Permalink | Log in to Reply

      I’m writing much tuts-and they have most of the time >100 comments. So I tried paged comments. But I have to realize that user do not read *comment-page-4* 😉

      so I have same questions most of the time,

      is there a way for a *comment search*?

      and yes – please give me the chance to seo optimize the paged comments, because too much internal dc is very bad for a website.

      thanks a lot

      Monika

  • Andrew Ozz 12:33 am on October 11, 2008 Permalink
    Tags: comments   

    Some changes and improvements to threaded comments: allows replying without JavaScript (patch contributed by Viper007Bond) and removes script dependency on jQuery. If the script fails for some reason (missing base css blocks, IDs, etc.) the no-js replying will be used instead.

    Added 2 new template tags used to allow replying without js, comment_parent_field() comment_id_fields() outputs the hidden form fields holding the reference to the comment’s parent and the comment_post_ID, and comment_form_title() outputs a different title above the form when replying (optional).

    Changes: cancel_comment_reply_link() takes only one argument text = ‘ ‘, the rest is set from js. The DIV surrounding it shouldn’t be hidden (for supporting no-js mode) and is optional.

     
    • Ryan 1:28 am on October 11, 2008 Permalink | Log in to Reply

      Maybe bundle the comment ID in with the parent ID inside comment_parent_field() and rename comment_id_fields()? That way it takes care of both of the required hidden fields.

    • Andrew Ozz 1:44 am on October 11, 2008 Permalink | Log in to Reply

      Good idea. The comments.php templates will have to be adjusted there a bit anyways, better to have one template tag that will output all necessary fields.

    • Ryan 7:06 pm on October 14, 2008 Permalink | Log in to Reply

      Done

    • monika 2:19 pm on November 2, 2008 Permalink | Log in to Reply

      ok there is one template tag and where can I translate all this in an individual way? the main gettext file -but now I can’t translate via theme .mo / .pot :( or?

  • Ryan Boren 8:10 pm on October 7, 2008 Permalink
    Tags: comments   

    Dogfooding threaded comments on this blog.

     
  • Ryan Boren 6:44 pm on October 6, 2008 Permalink
    Tags: comments   

    sivel.net has a howto on using the new comments API to separate comments from pings

     
  • Ryan Boren 5:19 pm on October 1, 2008 Permalink
    Tags: comments,   

    Alex landed a comment type filter for edit-comments.php. You can view all types, just comments, just trackbacks, or just pingbacks.

     
  • Ryan Boren 7:48 pm on September 29, 2008 Permalink
    Tags: comments   

    Otto has a great post on updating themes to use threaded comments. If you try out the new comments API, let us know what would make your life easier.

     
  • Ryan Boren 8:56 pm on September 22, 2008 Permalink
    Tags: comments   

    The comment paging patch is now usable. Time for review and then hopefully commit.

     
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