{"action":"closed","issue":{"url":"https://api.github.com/repos/Automattic/_s/issues/1082","repository_url":"https://api.github.com/repos/Automattic/_s","labels_url":"https://api.github.com/repos/Automattic/_s/issues/1082/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/_s/issues/1082/comments","events_url":"https://api.github.com/repos/Automattic/_s/issues/1082/events","html_url":"https://github.com/Automattic/_s/issues/1082","id":205427410,"number":1082,"title":"Better user experience","user":{"login":"LebCit","id":10379495,"avatar_url":"https://avatars2.githubusercontent.com/u/10379495?v=3","gravatar_id":"","url":"https://api.github.com/users/LebCit","html_url":"https://github.com/LebCit","followers_url":"https://api.github.com/users/LebCit/followers","following_url":"https://api.github.com/users/LebCit/following{/other_user}","gists_url":"https://api.github.com/users/LebCit/gists{/gist_id}","starred_url":"https://api.github.com/users/LebCit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LebCit/subscriptions","organizations_url":"https://api.github.com/users/LebCit/orgs","repos_url":"https://api.github.com/users/LebCit/repos","events_url":"https://api.github.com/users/LebCit/events{/privacy}","received_events_url":"https://api.github.com/users/LebCit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-02-05T14:09:03Z","updated_at":"2017-06-09T18:25:33Z","closed_at":"2017-06-09T18:25:33Z","body":"Hello,\r\n\r\nWhile working on a theme, I've realized that the `_s_posted_on()` function could be a little bit modified for an automatic better user experience.\r\nThis is what I suggest :\r\n```\r\nif ( ! function_exists( '_s_posted_on' ) ) :\r\n/**\r\n * Prints HTML with meta information for the current post-date/time and author.\r\n */\r\nfunction _s_posted_on() {\r\n\t$time_string = '<time class=\"entry-date published updated\" datetime=\"%1$s\">%2$s</time>';\r\n\tif ( get_the_time( 'U' ) == get_the_modified_time( 'U' ) ) {\r\n\t\t$time_string = '<time class=\"entry-date published\" datetime=\"%1$s\">%2$s</time>;\t\t\r\n\t\t$posted_on = sprintf(\r\n\t\t\tesc_html_x( 'Posted on %s', 'post date', '_s' ),\r\n\t\t\t'<a href=\"' . esc_url( get_permalink() ) . '\" rel=\"bookmark\">' . $time_string . '</a>'\r\n\t\t);\r\n\t} else {\r\n\t\t$time_string = '<time class=\"updated\" datetime=\"%3$s\">%4$s</time>';\t\t\r\n\t\t$posted_on = sprintf(\r\n\t\t\tesc_html_x( 'Update on %s', 'post date', '_s' ),\r\n\t\t\t'<a href=\"' . esc_url( get_permalink() ) . '\" rel=\"bookmark\">' . $time_string . '</a>'\r\n\t\t);\r\n\t}\r\n\t$time_string = sprintf( $time_string,\r\n\t\tesc_attr( get_the_date( 'c' ) ),\r\n\t\tesc_html( get_the_date() ),\r\n\t\tesc_attr( get_the_modified_date( 'c' ) ),\r\n\t\tesc_html( get_the_modified_date() )\r\n\t);\r\n\t$byline = sprintf(\r\n\t\tesc_html_x( 'by %s', 'post author', '_s' ),\r\n\t\t'<span class=\"author vcard\"><a class=\"url fn n\" href=\"' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '\">' . esc_html( get_the_author() ) . '</a></span>'\r\n\t);\r\n\techo '<span class=\"posted-on\">' . $posted_on . '</span><span class=\"byline\"> ' . $byline . '</span>'; // WPCS: XSS OK.\r\n}\r\nendif;\r\n```\r\nWhat do you think ?\r\nWouldn't it be better to give common WP users an out of the box (unknown) functionality ?\r\n\r\nThanks a lot for all your efforts."}}
{"actor":{"display_login":"davidakennedy"}}