* @copyright Copyright (c) 2019, AeonWP * @link https://aeonwp.com/aeonblog * @license http://www.gnu.org/licenses/gpl-2.0.html */ if ( ! function_exists( 'aeonblog_about_user' ) ) { /** * Displays the About section. */ function aeonblog_about_user() { $enable_about = absint( get_theme_mod( 'aeonblog-enable-about', 0 ) ); if ( $enable_about === 1 ) { $about_users = absint( get_theme_mod( 'aeonblog_about_user' ) ); $aeonblog_featured_user = get_user_by( 'ID', $about_users ); if ( ! empty( $aeonblog_featured_user ) && is_front_page() && ! is_paged() ) { echo ''; } } } if ( ! function_exists( 'aeonblog_breadcrumb' ) ) { /** * AeonBlog Breadcrumb * * @since AeonBlog 1.0.0 * * @param null * @return void */ function aeonblog_breadcrumb() { if ( ! is_front_page() && get_theme_mod( 'aeonblog-breadcrumb-option', 1 ) == 1 ) { echo '
'; } } } add_action( 'aeonblog_breadcrumb_hook', 'aeonblog_breadcrumb', 10 ); /** * AeonBlog Excerpt Length * * @since AeonBlog 1.0.0 * * @param null * @return void */ function aeonblog_excerpt_length( $length ) { if ( ! is_admin() ) { return absint( get_theme_mod( 'aeonblog-blog-excerpt', 45 ) ); } } add_filter( 'excerpt_length', 'aeonblog_excerpt_length', 999 ); /** * AeonBlog Add Body Class * * @since AeonBlog 1.0.0 * * @param null * @return void */ function aeonblog_custom_class( $classes ) { $classes[] = 'pt-sticky-sidebar'; $sidebar = get_theme_mod( 'aeonblog-sidebar-options' ); if ( $sidebar == 'no-sidebar' ) { $classes[] = 'no-sidebar'; } elseif ( $sidebar == 'left-sidebar' ) { $classes[] = 'has-left-sidebar'; } elseif ( $sidebar == 'middle-column' ) { $classes[] = 'middle-column'; } else { $classes[] = 'has-right-sidebar'; } return $classes; } add_filter( 'body_class', 'aeonblog_custom_class' ); if ( ! function_exists( 'aeonblog_go_to_top' ) ) { /** * Go to Top * * @since AeonBlog 1.0.0 * * @param null * @return void */ function aeonblog_go_to_top() { if ( get_theme_mod( 'aeonblog-go-to-top', 1 ) == 1 ) { ?> 'angle-double-up' ) ); ?> __( '« Prev', 'aeonblog' ), 'next_text' => __( 'Next »', 'aeonblog' ), ) ); } else { echo "