{"action":"opened","issue":{"url":"https://api.github.com/repos/BCcampus/pressbooks-textbook/issues/139","repository_url":"https://api.github.com/repos/BCcampus/pressbooks-textbook","labels_url":"https://api.github.com/repos/BCcampus/pressbooks-textbook/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/BCcampus/pressbooks-textbook/issues/139/comments","events_url":"https://api.github.com/repos/BCcampus/pressbooks-textbook/issues/139/events","html_url":"https://github.com/BCcampus/pressbooks-textbook/issues/139","id":293647756,"number":139,"title":"Replace `pb_author`, `pb_contributing_authors` and `pb_section_author` with new slugs","user":{"login":"connerbw","id":812192,"avatar_url":"https://avatars1.githubusercontent.com/u/812192?v=4","gravatar_id":"","url":"https://api.github.com/users/connerbw","html_url":"https://github.com/connerbw","followers_url":"https://api.github.com/users/connerbw/followers","following_url":"https://api.github.com/users/connerbw/following{/other_user}","gists_url":"https://api.github.com/users/connerbw/gists{/gist_id}","starred_url":"https://api.github.com/users/connerbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/connerbw/subscriptions","organizations_url":"https://api.github.com/users/connerbw/orgs","repos_url":"https://api.github.com/users/connerbw/repos","events_url":"https://api.github.com/users/connerbw/events{/privacy}","received_events_url":"https://api.github.com/users/connerbw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-01T19:06:47Z","updated_at":"2018-02-01T19:06:47Z","closed_at":null,"author_association":"NONE","body":"### Description \r\n\r\nPressbooks 5 introduces modular contributors, \r\n\r\nMore info:\r\nhttps://pressbooks.org/blog/2018/01/17/pressbooks-5-developer-guide/\r\n\r\nFor backwards-compatibility, the new contributor field names are pluralized and any 3rd party code that looks for the old fields will still be able to retrieve them. If a plugin saves using the old slugs we catch these convert to them. [1] Making absolutely no changes to your code may surprisingly work for a long time. \r\n\r\n_Importing, cloning, moving to/from external systems, and things we can't predict will eventually lead to the old slugs going stale though._\r\n\r\nMy request is that when PB5 is released, please replace `pb_author`, `pb_contributing_authors` and `pb_section_author` with new slugs Developers can find several convenience methods in the `\\Pressbooks\\Contributors` [2] class. \r\n\r\nExamples:\r\n\r\n```php\r\n$contributors->isValid($contributor_type);\r\n$contributors->isDeprecated($contributor_type);\r\n$contributors->maybeUpgradeSlug($old_slug);\r\n$contributors->convert( $old_slug, $names, $post_id );\r\n```\r\n\r\nIf you need peer review we can do our best to have a look when there's something to look at?\r\n\r\nThanks.\r\n\r\n 1. https://github.com/pressbooks/pressbooks/blob/3fe31d85b46b46b6da8df7229716e50f55b6f776/inc/class-taxonomy.php#L573\r\n 2.  https://github.com/pressbooks/pressbooks/blob/dev/inc/class-contributors.php\r\n\r\n### System Information\r\n\r\n + https://github.com/search?q=org%3ABCcampus+pb_author&type=Code\r\n + https://github.com/search?utf8=%E2%9C%93&q=org%3ABCcampus+pb_section_author&type=Code\r\n + https://github.com/search?utf8=✓&q=org%3ABCcampus+pb_contributing_authors\r\n\r\n- Pressbooks: 5.0.0 (or dev branch)\r\n- WordPress: 4.9.2"}}
{"actor":{"display_login":"connerbw"}}