__( 'Primary Menu', 'apoc' ),
) );
// Enable support for Post Formats.
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link' ) );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'apoc_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
// Enable support for HTML5 markup.
add_theme_support( 'html5', array(
'comment-list',
'search-form',
'comment-form',
) );
add_theme_support( 'post-thumbnails' );
/**
* Set the content width based on the theme's design and stylesheet.
*/
if ( ! isset( $content_width ) ) {
$content_width = 640; /* pixels */
}
}
endif; // apoc_setup
add_action( 'after_setup_theme', 'apoc_setup' );
/**
* Register widgetized area and update sidebar with default widgets.
*/
function apoc_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'apoc' ),
'id' => 'apoc-main-sidebar',
'before_widget' => '',
'before_title' => '
',
) );
/**
* Social Widget
*/
require get_template_directory() . '/inc/apoc-social-widget.php';
register_widget( 'Apoc_Social_Widget' );
}
add_action( 'widgets_init', 'apoc_widgets_init' );
/**
* Enqueue scripts and styles.
*/
function apoc_scripts() {
// Use minified libraries if SCRIPT_DEBUG is turned off
$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_style( 'apoc-style', get_template_directory_uri( __FILE__ ) . '/css/style.css' );
wp_enqueue_style( 'apoc-font-awesome', get_template_directory_uri( __FILE__ ) . '/css/font-awesome' . $suffix . '.css' );
wp_enqueue_script( 'apoc-navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( 'apoc-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' );
}
}
add_action( 'wp_enqueue_scripts', 'apoc_scripts' );
/**
* Enqueue Google Fonts
*/
function apoc_google_fonts() {
if ( ! is_admin() ) {
$protocol = is_ssl() ? 'https' : 'http';
wp_register_style( 'apoc-comfortaa', $protocol .'://fonts.googleapis.com/css?family=Comfortaa&subset=latin,cyrillic-ext', array(), false, 'all' );
wp_enqueue_style( 'apoc-comfortaa' );
}
}
add_action( 'wp_enqueue_scripts', 'apoc_google_fonts' );
/**
* Add Editor Styles
*/
function apoc_add_editor_styles() {
add_editor_style( 'custom-editor-style.css' );
}
add_action( 'init', 'apoc_add_editor_styles' );
/**
* Add Responsive Menu scripts
*/
function apoc_responsive_menu() {
wp_enqueue_script(
'apoc_responsive_menu',
get_stylesheet_directory_uri() . '/js/responsive-menu.js',
array( 'jquery' )
);
}
add_action( 'wp_enqueue_scripts', 'apoc_responsive_menu' );
/**
* 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';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer.php';
/**
* Load Jetpack compatibility file.
*/
require get_template_directory() . '/inc/jetpack.php';