__( 'Front Page Menu', 'aemon' ),
'subpage-menu' => __( 'Sub Page Menu', 'aemon' )
) );
}
add_action( 'after_setup_theme', 'aemon_setup' );
/**
* Sets the content width in pixels, based on the theme's design and stylesheet.
* Priority 0 to make it available to lower priority callbacks.
*
* @global int $content_width
* @since Aemon 1.0
*/
function aemon_content_width() {
$GLOBALS['content_width'] = apply_filters( 'aemon_content_width', 900 );
}
add_action( 'after_setup_theme', 'aemon_content_width', 0 );
if ( ! function_exists( 'aemon_post_meta_author' ) ) :
/**
* Displays the post author.
*/
function aemon_post_meta_author() {
$author_string = sprintf( '%3$s',
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
esc_attr( sprintf( esc_html__( 'View all posts by %s', 'aemon' ), get_the_author() ) ),
esc_html( get_the_author() )
);
echo wp_kses( $author_string, array( 'a' => array( 'href' => array(), 'class' => array(), 'title' => array(), 'rel' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ) ) );
}
endif;
if ( ! function_exists( 'aemon_post_meta_date' ) ) :
/**
* Displays the post date.
*/
function aemon_post_meta_date() {
$time_string = sprintf( '',
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() )
);
echo wp_kses( $time_string, array( 'span' => array( 'class' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ), 'time' => array( 'class' => array( 'entry-date', 'published', 'updated' ), 'datetime' => array() ), 'a' => array( 'href' => array() ) ) );
}
endif;
if ( ! function_exists( 'aemon_post_comment_count' ) ) :
/**
* Posts comment count.
*
* @since 1.0
*/
function aemon_post_comment_count() {
echo comments_number( esc_html__( 'Be the First to comment.', 'aemon' ), esc_html__( '1 comment', 'aemon' ), esc_html__( '% comments', 'aemon' ) );
}
endif;
if ( ! function_exists( 'aemon_widgets_init' ) ) :
/**
* Register widget areas and custom widgets.
*/
function aemon_widgets_init(){
register_sidebar( array(
'name' => __( 'Sidebar', 'aemon' ),
'id' => 'sidebar-widget-area',
'description' => __( 'The primary widget area', 'aemon' ),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
'after_title' => '
'
) );
}
endif;
add_action( 'widgets_init', 'aemon_widgets_init' );
if ( ! function_exists( 'aemon_pagination' ) ) :
/**
* Aemon pagination function [Display the pagination]
*
* @since 1.0
**/
function aemon_pagination() {
global $wp_query;
$big = 999999999;
$paginate_links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $wp_query->max_num_pages,
'next_text' => '»',
'prev_text' => '«',
'add_args' => false,
) );
if ( $paginate_links ) : ?>
' . get_the_tag_list( '', ', ' ) . '';
}
endif;
if ( ! function_exists( 'aemon_read_more_link' ) ) :
/**
* Aemon read more link.
*
* @since 1.0
*/
function aemon_read_more_link() {
$aemon_postlink = '' . esc_html__( 'Read More', 'aemon' ) . '';
echo wp_kses( $aemon_postlink, array( 'a' => array( 'href' => array(), 'class' => array() ), 'i' => array( 'class' => array(), 'aria-hidden' => array() ) ) );
}
endif;
if ( ! function_exists( 'aemon_author_fullname' ) ) :
/**
* Display author full fame.
*/
function aemon_author_fullname() {
$author_fname = strtoupper( get_the_author_meta( 'first_name' ) );
$author_lname = strtoupper( get_the_author_meta( 'last_name' ) );
if ( ! empty( $author_fname ) || ! empty( $author_lname ) ) {
$author_fullname = $author_fname . ' ' . $author_lname;
} else {
$author_fullname = strtoupper( get_the_author_meta( 'display_name' ) );
}
echo '' . esc_html( $author_fullname ) . '
';
}
endif;
if ( ! function_exists( 'aemon_author_bio' ) ) :
/**
* Display author avatar and description.
*/
function aemon_author_bio() {
$aemon_auth_avat = get_avatar( get_the_author_meta( 'user_email' ), 64 );
$aemon_auth_desc = get_the_author_meta( 'description' );
$aemon_auth_bio = '' . $aemon_auth_avat . '
';
if ( ! empty( $aemon_auth_desc ) ) :
$aemon_auth_bio .= ' ';
endif;
echo wp_kses( $aemon_auth_bio, array( 'div' => array( 'class' => array() ), 'p' => array( 'class' => array() ), 'h6' => array(), 'img' => array( 'src' => array(), 'srcset' => array(), 'class' => array(), 'alt' => array(), 'height' => array(), 'width' => array() ) ) );
}
endif;
if ( ! function_exists( 'aemon_short_about_author' ) ) :
/**
* Display some Information about author on author file.
*
* @since 1.0
*/
function aemon_short_about_author() {
$author_fname = strtoupper( get_the_author_meta( 'first_name' ) );
$author_lname = strtoupper( get_the_author_meta( 'last_name' ) );
if ( ! empty( $author_fname) || ! empty( $author_lname ) ) {
$author_fullname = $author_fname . ' ' . $author_lname;
}
else {
$author_fullname = strtoupper( get_the_author_meta( 'display_name' ) );
}
$author_image = get_avatar( get_the_author_meta( 'user_email' ), 64 );
$author_shabout = get_the_author_meta( 'description' ) ? get_the_author_meta( 'description' ) : esc_html__( 'Lorem Ipsum is simply dummy text printing and typesettingm.', 'aemon' );
$author_about = '';
$author_about .= 'About '.$author_fullname.'
';
$author_about .= '';
$author_about .= '
';
$author_about .= $author_image;
$author_about .= '
';
$author_about .= '
' . $author_shabout . '
';
$author_about .= '
';
echo wp_kses($author_about, array('div' => array( 'class' => array() ), 'p' => array(), 'h6' => array(), 'h5' => array() ) );
}
endif;
?>