Used in hooks:
*
* @see ast_masthead_get_menu_items
* @see ast_masthead_custom_nav_menu_items
*
* @since 1.0
*/
function ast_masthead_get_menu_items() {
// Get selected custom menu items.
$markup = '';
$sections = ast_get_dynamic_header_content( 'header-main-rt-section' );
if ( array_filter( $sections ) ) {
ob_start();
?>
Used in files:
*
* /header.php
*
* @since 1.0
* @param array $args Array of arguments.
* @return array Modified menu item array.
*/
function ast_masthead_custom_page_menu_items( $args ) {
if ( isset( $args['theme_location'] ) ) {
if ( 'primary' === $args['theme_location'] ) {
$markup = ast_masthead_get_menu_items();
if ( $markup ) {
$args['after'] = $markup . '';
}
}
}
return $args;
}
endif;
/**
* Header Custom Menu Item
*/
if ( ! function_exists( 'ast_masthead_custom_nav_menu_items' ) ) :
/**
* Header Custom Menu Item
*
* => Used in files:
*
* /header.php
*
* @since 1.0
* @param array $items Nav menu item array.
* @param array $args Nav menu item arguments array.
* @return array Modified menu item array.
*/
function ast_masthead_custom_nav_menu_items( $items, $args ) {
if ( isset( $args->theme_location ) ) {
if ( 'primary' === $args->theme_location ) {
$markup = ast_masthead_get_menu_items();
if ( $markup ) {
$items .= $markup;
}
}
}
return $items;
}
endif;
/**
* Header toggle buttons
*/
if ( ! function_exists( 'ast_masthead_toggle_buttons_primary' ) ) {
/**
* Header toggle buttons
*
* => Used in files:
*
* /header.php
*
* @since 1.0
*/
function ast_masthead_toggle_buttons_primary() {
?>
Used in files:
*
* /footer.php
*
* @since 1.0
*/
function ast_footer_small_footer_template() {
$small_footer_layout = ast_get_option_meta( 'footer-sml-layout', '', 'footer-sml-layout-2' );
if ( 'disabled' != $small_footer_layout ) {
$small_footer_layout = str_replace( 'footer-sml-layout-', '', $small_footer_layout );
// Default footer layout 1 is ast-footer-layout.
if ( '1' == $small_footer_layout ) {
$small_footer_layout = '';
}
get_template_part( 'template-parts/footer/footer-sml-layout', $small_footer_layout );
}
}
}
/**
* Primary Header
*/
if ( ! function_exists( 'ast_masthead_primary_template' ) ) {
/**
* Primary Header
*
* => Used in files:
*
* /header.php
*
* @since 1.0
*/
function ast_masthead_primary_template() {
get_template_part( 'template-parts/header/header-main-layout' );
}
}
/**
* Single post markup
*/
if ( ! function_exists( 'ast_entry_content_single_template' ) ) {
/**
* Single post markup
*
* => Used in files:
*
* /template-parts/content-single.php
*
* @since 1.0
*/
function ast_entry_content_single_template() {
get_template_part( 'template-parts/single/single-layout' );
}
}
/**
* Blog post list markup for blog & search page
*/
if ( ! function_exists( 'ast_entry_content_blog_template' ) ) {
/**
* Blog post list markup for blog & search page
*
* => Used in files:
*
* /template-parts/content-blog.php
* /template-parts/content-search.php
*
* @since 1.0
*/
function ast_entry_content_blog_template() {
get_template_part( 'template-parts/blog/blog-layout' );
}
}
/**
* 404 markup
*/
if ( ! function_exists( 'ast_entry_content_404_page_template' ) ) {
/**
* 404 markup
*
* => Used in files:
*
* /template-parts/content-404.php
*
* @since 1.0
*/
function ast_entry_content_404_page_template() {
$layout_404 = ast_get_option( 'ast-404-layout' );
$layout_404 = str_replace( '404-layout-', '', $layout_404 );
// Default 404 is nothing but the 404 layout 1.
if ( '1' == $layout_404 ) {
$layout_404 = '';
}
get_template_part( 'template-parts/404/404-layout', $layout_404 );
}
}