fix access to admin

This commit is contained in:
Leo Germani 2018-05-21 20:06:06 -03:00
parent aae1195fc4
commit c6b4b80f15
1 changed files with 5 additions and 1 deletions

View File

@ -28,10 +28,14 @@ class Admin {
} }
function add_admin_menu() { function add_admin_menu() {
$dummyEntity = new \Tainacan\Entities\Taxonomy();
// a capability everybody bu subscriber have.
// Maybe we will create a specific cap to view_admin later
$entity_cap = $dummyEntity->get_capabilities()->edit_posts;
$page_suffix = add_menu_page( $page_suffix = add_menu_page(
__( 'Tainacan', 'tainacan' ), __( 'Tainacan', 'tainacan' ),
__( 'Tainacan', 'tainacan' ), __( 'Tainacan', 'tainacan' ),
'edit_posts', $entity_cap,
$this->menu_slug, $this->menu_slug,
array( &$this, 'admin_page' ), array( &$this, 'admin_page' ),
plugin_dir_url( __FILE__ ) . 'images/tainacan_logo_symbol.svg' plugin_dir_url( __FILE__ ) . 'images/tainacan_logo_symbol.svg'