Support » Plugin: WP Mail SMTP Plugin - Mail Bank » WordPress Mailbank settings available to Editors

Viewing 4 replies - 1 through 4 (of 4 total)
  • Would it be safe to remove the following code from the plugin so that editors/authors cannot change the settings?

    Line 192 until 269?

    ———————

    case “editor”:
    $wp_admin_bar->add_menu(array(
    “id” => “mail_bank”,
    “title” => __(“<img src=\”” . plugins_url(“/assets/images/mail.png”,__FILE__).”\” width=\”25\”
    height=\”25\” style=\”vertical-align:text-top; margin-right:5px;\” />Wp Mail Bank”),
    “href” => __(site_url() . “/wp-admin/admin.php?page=mail_settings”),
    ));

    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “Settings”,
    “href” => site_url() . “/wp-admin/admin.php?page=smtp_mail”,
    “title” => __(“Settings”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “send_test_email”,
    “href” => site_url() . “/wp-admin/admin.php?page=send_test_email”,
    “title” => __(“Send Test Email”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “recommended”,
    “href” => site_url() . “/wp-admin/admin.php?page=recommended_plugins”,
    “title” => __(“Recommendations”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “other_services”,
    “href” => site_url() . “/wp-admin/admin.php?page=other_services”,
    “title” => __(“Our Other Services”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “wp_system_status”,
    “href” => site_url() . “/wp-admin/admin.php?page=mail_system_status”,
    “title” => __(“System Status”, mail_bank))
    );
    break;
    case “author”:
    $wp_admin_bar->add_menu(array(
    “id” => “mail_bank”,
    “title” => __(“<img src=\”” . plugins_url(“/assets/images/mail.png”,__FILE__).”\” width=\”25\”
    height=\”25\” style=\”vertical-align:text-top; margin-right:5px;\” />Wp Mail Bank”),
    “href” => __(site_url() . “/wp-admin/admin.php?page=mail_settings”),
    ));

    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “Settings”,
    “href” => site_url() . “/wp-admin/admin.php?page=smtp_mail”,
    “title” => __(“Settings”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “send_test_email”,
    “href” => site_url() . “/wp-admin/admin.php?page=send_test_email”,
    “title” => __(“Send Test Email”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “recommended”,
    “href” => site_url() . “/wp-admin/admin.php?page=recommended_plugins”,
    “title” => __(“Recommendations”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “other_services”,
    “href” => site_url() . “/wp-admin/admin.php?page=other_services”,
    “title” => __(“Our Other Services”, mail_bank))
    );
    $wp_admin_bar->add_menu(array(
    “parent” => “mail_bank”,
    “id” => “wp_system_status”,
    “href” => site_url() . “/wp-admin/admin.php?page=mail_system_status”,
    “title” => __(“System Status”, mail_bank))
    );
    break;

    ——–

    Please let me know.
    Thank you,
    John

    This problem addresses me, too.

    It would be great if someone could post a reliable solution here.

    Plugin Author Varun Sharma

    (@contact-banker)

    Hi,

    Thank you for your Suggestion.

    We have noted down your request and had forwarded it to the Development Team.

    This will be get implemented in future release of WP Mail Bank.

    Thanks & Regards

    Support Team
    Tech Banker

    wp-mail-bank/wp-mail-bank.php

    *********************************************************************
    >>Find that>>
    function create_global_menus_for_mail_bank()
    {
    global $wpdb,$current_user;
    if(is_super_admin())
    {
    $role = “administrator”;
    }
    >> Delete here >>
    else
    {
    $role = $wpdb->prefix . “capabilities”;
    $current_user->role = array_keys($current_user->$role);
    $role = $current_user->role[0];
    }
    << Until here <<
    include MAIL_BK_PLUGIN_DIR . “/lib/wp-include-menus.php”;
    }

    *********************************************************************
    >>Find that>>
    function add_mail_icon($meta = TRUE)
    {
    global $wp_admin_bar, $wpdb, $current_user;
    if (is_user_logged_in())
    {
    if(is_super_admin())
    {
    $role = “administrator”;
    }
    >> Delete here >>
    else
    {
    $role = $wpdb->prefix . “capabilities”;
    $current_user->role = array_keys($current_user->$role);
    $role = $current_user->role[0];
    }
    << Until here <<
    switch ($role)
    {

    *********************************************************************

    This works for me.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WordPress Mailbank settings available to Editors’ is closed to new replies.