Esempio n. 1
0
    }
}
if ($type == "css" || $type == "js") {
    if (isset($themes[$selectedTheme])) {
        $theme = $themes[$selectedTheme];
        $admin_capability = get_option('agca_admin_capability');
        if ($admin_capability == "") {
            $admin_capability = "edit_dashboard";
        }
        if (!(get_option('agca_role_allbutadmin') == true and current_user_can($admin_capability))) {
            $adminscript = $theme[$optionName];
            $settings = $theme['settings'];
            if ($settings == "" || $settings == " ") {
                $settings = "{}";
            }
            $adminscript = agcaAppendSettingsToAGCATemplateCustomizations($adminscript, $settings);
            $admindata = agcaEnableSpecificWPVersionCustomizations($admindata);
            $admindata = agcaRemoveCSSComments($admindata);
            echo $adminscript;
        }
    }
}
//print_r($themes); print_r($selectedTheme); die;
die;
function agcaEnableSpecificWPVersionCustomizations($customizations)
{
    /*enable special CSS for this WP version*/
    $ver = agcat_get_wp_version();
    $customizations = str_replace("/*" . $ver, " ", $customizations);
    $customizations = str_replace($ver . "*/", " ", $customizations);
    return $customizations;
Esempio n. 2
0
    }
}
if ($type == "css" || $type == "js") {
    if (isset($themes[$selectedTheme])) {
        $theme = $themes[$selectedTheme];
        $admin_capability = get_option('agca_admin_capability');
        if ($admin_capability == "") {
            $admin_capability = "edit_dashboard";
        }
        if (!(get_option('agca_role_allbutadmin') == true and current_user_can($admin_capability))) {
            $adminscript = stripslashes($theme[$optionName]);
            $settings = $theme['settings'];
            if ($settings == "" || $settings == " ") {
                $settings = "{}";
            }
            $adminscript = agcaAppendSettingsToAGCATemplateCustomizations(stripslashes($adminscript), $settings);
            $admindata = agcaEnableSpecificWPVersionCustomizations($admindata);
            $admindata = agcaRemoveCSSComments($admindata);
            echo $adminscript;
        }
    }
}
//print_r($themes); print_r($selectedTheme); die;
die;
function agcaEnableSpecificWPVersionCustomizations($customizations)
{
    /*enable special CSS for this WP version*/
    $ver = agcat_get_wp_version();
    $customizations = str_replace("/*" . $ver, " ", $customizations);
    $customizations = str_replace($ver . "*/", " ", $customizations);
    return $customizations;