esc_html__( 'Header Navigation Menu', 'aryx' ),
'menu-footer' => esc_html__( 'Footer Menu', 'aryx' )
) );
/*
* 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 theme support for selective refresh for widgets.
*/
add_theme_support( 'customize-selective-refresh-widgets' );
/**
* Add support for core custom logo.
*/
add_theme_support( 'custom-logo', array(
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true
) );
}
}
add_action( 'after_setup_theme', 'aryx_setup' );
/**
* Set the content width in pixels, based on the theme's design and stylesheet.
*
* @global int $content_width
*/
function aryx_content_width() {
// This variable is intended to be overruled from themes.
$GLOBALS['content_width'] = apply_filters( 'aryx_content_width', 640 );
}
add_action( 'after_setup_theme', 'aryx_content_width', 0 );
/**
* Register Breadcrumb
*/
function aryx_breadcrumb() {
$breadcrumb_separator = sanitize_text_field( get_theme_mod( 'aryx_f_breadcrumb_separator_s_breadcrumb_p_header', '>>' ) );
if ( !is_front_page() ){
echo '
Home';
if ( is_category() || is_single() ) {
echo ' ' . $breadcrumb_separator . ' ';
the_category( ', ' );
if ( is_single() ) {
echo ' ' . $breadcrumb_separator . ' ';
the_title();
}
} elseif ( is_page() ) {
echo ' ' . $breadcrumb_separator . ' ' . get_the_title();
} elseif ( is_search() ) {
echo ' ' . $breadcrumb_separator . ' Search Results for "';
the_search_query();
echo '"';
}
echo '
';
}
}
/**
* Enqueue classic editor styles.
*/
function aryx_classic_editor_styles() {
$classic_editor_styles = array(
'/assets/dist/editor/bundled/css/aryx-editor-bundled.min.css',
);
add_editor_style( $classic_editor_styles );
}
/**
* Register widget area(s).
*
*/
function aryx_widgets_init() {
register_sidebar(
array(
'name' => esc_html__( 'Main Sidebar', 'aryx' ),
'id' => 'main-sidebar',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer Widget Area 1', 'aryx' ),
'id' => 'footer-widget-area-1',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer Widget Area 2', 'aryx' ),
'id' => 'footer-widget-area-2',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer Widget Area 3', 'aryx' ),
'id' => 'footer-widget-area-3',
'before_widget' => '',
'before_title' => '',
)
);
register_sidebar(
array(
'name' => esc_html__( 'Footer Widget Area 4', 'aryx' ),
'id' => 'footer-widget-area-4',
'before_widget' => '',
'before_title' => '',
)
);
}
add_action( 'widgets_init', 'aryx_widgets_init' );
/**
* Enqueue scripts and styles.
*/
require get_template_directory() . '/inc/assets.php';
/**
* Custom template tags for this theme.
*/
require get_template_directory() . '/inc/template/template-tags.php';
/**
* Functions which enhance the theme by hooking into WordPress.
*/
require get_template_directory() . '/inc/template/template-functions.php';
/**
* Customizer additions.
*/
require get_template_directory() . '/inc/customizer/customizer.php';
/**
* Load Jetpack compatibility file.
*/
if ( defined( 'JETPACK__VERSION' ) ) {
require get_template_directory() . '/inc/compatibility/jetpack/jetpack.php';
}
/**
* Load Bootstrap Navwalker
*/
require_once get_template_directory() . '/inc/bootstrap-navwalker/class-wp-bootstrap-navwalker.php';
/**
* Custom Page Metaboxes
*/
require_once get_template_directory() . '/inc/metaboxes/aryx-page-settings.php';
/**
* TGMPA Class
*/
require_once get_parent_theme_file_path( '/inc/tgmpa/class-tgmpa.php' );
/**
* TGMPA Configuration
*/
require_once get_parent_theme_file_path( '/inc/tgmpa-config.php' );