__( 'Primary Menu', 'athenea' ),
) );
// Enable support for Post Formats.
//add_theme_support( 'post-formats', array( 'aside', 'image', 'video', 'audio', 'quote', 'link' ) );
// Enable support for title-tag.
function spi_setup() {
add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'spi_setup' );
// Setup the WordPress core custom background feature.
add_theme_support( 'custom-background', apply_filters( 'athenea_custom_background_args', array(
'default-color' => 'ffffff',
'default-image' => '',
) ) );
}
endif; // athenea_setup
add_action( 'after_setup_theme', 'athenea_setup' );
// Register widgetized area and update sidebar with default widgets.
function athenea_widgets_init() {
register_sidebar( array(
'name' => __( 'Sidebar', 'athenea' ),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
));
// Footer A
register_sidebar( array(
'name' => __( 'Footer A', 'athenea' ),
'id' => 'sidebar-6',
'before_widget' => '',
'before_title' => '',
));
// Footer B
register_sidebar( array(
'name' => __( 'Footer B', 'athenea' ),
'id' => 'sidebar-7',
'before_widget' => '',
'before_title' => '',
));
// Footer C
register_sidebar( array(
'name' => __( 'Footer C', 'athenea' ),
'id' => 'sidebar-8',
'before_widget' => '',
'before_title' => '',
));
// Footer C
register_sidebar( array(
'name' => __( 'Footer D', 'athenea' ),
'id' => 'sidebar-9',
'before_widget' => '',
'before_title' => '',
));
}
add_action( 'widgets_init', 'athenea_widgets_init' );
// Enqueue styles and scripts.
function athenea_scripts_styles() {
wp_enqueue_style( 'athenea-style', get_stylesheet_uri() );
wp_enqueue_style('athenea-fonts', '//fonts.googleapis.com/css?family=Nunito:300|Aclonica', array(), null );
/** Design change */
if ( !is_admin() ) {
if ( of_get_option('unique_design', 'design-red' ) == 'design-red' ) {
wp_enqueue_style( 'athenea-red', get_template_directory_uri() . '/inc/dist/css/athenea-red-min.css' );
wp_enqueue_style('athenea-red');
} else {
wp_enqueue_style( 'athenea-blue', get_template_directory_uri() . '/inc/dist/css/athenea-blue-min.css' );
wp_enqueue_style('athenea-blue');
}
}
wp_enqueue_script('athenea-menu', get_template_directory_uri().'/js/athenea.js', array(), '1.1.5', true);
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action( 'wp_enqueue_scripts', 'athenea_scripts_styles' );
// Adds IE specific scripts
function athenea_print_ie_scripts() {
?>
' . __( 'Name', 'athenea' ) . '
' . ( $req ? '
' . __('required', 'athenea') . '
' : '' ) . '
';
}
add_filter( 'comment_form_field_author', 'athenea_comment_form_field_author');
// E-Mail
function athenea_comment_form_field_email( $html ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
return '';
}
add_filter( 'comment_form_field_email', 'athenea_comment_form_field_email');
// Website
function athenea_comment_form_field_url( $html ) {
$commenter = wp_get_current_commenter();
return '';
}
add_filter( 'comment_form_field_url', 'athenea_comment_form_field_url');
// Comment
function athenea_comment_form_defaults( $defaults ) {
return wp_parse_args( array(
'comment_field' => '' . __( 'Comment', 'athenea' ) . '
',
'comment_notes_before' => '',
'comment_notes_after' => '' . sprintf( __( 'You may use these HTML tags and attributes: %s', 'athenea' ), '' . allowed_tags() . ' ' ) . '';
}
add_action( 'comment_form', 'athenea_comment_form' );
// Implement the Custom Header feature.
require get_template_directory() . '/inc/custom-header.php';
function athenea_print_imghead_style() { ?>
/';
preg_match_all($pattern, $content, $matches);
foreach ($matches[0] as $match) {
$wrappedframe = '' . $match . '
';
$content = str_replace($match, $wrappedframe, $content);
}
return $content;
}
add_filter( 'the_content', 'video_content_filter' );
add_filter( 'widget_text', 'video_content_filter' );
}
// Add optionsframework
if ( !function_exists( 'optionsframework_init' ) ) {
define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/' );
require_once dirname( __FILE__ ) . '/inc/options-framework.php';
}
add_action('optionsframework_custom_scripts', 'optionsframework_custom_scripts');
function optionsframework_custom_scripts()
{ ?>
' . ( $req ? '' . __('required', 'athenea') . ', ' : '' ) . __( 'will not be published', 'athenea' ) . '