Open sc0ttkclark opened 9 years ago
There could be an odd use case for it as it is. Set to show on home/front page, not to show on Posts. On the homepage, the sharing links would display for posts, only not on single post pages.
The option is for display not enablement, per se. That said, the change makes sense to me.
I see 'index' used elsewhere, so then this would be acceptable IMO:
function sharing_add_meta_box() {
$post_types = get_post_types( array( 'public' => true ) );
$title = apply_filters( 'sharing_meta_box_title', __( 'Sharing', 'jetpack' ) );
$sharer = new Sharing_Service();
$global_options = $sharer->get_global_options();
foreach( $post_types as $post_type ) {
if ( ! in_array( 'index', $global_options['show'] ) && ! in_array( $post_type, $global_options['show'] ) ) {
continue;
}
add_meta_box( 'sharing_meta', $title, 'sharing_meta_box_content', $post_type, 'advanced', 'high' );
}
}
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
This issue has been marked as stale. This happened because:
No further action is needed. But it's worth checking if this ticket has clear reproduction steps and it is still reproducible. Feel free to close this issue if you think it's not valid anymore — if you do, please add a brief explanation.
Currently, Sharedaddy does this:
Shouldn't it be checking against the Sharing settings that enable sharing for specific post types only?