$value ) { if ( 'tag' == $value ) { unset( $classes[ $key ] ); } } return $classes; } } // Filter custom logo with correct classes. add_filter( 'get_custom_logo', 'simplenews_change_logo_class' ); if ( ! function_exists( 'simplenews_change_logo_class' ) ) { /** * Replaces logo CSS class. * * @param string $html Markup. * * @return mixed */ function simplenews_change_logo_class( $html ) { $html = str_replace( 'class="custom-logo"', 'class="img-fluid"', $html ); $html = str_replace( 'class="custom-logo-link"', 'class="mr-0 navbar-brand custom-logo-link"', $html ); $html = str_replace( 'alt=""', 'title="Home" alt="logo"', $html ); return $html; } } /** * Display navigation to next/previous post when applicable. */ if ( ! function_exists( 'simplenews_post_nav' ) ) { function simplenews_post_nav() { // Don't print empty markup if there's nowhere to navigate. $previous = ( is_attachment() ) ? get_post( get_post()->post_parent ) : get_adjacent_post( false, '', true ); $next = get_adjacent_post( false, '', false ); if ( ! $next && ! $previous ) { return; } ?> ' . "\n"; } } } add_action( 'wp_head', 'simplenews_pingback' ); if ( ! function_exists( 'simplenews_mobile_web_app_meta' ) ) { /** * Add mobile-web-app meta. */ function simplenews_mobile_web_app_meta() { echo '' . "\n"; echo '' . "\n"; echo '' . "\n"; } } add_action( 'wp_head', 'simplenews_mobile_web_app_meta' ); if ( ! function_exists( 'simplenews_default_body_attributes' ) ) { /** * Adds schema markup to the body element. * * @param array $atts An associative array of attributes. * @return array */ function simplenews_default_body_attributes( $atts ) { $atts['itemscope'] = ''; $atts['itemtype'] = 'http://schema.org/WebSite'; return $atts; } } add_filter( 'simplenews_body_attributes', 'simplenews_default_body_attributes' ); add_filter( 'the_password_form', 'simplenews_password_form' ); if ( ! function_exists( 'simplenews_password_form' ) ) { /** * Customize input form of password protected page. */ function simplenews_password_form( $form = '' ) { global $post; $label = 'pwbox-'.( empty( $post->ID ) ? rand() : $post->ID ); $form = '

' . __( 'This content is password protected. To view it please enter the password below:', 'simplenews' ) . '

'; return $form; } }