130 || quadro_get_brightness($post_background) == '' ? $body_dark : $body_light; $this_post_css = ''; $this_post_css .= '#post-' . $post_id . ' { background-color: ' . $post_background . '; color: ' . $post_color . '; }'; $this_post_css .= '#post-' . $post_id . ' h1 a, #post-' . $post_id . ' a, #post-' . $post_id . ' .cat-links { color: ' . $post_color . '; }'; $this_post_css .= '#post-' . $post_id . ' .posted-on a, #post-' . $post_id . ' .post-icon:before { color: ' . $post_color . '; }'; $this_post_css .= '#post-' . $post_id . ' .post-icon { background: ' . $post_background . '; }'; // We add this to prevent same background overlap on icon and post when no thumbnail $this_post_css .= '#post-' . $post_id . ':not(.has-post-thumbnail):not(.format-video):not(.format-gallery) .post-icon { background: rgba(0,0,0,0.1); }'; echo ''; } } endif; // if !function_exists // Aply CSS styles to POST ICON for Colors & Background if ( ! function_exists( 'quadro_icon_styles' ) ) : function quadro_icon_styles( $post_id ) { global $quadro_options; $post_background = esc_attr( get_post_meta( get_the_ID(), 'quadro_post_blog_back', true ) ); $post_background = $post_background == '#000' || $post_background == '#000000' ? $post_background = '#010101' : $post_background; // Defining default light and dark body colors for blog posts $body_light = '#fff'; $body_dark = '#000'; if ( $post_background != '#' && $post_background != '' ) { $post_color = quadro_get_brightness($post_background) > 130 || quadro_get_brightness($post_background) == '' ? $body_dark : $body_light; $icon_css = '#post-' . $post_id . ' .post-icon:before { color: ' . $post_color . '; }'; $icon_css .= '#post-' . $post_id . ' .post-icon { background: ' . $post_background . '; }'; echo ''; } } endif; // if !function_exists // Modify the output for the More Tag in posts if ( ! function_exists( 'quadro_more_tag' ) ) : function quadro_more_tag() { return '' . __('Read more', 'quadro') . ''; } endif; // if !function_exists add_filter( 'the_content_more_link', 'quadro_more_tag' ); /*-----------------------------------------------------------------------------------*/ /* Sections Output (printint) Functions /*-----------------------------------------------------------------------------------*/ /** * Print Site Title & Gravatar / Logo */ if ( ! function_exists( 'quadro_site_title' ) ) : function quadro_site_title() { // Retrieve Theme Options global $quadro_options; if ( $quadro_options['logo_type'] == 'gravatar' ) { if ( get_avatar( get_bloginfo('admin_email') ) ) echo '' . get_avatar( get_bloginfo('admin_email'), $size='120', '', get_bloginfo('name') ) . ''; ?>