', esc_url( get_bloginfo( 'pingback_url' ) ) ); } } add_action( 'wp_head', 'blog_guten_pingback_header' ); /** * Check if cover section is displayed */ function blog_guten_is_not_home() { if( ! is_home() ) { return true; } return false; } /** * Check if cover section is displayed */ function blog_guten_is_cover_active() { if( get_theme_mod( 'blog_guten_display_cover_section', true ) ) { return true; } return false; } /** * Image sanitization callback */ function blog_guten_sanitize_image( $image, $setting ) { $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'tif|tiff' => 'image/tiff', 'ico' => 'image/x-icon' ); // Return an array with file extension and mime_type. $file = wp_check_filetype( $image, $mimes ); // If $image has a valid mime_type, return it; otherwise, return the default. return ( $file['ext'] ? $image : $setting->default ); } /** * Fire the wp_body_open action. * * Added for backwards compatibility to support pre 5.2.0 WordPress versions. */ if ( ! function_exists( 'wp_body_open' ) ) : function wp_body_open() { /** * Triggered after the opening
tag. * * @since Twenty Nineteen 1.4 */ do_action( 'wp_body_open' ); } endif; /** * Greet new users & guide them to help page */ function blog_guten_admin_notice(){ if ( is_admin() && ! get_option( 'blog-guten-intro-dismissed' ) && get_theme_mod( 'blog_guten_style_option', 'style1' ) === 'style1' ) { blog_guten_greet_user(); } if ( is_admin() && get_theme_mod( 'blog_guten_style_option', 'style1' ) != 'style1' ) { blog_guten_upgrade_request_notice(); } } $blog_guten_intro_notice_dismissed = get_option( 'blog-guten-intro-dismissed' ); $blog_guten_upgrade_notice_dismissed = get_option( 'blog-guten-upgrade-dismissed' ); if( empty( $blog_guten_intro_notice_dismissed ) || empty( $blog_guten_upgrade_notice_dismissed ) ) { add_action('admin_notices', 'blog_guten_admin_notice'); } function blog_guten_greet_user() { echo 'Thank you for choosing \'Blog Guten\' theme. You can always reach out to us on the support forum if you need any help. If you like our work, please support us by providing a review with 5-star ratings. Please don\'t forget to take a look at premium version of this theme.', 'blog-guten' ) ); echo "
"; esc_html_e( 'View Documentation', 'blog-guten' ); echo ""; esc_html_e( 'Rate us 5 stars', 'blog-guten' ); echo ""; esc_html_e( 'Don\'t display this message again!', 'blog-guten' ); echo '
It looks like you are enjoying the free version of \'Blog Guten\' theme. You can get more style options if you upgrade to the premium version with professional support. There are many more benefits with the pro version. Click the following button to learn more.
', 'blog-guten' ) ); echo ""; esc_html_e( 'Learn More About \'Blog Guten Pro\'', 'blog-guten' ); echo ""; esc_html_e( 'View Pro Demo', 'blog-guten' ); echo ""; esc_html_e( 'Don\'t display this again!', 'blog-guten' ); echo '