__( 'Primary Menu', 'something-fishy' ),
) );
/**
* Add support for the Aside Post Formats
*/
add_theme_support( 'post-formats', array( 'aside','status' ) );
}
endif; // somethingfishy_setup
add_action( 'after_setup_theme', 'somethingfishy_setup' );
/**
* Register widgetized area and update sidebar with default widgets
*
* @since Something Fishy 1.0
*/
function somethingfishy_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'something-fishy' ),
'id' => 'sidebar-1',
'before_widget' => '",
'before_title' => '
',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 1', 'something-fishy' ),
'id' => 'footer-sidebar-1',
'before_widget' => '",
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 2', 'something-fishy' ),
'id' => 'footer-sidebar-2',
'before_widget' => '",
'before_title' => '',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 3', 'something-fishy' ),
'id' => 'footer-sidebar-3',
'before_widget' => '",
'before_title' => '',
) );
}
add_action( 'widgets_init', 'somethingfishy_widgets_init' );
/**
* Enqueue Google Fonts
*/
function somethingfishy_fonts() {
/* translators: If there are characters in your language that are not supported
by Port Lligat Sans, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Port Lligat Sans font: on or off', 'something-fishy' ) ) {
$port_query_args = array(
'family' => 'Port+Lligat+Sans',
'subset' => 'latin',
);
wp_register_style( 'somethingfishy-portlligatsans', add_query_arg( $port_query_args, "https://fonts.googleapis.com/css" ), array(), null );
}
/* translators: If there are characters in your language that are not supported
by Oswald, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Oswald font: on or off', 'something-fishy' ) ) {
$oswald_query_args = array(
'family' => 'Oswald:400,700,300',
'subset' => 'latin,latin-ext',
);
wp_register_style( 'somethingfishy-oswald', add_query_arg( $oswald_query_args, "https://fonts.googleapis.com/css" ), array(), null );
}
/* translators: If there are characters in your language that are not supported
by Pacifico, translate this to 'off'. Do not translate into your own language. */
if ( 'off' !== _x( 'on', 'Pacifico font: on or off', 'something-fishy' ) ) {
$pacifico_query_args = array(
'family' => 'Pacifico',
'subset' => 'latin',
);
wp_register_style( 'somethingfishy-pacifico', add_query_arg( $pacifico_query_args, "https://fonts.googleapis.com/css" ), array(), null );
}
}
add_action( 'init', 'somethingfishy_fonts' );
/**
* Enqueue scripts and styles
*/
function somethingfishy_scripts() {
global $post;
wp_enqueue_style( 'somethingfishy-style', get_stylesheet_uri() );
wp_enqueue_script( 'somethingfishy-small-menu', get_template_directory_uri() . '/js/fishy.js', array( 'jquery' ), '20121020', true );
wp_enqueue_script( 'somethingfishy-parallax', get_template_directory_uri() . '/js/parallax.js', array( 'jquery' ), '20121020' );
wp_enqueue_style( 'somethingfishy-portlligatsans' );
wp_enqueue_style( 'somethingfishy-oswald' );
wp_enqueue_style( 'somethingfishy-pacifico' );
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( 'somethingfishy_keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );
}
}
add_action( 'wp_enqueue_scripts', 'somethingfishy_scripts' );
/**
* Enqueue font styles in custom header admin
*/
function somethingfishy_admin_fonts( $hook_suffix ) {
if ( 'appearance_page_custom-header' != $hook_suffix )
return;
wp_enqueue_style( 'somethingfishy-portlligatsans' );
wp_enqueue_style( 'somethingfishy-oswald' );
wp_enqueue_style( 'somethingfishy-pacifico' );
}
add_action( 'admin_enqueue_scripts', 'somethingfishy_admin_fonts' );
/**
* 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/tweaks.php' );
/**
* Load Jetpack compatibility file.
*/
if ( file_exists( get_template_directory() . '/inc/jetpack.php' ) )
require get_template_directory() . '/inc/jetpack.php';