'; } } add_action( 'wp_head', 'blog99_pingback_header' ); /** * Footer Copyright Information * * @since 1.0.0 */ if ( ! function_exists( 'blog99_footer_copyright_action' ) ){ function blog99_footer_copyright_action() { $copyright = blog99_banner_footer_copyright_callback(); if( !empty( $copyright ) ) { echo esc_html ( apply_filters( 'blog99_copyright_text', $copyright ) ); } else { echo esc_html( apply_filters( 'blog99_copyright_text', esc_html__('Copyright © ','blog99') . date( 'Y' ) . ' ' . get_bloginfo( 'name' ) .' - ' ) ); } printf( ' WordPress Theme : By %1$s', ''.esc_html__('WP99 Themes','blog99').'' ); } } add_action( 'blog99_copyright', 'blog99_footer_copyright_action', 5 ); if ( ! function_exists( 'blog99_get_post_thumbnail' ) ){ function blog99_get_post_thumbnail(){ global $post; $postformat = get_post_format(); //select the icon for post format if( $postformat == 'gallery' ){ if (function_exists('has_block') && has_block('gallery', $post->post_content)) { $post_blocks = parse_blocks($post->post_content); $key = array_search('core/gallery', array_column($post_blocks, 'blockName')); $gallery_attachment_ids = $post_blocks[$key]['attrs']['ids']; } // if there is not a gallery block do this else { // gets the gallery info $gallery = get_post_gallery( $post->ID, false ); $gallery_attachment_ids = array(); if( count($gallery) and isset($gallery['ids'])) { // makes an array of image ids $gallery_attachment_ids = explode ( ",", $gallery['ids'] ); } } if ( ! empty( $gallery_attachment_ids ) ) : ?>
'; echo ''; echo ''; } } }