* @copyright Copyright (c) 2019, Aeon Theme * @link http://www.aeontheme.com/themes/aeonblog * @license http://www.gnu.org/licenses/gpl-2.0.html * Functions which enhance the theme by hooking into WordPress * * @package AeonBlog */ /** * Adds custom classes to the array of body classes. * * @param array $classes Classes for the body element. * @return array */ function aeonblog_body_classes( $classes ) { global $post; // Adds a class of hfeed to non-singular pages. if ( ! is_singular() ) { $classes[] = 'hfeed'; }else{ $classes[] = get_theme_mod( 'aeonblog_sidebar_options', 'right-sidebar' ); } return $classes; } add_filter( 'body_class', 'aeonblog_body_classes' ); /** * Add a pingback url auto-discovery header for single posts, pages, or attachments. */ function aeonblog_pingback_header() { if ( is_singular() && pings_open() ) { echo ''; } } add_action( 'wp_head', 'aeonblog_pingback_header' );