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