{"action":"created","issue":{"url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/75","repository_url":"https://api.github.com/repos/billerickson/display-posts-shortcode","labels_url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/75/comments","events_url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/75/events","html_url":"https://github.com/billerickson/display-posts-shortcode/issues/75","id":42105752,"number":75,"title":"Rebuild the output filter","user":{"login":"billerickson","id":685131,"avatar_url":"https://avatars.githubusercontent.com/u/685131?v=3","gravatar_id":"","url":"https://api.github.com/users/billerickson","html_url":"https://github.com/billerickson","followers_url":"https://api.github.com/users/billerickson/followers","following_url":"https://api.github.com/users/billerickson/following{/other_user}","gists_url":"https://api.github.com/users/billerickson/gists{/gist_id}","starred_url":"https://api.github.com/users/billerickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billerickson/subscriptions","organizations_url":"https://api.github.com/users/billerickson/orgs","repos_url":"https://api.github.com/users/billerickson/repos","events_url":"https://api.github.com/users/billerickson/events{/privacy}","received_events_url":"https://api.github.com/users/billerickson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/billerickson/display-posts-shortcode/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2014-09-06T01:52:34Z","updated_at":"2016-09-07T19:46:34Z","closed_at":null,"body":"This plugin was much simpler when initially developed, and the output filter reflected that. It now contains 9 (!) parameters, and is even missing some like the author field. \r\n\r\nI've had quite a few people post issues where things aren't working because they try to write two functions that modify the output, so only the last function does anything since we're returning an entire $output, not just the parts modified.\r\n\r\nI'd like to see if there's a way I can refactor this so it's simpler, easier to modify, and of course backwards compatible. \r\n\r\nOther relevant tickets: #66"},"comment":{"url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/comments/245394916","html_url":"https://github.com/billerickson/display-posts-shortcode/issues/75#issuecomment-245394916","issue_url":"https://api.github.com/repos/billerickson/display-posts-shortcode/issues/75","id":245394916,"user":{"login":"billerickson","id":685131,"avatar_url":"https://avatars.githubusercontent.com/u/685131?v=3","gravatar_id":"","url":"https://api.github.com/users/billerickson","html_url":"https://github.com/billerickson","followers_url":"https://api.github.com/users/billerickson/followers","following_url":"https://api.github.com/users/billerickson/following{/other_user}","gists_url":"https://api.github.com/users/billerickson/gists{/gist_id}","starred_url":"https://api.github.com/users/billerickson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/billerickson/subscriptions","organizations_url":"https://api.github.com/users/billerickson/orgs","repos_url":"https://api.github.com/users/billerickson/repos","events_url":"https://api.github.com/users/billerickson/events{/privacy}","received_events_url":"https://api.github.com/users/billerickson/received_events","type":"User","site_admin":false},"created_at":"2016-09-07T19:46:34Z","updated_at":"2016-09-07T19:46:34Z","body":"I'd like to deprecate the current output filter and make a new one. The `$output` would be an array of pieces. Something like this:\r\n\r\n```php\r\n$output = array(\r\n\tarray(\r\n\t\t'type' => 'image',\r\n\t\t'content' => '<a class=\"image\" href=\"http://sample.com\"><img src=\"http://sample.com/image.jpg\" /></a>',\r\n\t),\r\n\tarray(\r\n\t\t'type' => 'title',\r\n\t\t'content' => '<a class=\"title\" href=\"http://sample.com\">Sample title</a>',\r\n\t),\r\n\tarray(\r\n\t\t'type' => 'excerpt',\r\n\t\t'content' => '<span class=\"excerpt-dash\">-</span> <span class=\"excerpt\">This is the excerpt</span>',\r\n\t)\r\n);\r\n```\r\n\r\nThen when filtering it, you can easily target the specific piece you want to change. You can also re-order the elements in the array without affecting other plugins/code that modifies the individual piece."}}
{"actor":{"display_login":"billerickson"}}