Computing-blog Customization
A while ago a change was proposed (!10) to enable users to customize the themes/plugins we provide out of the box.
Notoriously, this came as a request by Tim Smith to be able to add the following snippet(feature) to the themes to enable sharing draft previews:
add_action('pre_get_posts', 'allow_draft_preview');
function allow_draft_preview($query) {
if (isset($_GET['key']) && $_GET['key'] == 'guest') {
if ($query->is_main_query()) {
$query->set('post_status', array('publish', 'draft'));
}
}
}
Now, AFAIK drafts can be previewed, but unaware if shared (they should if user is authenticated, but what if the use case if for non-admins?).
To be followed up.