Example #1
0
function nuts_get_color($name)
{
    $color = nuts_get_option($name);
    if ($color == "") {
        return nuts_get_default_color($name);
    }
    return $color;
}
Example #2
0
function nuts_get_number($name, $pure = false)
{
    global $nuts_options_array;
    if ($pure == false) {
        return $nuts_options_array[$name]["prefix"] . nuts_get_option($name) . $nuts_options_array[$name]["suffix"];
    } else {
        nuts_get_option($name);
    }
}
Example #3
0
function nuts_get_select($name, $key = false)
{
    global $nuts_options_array;
    $id = nuts_get_option($name);
    if ($key) {
        return $id;
    } else {
        return $nuts_options_array[$name]["values"][$id];
    }
}
Example #4
0
function nuts_get_image_url($name, $size = "")
{
    global $nuts_options_array;
    $img_id = nuts_get_option($name);
    if (is_numeric($img_id)) {
        if ($size == "") {
            $size = nuts_get_image_size($name);
        }
        $value = wp_get_attachment_image_src($img_id, $size);
        $value = $value[0];
    } else {
        $value = $img_id;
    }
    return $value;
}
Example #5
0
function nuts_get_text($name)
{
    return nuts_get_option($name);
}