ID, 'blogmarks_enable_sidebar_border', true ); } if ( empty( $enable_sidebar_border ) ) { $enable_sidebar_border = blogmarks_get_option( 'front_page_enable_sidebar_border' ); } if ( $enable_sidebar_border ) { $classes[] = 'has-sidebar-border'; } } else { $sticky = blogmarks_get_option( 'sticky_sidebar', true ); // Fetch from Post Meta on single posts or pages. if ( $post && is_singular() ) { $enable_sidebar_border = get_post_meta( $post->ID, 'blogmarks_enable_sidebar_border', true ); if ( empty( $enable_sidebar_border ) && is_single() ) { $enable_sidebar_border = blogmarks_get_option( 'global_enable_sidebar_border' ); } if ( $enable_sidebar_border ) { $classes[] = 'has-sidebar-border'; } } } if ( $sticky ) { $classes[] = 'has-sticky-sidebar'; } // Check for title line animation. $title_line_hover = blogmarks_get_option( 'global_show_title_line_hover', true ); if ( $title_line_hover ) { $classes[] = 'has-title-line-hover'; } return $classes; } add_filter( 'body_class', 'blogmarks_body_classes' ); /** * Add a pingback url auto-discovery header for single posts, pages, or attachments. */ function blogmarks_pingback_header() { if ( is_singular() && pings_open() ) { printf( '', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'blogmarks_pingback_header' ); if ( ! function_exists( 'wp_body_open' ) ) : /** * Shim for sites older than 5.2. * * @link https://core.trac.wordpress.org/ticket/12563 */ function wp_body_open() { do_action( 'wp_body_open' ); } endif; /** * Minor header styles/scripts that needs to run before other styles/scripts */ function blogmarks_head_scripts() { ?>