__( 'Primary Menu', 'adler' ),
'footer' => __( 'Footer Menu', 'adler' )
) );
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
)
);
/*
* Add editor custom style to make it look more like the frontend
* Also enqueue the custom Google Fonts also
*/
add_editor_style( array( 'editor-style.css', adler_fonts_url() ) );
$defaults = array(
'default-color' => '#FFF'
);
add_theme_support( 'custom-background', $defaults );
}
endif; // the_adler_setup
add_action( 'after_setup_theme', 'adler_setup' );
/**
* Enqueue scripts and styles.
*/
function adler_scripts() {
//FontAwesome Stylesheet
wp_enqueue_style( 'the-adler-font-awesome-style', get_stylesheet_directory_uri() . '/assets/css/font-awesome.css', array(), '4.3.0' );
wp_enqueue_style( 'the-adler-style', get_stylesheet_uri(), array('the-adler-font-awesome-style') );
wp_enqueue_script( 'the-adler-navigation', get_template_directory_uri() . '/js/navigation.js', array( 'jquery' ), '20120206', true );
wp_enqueue_script( 'the-adler-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
//Default Fonts
wp_enqueue_style( 'the-adler-fonts', adler_fonts_url(), array(), null );
}
add_action( 'wp_enqueue_scripts', 'adler_scripts' );
//Registering Sidebar
function adler_widgets_init() {
register_sidebar( array(
'name' => __( 'Left Footer', 'adler' ),
'id' => 'sidebar-left',
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'adler' ),
'before_widget' => '
',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Right Footer', 'adler' ),
'id' => 'sidebar-right',
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'adler' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Center Footer', 'adler' ),
'id' => 'sidebar-center',
'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'adler' ),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
) );
}
add_action( 'widgets_init', 'adler_widgets_init' );
/**
* Filters wp_title to print a neat tag based on what is being viewed.
*
* @param string $title Default title text for current view.
* @param string $sep Optional separator.
* @return string The filtered title.
*/
function adler_wp_title( $title, $sep ) {
if ( is_feed() ) {
return $title;
}
global $page, $paged;
// Add a page number if necessary:
if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() ) {
$title .= " $sep " . sprintf( __( 'Page %s', 'adler' ), max( $paged, $page ) );
}
return $title;
}
add_filter( 'wp_title', 'adler_wp_title', 10, 2 );
/**
* Implement the Custom Header feature.
*/
//require get_template_directory() . '/inc/custom-header.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template-tags.php';
/**
* Custom functions that act independently of the theme templates.
*/
require get_template_directory() . '/inc/extras.php';
/**
* Load Adler Class
*/
require get_template_directory() . '/inc/adler.php';
/**
* Load Customify plugin configuration
*/
require get_template_directory() . '/inc/customify_config.php';
/**
* Load Recommended/Required plugins notification
*/
require get_template_directory() . '/inc/required-plugins/required-plugins.php';