true, '_builtin' => false); $output = 'objects'; $operator = 'or'; $types = get_post_types( $args, $output, $operator ); foreach ( $types as $type ) { if( TRUE === in_array( $type->name, $exclude ) ) continue; echo '
' . __($type->labels->singular_name , 'default') . '
'; } } $user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles ) ) { listAllPosts(array( 'attachment', 'page' )); } else { listAllPosts(array( 'attachment' )); } } // Custom toolbar function adminDash() { global $post, $current_user; $user = $current_user; $allowed_roles = array('administrator', 'editor', 'author'); if ( is_user_logged_in() && array_intersect($allowed_roles, $user->roles )) { // Settings for show hide (settings.php) $hideShow = get_option('adm_hideshow'); // Hide WordPress front end toolbar show_admin_bar( $hideShow ); // Create new Adminimal toolbar $menuNew = '' . __('New', 'adminimal') . ''; $menuDash = '' . __( 'Admin', 'adminimal' ) . ''; $menuDashEdit = '' . __( 'Edit', 'adminimal' ) . ''; $menuDashUser = '' . __( 'Me', 'adminimal' ) . ''; echo ''; } } add_action( 'wp_footer', 'adminDash'); // Remove margin-top 32px from html tag function remove_admin_login_header() { // Show if (esc_attr( get_option('adm_hideshow') ) == 1) { // Hide } else { remove_action('wp_head', '_admin_bar_bump_cb'); } } add_action('get_header', 'remove_admin_login_header'); ?>