$value ) { if ( 'tag' == $value ) { unset( $classes[ $key ] ); } } return $classes; } } // Filter custom logo with correct classes. add_filter( 'get_custom_logo', 'bootredux_change_logo_class' ); if ( ! function_exists( 'bootredux_change_logo_class' ) ) { /** * Replaces logo CSS class. * * @param string $html Markup. * * @return mixed */ function bootredux_change_logo_class( $html ) { $html = str_replace( 'class="custom-logo"', 'class="img-fluid"', $html ); $html = str_replace( 'class="custom-logo-link"', 'class="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( 'bootredux_post_nav' ) ) : function bootredux_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; } ?> $_wp_additional_image_sizes[ $_size ]['width'], 'height' => $_wp_additional_image_sizes[ $_size ]['height'], 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'], ); } } return $sizes; } /** * Insert code snippet in the head section */ add_action('wp_head', 'bootredux_insert_header_code'); function bootredux_insert_header_code(){ $code = get_theme_mod( 'bootredux_header_code', '' ); if ($code != '') echo html_entity_decode($code) . "\n"; }; /** * Insert code snippet in the footer section */ add_action('wp_footer', 'bootredux_insert_footer_code'); function bootredux_insert_footer_code(){ $code = get_theme_mod( 'bootredux_footer_code', '' ); if ($code != '') echo html_entity_decode($code) . "\n"; }; /** * Show thumbnail with default fallback */ function bootredux_featured_image_url($size='full'){ $image = wp_get_attachment_image_src(get_post_thumbnail_id(), $size); if($image) { // Use Aqua Resizer Thumbnail $image_url = aq_resize($image[0], 600, 400, true, true, true); } else { $image_url = get_template_directory_uri(). '/images/default.jpg'; } return $image_url; }