1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56:
<?php
if ( !class_exists('Inbound_Mailer_Menus') ) {
class Inbound_Mailer_Menus {
public function __construct() {
self::load_hooks();
}
public static function load_hooks() {
add_action('admin_menu', array( __CLASS__ , 'add_sub_menus' ) );
}
public static function add_sub_menus() {
if ( !current_user_can('manage_options')) {
remove_menu_page( 'edit.php?post_type=inbound-email' );
return;
}
add_submenu_page('edit.php?post_type=inbound-email', __( 'Upload Templates' , 'inbound-pro' ) , __( 'Upload' , 'inbound-pro' ) , 'manage_options', 'inbound_email_manage_templates', array( 'Inbound_Mailer_Template_Manager' , 'display_management_page' ) );
if (!defined('INBOUND_PRO_CURRENT_VERSION')) {
add_submenu_page( 'edit.php?post_type=inbound-email' , __( 'Settings' , 'inbound-pro' ) , __( 'Settings' , 'inbound-email') , 'manage_options', 'inbound_email_global_settings', array( 'Inbound_Mailer_Settings' , 'display_global_settings' ) );
} else {
}
}
}
$Inbound_Mailer_Menus = new Inbound_Mailer_Menus();
}