Commit f5059bc8 authored by Romain Duminil's avatar Romain Duminil

Masquer les commentaires privés si pas auteur

parent fa4717ea
......@@ -33,6 +33,7 @@ class CommunityProject
add_action( "add_meta_boxes", array( $this, "add_custom_fields" ) );
add_action( "admin_menu", array( $this, "remove_meta_boxes" ) );
add_action( "do_meta_boxes", array( $this, "remove_edit_flow_metabox" ) );
add_action( 'save_post', array( $this, 'set_default_status' ) );
add_action( 'after_setup_theme', array( $this, 'remove_admin_bar') );
add_action( "save_post", array( $this, "save_custom_meta_box" ), 10, 2 );
......@@ -94,6 +95,14 @@ class CommunityProject
}
}
function remove_edit_flow_metabox()
{
if( ! current_user_can( 'publish_posts' ) && get_post()->post_author != get_current_user_id() )
{
remove_meta_box( 'edit-flow-editorial-comments','project','normal' );
}
}
/**
* Add custom field to project custom type
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment