Пример #1
0
function right_click_premium_settings()
{
    global $wccp_settings;
    if (!current_user_can('manage_options') || current_user_can('manage_options') && $wccp_settings['exclude_admin_from_protection'] == 'No') {
        if ((is_home() || is_front_page() || is_archive() || is_post_type_archive() || is_404() || is_attachment() || is_author() || is_category() || is_feed()) && $wccp_settings['right_click_protection_homepage'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
        if (is_single() && $wccp_settings['right_click_protection_posts'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
        if (is_page() && !is_front_page() && $wccp_settings['right_click_protection_posts'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
    }
}
Пример #2
0
function right_click_premium_settings()
{
    global $wccp_settings;
    if (!is_user_logged_in() || is_user_logged_in() && $wccp_settings['exclude_admin_from_protection'] == 'No') {
        if ((is_home() || is_front_page()) && $wccp_settings['right_click_protection_homepage'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
        if (is_single() && $wccp_settings['right_click_protection_posts'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
        if (is_page() && !is_front_page() && $wccp_settings['right_click_protection_posts'] == 'checked') {
            wpcp_disable_Right_Click();
            return;
        }
    }
}