/**
 * Get Custom Conditionals from the database, if any exist, and then return
 * them in a sorted array.
 *
 * @since 1.0
 * @return soreted array of all Custom Conditionals from the database if they exist.
 */
function dynamik_get_conditionals()
{
    $dynamik_conditionals = get_option('dynamik_gen_custom_conditionals');
    if (!empty($dynamik_conditionals)) {
        $custom_conditionals = dynamik_array_sort($dynamik_conditionals, 'conditional_id');
        return $custom_conditionals;
    } else {
        return false;
    }
}
Beispiel #2
0
/**
 * Get Custom Labels from the database, if any exist, and then return
 * them in a sorted array.
 *
 * @since 1.2
 * @return soreted array of all Custom Labels from the database if they exist.
 */
function dynamik_get_labels()
{
    $custom_labels = get_option('dynamik_gen_custom_labels');
    if (!empty($custom_labels)) {
        $custom_labels = dynamik_array_sort($custom_labels, 'label_name');
        return $custom_labels;
    } else {
        return false;
    }
}
Beispiel #3
0
/**
 * Get Custom Templates from the database, if any exist, and then return
 * them in a sorted array.
 *
 * @since 1.2
 * @return soreted array of all Custom Templates from the database if they exist.
 */
function dynamik_get_templates()
{
    $custom_templates = get_option('dynamik_gen_custom_templates');
    if (!empty($custom_templates)) {
        foreach ($custom_templates as $k => $v) {
            $custom_templates[$k]['template_file_name'] = $custom_templates[$k]['template_file_name'] == 'a404' ? '404' : $custom_templates[$k]['template_file_name'];
            $custom_templates[$k]['template_textarea'] = stripslashes($custom_templates[$k]['template_textarea']);
        }
        $custom_templates = dynamik_array_sort($custom_templates, 'template_file_name');
        return $custom_templates;
    } else {
        return false;
    }
}
Beispiel #4
0
/**
 * Get Custom Hook Boxes from the database, if any exist, and then return
 * them in a sorted array.
 *
 * @since 1.0
 * @return soreted array of all Custom Hook Boxes from the database if they exist.
 */
function dynamik_get_hooks()
{
    $custom_hooks = get_option('dynamik_gen_custom_hook_boxes');
    if (!empty($custom_hooks)) {
        $custom_hook_name_compare = array();
        foreach ($custom_hooks as $k => $v) {
            $custom_hooks[$k]['conditionals'] = explode('|', $v['conditionals']);
            $custom_hooks[$k]['hook_textarea'] = stripslashes($custom_hooks[$k]['hook_textarea']);
            $custom_hook_name_compare[] = $custom_hooks[$k]['hook_name'];
        }
        $custom_hooks = dynamik_array_sort($custom_hooks, 'hook_name');
        return $custom_hooks;
    } else {
        return false;
    }
}
/**
 * Get Custom Widget Areas from the database, if any exist, and then return
 * them in a sorted array.
 *
 * @since 1.0
 * @return soreted array of all Custom Widget Areas from the database if they exist.
 */
function dynamik_get_widgets()
{
    $custom_widgets = get_option('dynamik_gen_custom_widget_areas');
    if (!empty($custom_widgets)) {
        foreach ($custom_widgets as $k => $v) {
            $custom_widgets[$k]['conditionals'] = explode('|', $v['conditionals']);
        }
        $custom_widgets = dynamik_array_sort($custom_widgets, 'widget_name');
        return $custom_widgets;
    } else {
        return false;
    }
}