*/ // Get custom-logo URL function clean_gallery_custom_logo() { if ( ! has_custom_logo() ) {return;} $clean_gallery_custom_logo_id = get_theme_mod( 'custom_logo' ); $clean_gallery_logo = wp_get_attachment_image_src( $clean_gallery_custom_logo_id , 'full' ); return $clean_gallery_logo[0]; } // Site Title function clean_gallery_site_title() { if ( is_front_page() && is_home() ) { ?>

'clean-gallery-single-post-thumbnail', 'title' => the_title_attribute( 'echo=0' ), 'itemprop' => 'image')); ?> 'clean-gallery-single-post-thumbnail', 'title' => the_title_attribute( 'echo=0' ), 'itemprop' => 'image')); ?> ID)) as $category) { $classes [] = 'wpcat-' . $category->cat_ID . '-id'; } return $classes; } add_filter('post_class', 'clean_gallery_category_id_class'); // Change excerpt length function clean_gallery_excerpt_length($length) { if ( is_admin() ) { return $length; } $read_more_length = 12; if ( clean_gallery_get_option('read_more_length') ) { $read_more_length = clean_gallery_get_option('read_more_length'); } return $read_more_length; } add_filter('excerpt_length', 'clean_gallery_excerpt_length'); // Change excerpt more word function clean_gallery_excerpt_more() { $readmoretext = esc_html__('Read More', 'clean-gallery'); if ( clean_gallery_get_option('read_more_text') ) { $readmoretext = esc_html(clean_gallery_get_option('read_more_text')); } return $readmoretext; } function clean_gallery_footer_grid_cols() { $footer_column = 'clean-gallery-footer-4-col'; return $footer_column; } // Adds custom classes to the array of body classes. function clean_gallery_body_classes( $classes ) { // Adds a class of group-blog to blogs with more than 1 published author. if ( is_multi_author() ) { $classes[] = 'clean-gallery-group-blog'; } if ( get_header_image() ) { $classes[] = 'clean-gallery-header-image-active'; } if ( has_custom_logo() ) { $classes[] = 'clean-gallery-custom-logo-active'; } if( is_singular() ) { if ( is_page_template( array( 'template-full-width-page.php', 'template-full-width-post.php', 'template-full-width.php' ) ) ) { $classes[] = 'clean-gallery-layout-full-width'; } } else { if ( is_404() ) { $classes[] = 'clean-gallery-layout-full-width'; } } if ( is_404() ) { $classes[] = 'clean-gallery-404-page'; } if ( !is_active_sidebar( 'clean-gallery-home-bottom-widgets' ) && !is_active_sidebar( 'clean-gallery-single-bottom-widgets' ) && !is_active_sidebar( 'clean-gallery-singular-bottom-widgets' ) && !is_active_sidebar( 'clean-gallery-bottom-widgets' ) ) { $classes[] = 'clean-gallery-no-bottom-widgets'; } return $classes; } add_filter( 'body_class', 'clean_gallery_body_classes' ); if ( ! function_exists( 'wp_body_open' ) ) : /** * Fire the wp_body_open action. * * Added for backwards compatibility to support pre 5.2.0 WordPress versions. */ function wp_body_open() { // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedFunctionFound /** * Triggered after the opening tag. */ do_action( 'wp_body_open' ); // phpcs:ignore WPThemeReview.CoreFunctionality.PrefixAllGlobals.NonPrefixedHooknameFound } endif; // Fix for empty widgets titles function clean_gallery_widget_title($title){ if( empty( $title ) ) { return ' '; } else { return $title; } } //add_filter('widget_title', 'clean_gallery_widget_title');