__( 'Primary Menu', 'pachyderm' ),
) );
/**
* Add support for Post Formats
*/
add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'quote', 'link', 'status', 'audio', 'chat', 'gallery' ) );
/**
* Add support for editor style
*/
add_editor_style();
/**
* Setup the WordPress core custom background feature.
*
* Hooks into the after_setup_theme action.
*
* @since Pachyderm 1.0
*/
add_theme_support( 'custom-background', apply_filters( 'pachyderm_custom_background_args', array(
'default-color' => 'fef8cd',
'default-image' => get_template_directory_uri() . '/img/background.png',
) ) );
}
endif; // pachyderm_setup
add_action( 'after_setup_theme', 'pachyderm_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Pachyderm 1.0
*/
function pachyderm_widgets_init() {
register_sidebar( array(
'id' => 'primary-sidebar',
'name' => __( 'Primary Sidebar' , 'pachyderm' ),
'before_widget' => '',
'before_title' => '
'
)
);
}
add_action( 'widgets_init', 'pachyderm_widgets_init' );
/**
* Enqueue scripts and styles
*/
function pachyderm_scripts() {
global $post;
wp_enqueue_style( 'pachyderm-style', get_stylesheet_uri() );
wp_enqueue_style( 'pachyderm-gudea' );
wp_enqueue_style( 'pachyderm-berkshire-swash' );
wp_enqueue_style( 'pachyderm-poiret-one' );
wp_enqueue_script( 'navigation', get_template_directory_uri() . '/js/navigation.js', array(), '20120206', true );
wp_enqueue_script( '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' );
}
if ( is_singular() && wp_attachment_is_image( $post->ID ) ) {
wp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'pachyderm_scripts' );
/*
* Register Google Fonts
*/
function pachyderm_fonts() {
/* translators: If there are characters in your language that are not supported
by Berkshire Swash, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Berkshire Swash font: on or off', 'pachyderm' ) ) {
wp_register_style( 'pachyderm-berkshire-swash', "https://fonts.googleapis.com/css?family=Berkshire+Swash&subset=latin,latin-ext" );
}
/* translators: If there are characters in your language that are not supported
by Poiret One, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Poiret One font: on or off', 'pachyderm' ) ) {
wp_register_style( 'pachyderm-poiret-one', "https://fonts.googleapis.com/css?family=Poiret+One&subset=latin,latin-ext,cyrillic" );
}
/* translators: If there are characters in your language that are not supported
by Gudea, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Gudea font: on or off', 'pachyderm' ) ) {
wp_register_style( 'pachyderm-gudea', "https://fonts.googleapis.com/css?family=Gudea:400,400italic,700&subset=latin,latin-ext" );
}
}
add_action( 'init', 'pachyderm_fonts' );
/**
* Change excerpt [...] to a Continue Reading link
**/
function pachyderm_new_excerpt_more( $more ) {
global $post;
return '...
' . __( 'Continue reading →', 'pachyderm' ) . '';
}
add_filter( 'excerpt_more', 'pachyderm_new_excerpt_more' );
/**
* Enqueue Google Fonts for custom headers
*/
function pachyderm_admin_scripts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
wp_enqueue_style( 'pachyderm-gudea' );
wp_enqueue_style( 'pachyderm-berkshire-swash' );
}
add_action( 'admin_enqueue_scripts', 'pachyderm_admin_scripts' );
/**
* Implement the Custom Header feature
*/
require( get_template_directory() . '/inc/custom-header.php' );