function hocwp_theme_custom_check_license()
{
    $option = get_option('hocwp_cancel_license');
    $theme_key = md5(get_option('template'));
    $cancel = absint(isset($option['theme'][$theme_key]) ? $option['theme'][$theme_key] : '');
    if (1 == $cancel || !has_action('hocwp_check_license', 'hocwp_setup_theme_check_license')) {
        hocwp_theme_invalid_license_redirect();
    }
}
Пример #2
0
function hocwp_setup_theme_check_license()
{
    if (!isset($_POST['submit']) && !hocwp_is_login_page()) {
        if (!hocwp_theme_license_valid(hocwp_theme_get_license_defined_data()) || !has_action('hocwp_check_license', 'hocwp_theme_custom_check_license')) {
            hocwp_theme_invalid_license_redirect();
        }
    }
}