function enlightenment_accessibility_search_form_args($args)
{
    $defaults = array('label_class' => 'screen-reader-text', 'label' => __('Search for:', 'enlightenment'));
    $defaults = apply_filters('enlightenment_accessibility_search_form_args', $defaults);
    $args = wp_parse_args($args, $defaults);
    $args['before'] .= '<label' . (!empty($args['input_id']) ? ' for="' . esc_attr($args['input_id']) . '"' : '') . enlightenment_class($args['label_class']) . '>';
    $args['before'] .= $args['label'];
    $args['before'] .= '</label>';
    return $args;
}
Example #2
0
function enlightenment_logo_image($args = null)
{
    $defaults = array('class' => 'site-logo', 'alt' => get_bloginfo('name'));
    $defaults = apply_filters('enlightenment_logo_image_args', $defaults);
    $args = wp_parse_args($args, $defaults);
    $logo = enlightenment_theme_option('logo');
    $logo_id = is_array($logo) && isset($logo['image']) ? $logo['image'] : false;
    if (false === $logo_id && current_theme_supports('enlightenment-logo', 'default-image')) {
        $logo = '<img' . enlightenment_class($args['class']) . (empty($args['alt']) ? '' : 'alt="' . esc_attr($args['alt']) . '"') . ' src="' . esc_url(current_theme_supports('enlightenment-logo', 'default-image')) . '" />';
    } elseif (false == $logo_id) {
        $logo = '';
    } else {
        $logo = wp_get_attachment_image($logo_id, 'enlightenment-logo', false, $args);
    }
    return apply_filters('enlightenment_logo_image', $logo);
}
Example #3
0
function enlightenment_bootstrap_paginate_links($output, $args)
{
    if ($args['paged']) {
        $args['prev_class'] .= ' page-numbers';
        $args['next_class'] .= ' page-numbers';
        $output = str_replace('prev page-numbers', $args['prev_class'], $output);
        $output = str_replace('next page-numbers', $args['next_class'], $output);
        $output = str_replace('<ul class=\'page-numbers\'>', '<ul class="page-numbers pagination">', $output);
        $output = str_replace('<li><a' . enlightenment_class($args['prev_class']), '<li' . enlightenment_class($args['prev_class']) . '><a', $output);
        $output = str_replace('<li><a' . enlightenment_class($args['next_class']), '<li' . enlightenment_class($args['next_class']) . '><a', $output);
        $output = str_replace("<li><a class='page-numbers'", '<li class="page-numbers"><a', $output);
        $output = str_replace("<li><span class='page-numbers current'>", '<li class="page-numbers current active"><span>', $output);
    }
    return $output;
}
Example #4
0
function enlightenment_footer_class($args = null)
{
    $defaults = array('class' => 'site-footer', 'echo' => true);
    $defaults = apply_filters('enlightenment_footer_class_args', $defaults);
    $args = wp_parse_args($args, $defaults);
    return enlightenment_class($args['class'], $args['echo']);
}
Example #5
0
function enlightenment_submit_button($args, $echo = true)
{
    $defaults = array('name' => '', 'class' => 'button', 'id' => '', 'value' => '');
    $args = wp_parse_args($args, $defaults);
    $args = apply_filters('enlightenment_submit_button_args', $args);
    $output = '';
    $output .= '<input ';
    $output .= 'name="' . apply_filters('enlightenment_submit_button_name', esc_attr($args['name'])) . '"';
    $output .= enlightenment_class($args['class']);
    $output .= enlightenment_id($args['id']) . ' ';
    $output .= 'value="' . esc_attr($args['value']) . '" ';
    $output .= 'type="submit" ';
    $output .= '/>';
    $output = apply_filters('enlightenment_submit_button', $output, $args);
    if (!$echo) {
        return $output;
    }
    echo $output;
}
Example #6
0
function enlightenment_comment_form_defaults($defaults)
{
    $args = array('container' => 'p', 'container_class' => 'comment-form-comment', 'label_class' => '', 'textarea_class' => '', 'textarea_id' => 'comment', 'cols' => 45, 'rows' => 8, 'before_label' => '', 'after_label' => '');
    $args = apply_filters('enlightenment_comment_form_defaults_args', $args);
    $defaults['comment_field'] = enlightenment_open_tag($args['container'], $args['container_class']) . '<label' . ('' != $args['textarea_id'] ? ' for="' . $args['textarea_id'] . '"' : '') . enlightenment_class($args['label_class']) . '>' . $args['before_label'] . _x('Comment', 'noun', 'enlightenment') . '</label>' . '<textarea' . enlightenment_id($args['textarea_id']) . enlightenment_class($args['textarea_class']) . ' name="comment" cols="' . intval($args['cols']) . '" rows="' . intval($args['rows']) . '" aria-required="true"></textarea>' . enlightenment_close_tag($args['container']);
    return $defaults;
}