Sindbad~EG File Manager
<?php
namespace RealPress\Controllers;
class AdminMenuController {
public function __construct() {
add_action( 'admin_bar_menu', array( $this, 'admin_bar_menus' ), 50 );
}
/**
* @param $wp_admin_bar
*
* @return void
*/
public function admin_bar_menus( $wp_admin_bar ) {
if ( ! is_admin() || ! is_user_logged_in() ) {
return;
}
if ( ! is_user_member_of_blog() && ! is_super_admin() ) {
return;
}
$wp_admin_bar->add_node(
array(
'parent' => 'site-name',
'id' => 'property-listing',
'title' => esc_html__( 'View Properties', 'realpress' ),
'href' => get_post_type_archive_link( REALPRESS_PROPERTY_CPT ),
)
);
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists