__( 'Main Menu', 'aron' ),
'secondary' => __( 'Secondary menu for footer menu', 'aron' ),
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
/*
* Enable support for Post Formats.
*/
// This theme allows users to set a custom background.
add_theme_support( 'custom-background', apply_filters( 'aron_custom_background_args', array(
'default-color' => 'f5f5f5',
) ) );
// Add support for featured content.
add_theme_support( 'featured-content', array(
'featured_content_filter' => 'aron_get_featured_posts',
'max_posts' => 6,
) );
// This theme uses its own gallery styles.
add_filter( 'use_default_gallery_style', '__return_false' );
}
endif; // aron_setup
add_action( 'after_setup_theme', 'aron_setup' );
function aron_of_head_css() {
$output = '';
$custom_css = esc_attr(get_theme_mod( 'aron_custom_css' ) );
if ($custom_css <> '') {
$output .= $custom_css . "\n";
}
// Output styles
if ($output <> '') {
$output = "\n\n";
echo $output;
}
}
add_action('wp_head', 'aron_of_head_css');
function aron_header_add_favicon() {
$outputfevicon = '';
$custom_fevicon = esc_attr(get_theme_mod( 'aron_logo2' ) );
if ($custom_fevicon <> '') {
$outputfevicon .= $custom_fevicon . "\n";
}
// Output styles
if ($outputfevicon <> '') {
$outputfevicon = '';
echo $outputfevicon;
}
}
add_action('wp_head', 'aron_header_add_favicon');
// Adding breadcrumbs
function aron_breadcrumbs() {
echo '
'. __('Home','aron');
echo "";
if (is_attachment()) {
echo "". __('attachment:','aron');
echo "";
}
if (is_category() || is_single()) {
if(is_category())
{
echo "". __('Category By:','aron');
the_category(' • ');
echo "";
}
if (is_single()) {
echo "";
$category = get_the_category();
echo ''.$category[0]->cat_name.'';
echo "";
echo "";
the_title();
echo "";
}
} elseif (is_page()) {
echo "";
echo the_title();
echo "";
} elseif (is_search()) {
echo "". __('Search Results for...','aron');
echo '"';
echo the_search_query();
echo '"';
echo "";
} elseif (is_tag()) { echo ""; single_tag_title(); echo "";}
elseif (is_day()) {echo"". __('Archive for ','aron'); the_time('F jS, Y'); echo'';}
elseif (is_month()) {echo"". __('Archive for ','aron'); the_time('F, Y'); echo'';}
elseif (is_year()) {echo"". __('Archive for ','aron'); the_time('Y'); echo'';}
elseif (is_author()) {echo"". __('Author Archive for ','aron'); printf(__(' %s', 'aron'), "" . get_the_author() . ""); echo'';}
elseif (!is_single() && !is_page() && get_post_type() != 'post') {
$post_type = get_post_type_object(get_post_type());
//echo $before . $post_type->labels->singular_name . $after;
echo ''. __('Search Results for "','aron').'' . get_search_query() . '"' ; echo "";
}
}
if ( ! function_exists( 'aron_entry_meta' ) ) :
/**
* Set up post entry meta.
*
* Meta information for current post: categories, tags, permalink, author, and date.
**/
function aron_entry_meta() {
$category_list = get_the_category_list( __( ', ', 'aron' ) );
$tag_list = get_the_tag_list( '', __( ', ', 'aron' ) );
$date = sprintf( '',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
$author = sprintf( '%3$s',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( __( 'View all posts by %s', 'aron' ), get_the_author() ) ),
get_the_author()
);
if ( $tag_list ) {
$utility_text = __( ' Posted in : %1$s on %3$s
by : %4$s
', 'aron' );
} elseif ( $category_list ) {
$utility_text = __( ' Posted in : %1$s on %3$s
by : %4$s
', 'aron' );
} else {
$utility_text = __( ' Posted on : %3$s
by : %4$s
', 'aron' );
}
printf(
$utility_text,
$category_list,
$tag_list,
$date,
$author
);
}
endif;
/**********************************/
function aron_special_nav_class( $classes, $item )
{
$classes[] = 'special-class';
return $classes;
}
add_filter( 'nav_menu_css_class', 'aron_special_nav_class', 10, 2 );
/**
* Register aron widget areas.
*
*/
function aron_widgets_init() {
register_sidebar( array(
'name' => __( 'Content Sidebar', 'aron' ),
'id' => 'content-sidebar',
'description' => __( 'Additional sidebar that appears on the right.', 'aron' ),
'before_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'aron_widgets_init' );
/* aron Theme End */
/*
* Add Active class to Wp-Nav-Menu
*/
function aron_active_nav_class($classes, $item){
if( in_array('page_item', $classes) ){
$classes[] = 'active ';
}
return $classes;
}
add_filter('nav_menu_css_class' , 'aron_active_nav_class' , 10 , 2);
function aron_add_nav_class($output) {
$output= preg_replace('/