Function prints post meta data does not work [closed]

I solved the problem by using this code.

if ( ! function_exists( 'theme_post_meta_data' ) ) :
/**
* This function prints post meta data.
*/
function theme_post_meta_data() {
printf( __( '<span class="https://wordpress.stackexchange.com/questions/66059/%1$s">Posted on </span>%2$s<span class="%3$s"> by </span>%4$s', 'theme' ),
'meta-prep meta-prep-author posted', 
sprintf( '<a href="https://wordpress.stackexchange.com/questions/66059/%1$s" title="%2$s" rel="bookmark"><span class="timestamp">%3$s</span></a>',
    get_permalink(),
    esc_attr( get_the_time() ),
    get_the_date()
),
'byline',
sprintf( '<span class="author vcard"><a class="url fn n" href="https://wordpress.stackexchange.com/questions/66059/%1$s" title="%2$s">%3$s</a></span>',
    get_author_posts_url( get_the_author_meta( 'ID' ) ),
    sprintf( esc_attr__( 'View all posts by %s', 'theme' ), get_the_author() ),
    get_the_author()
    )
);
}
endif;