-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.php
executable file
·46 lines (41 loc) · 1.52 KB
/
functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
if ( ! function_exists( 'twentyeleven_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time and author.
* Create your own twentyeleven_posted_on to override in a child theme
*
* @since Twenty Eleven 1.0
*/
function twentyeleven_posted_on() {
printf( __( '<span class=sep>Posted on </span><a href=%1$s rel=bookmark><time class=entry-date datetime=%3$s>%4$s at %2$s</time></a><span class=by-author> <span class=sep> by </span> <span class="author vcard"><a class="url fn n" href=%5$s title="%6$s" rel=author>%7$s</a></span></span>', 'twentyeleven' ),
esc_url( get_permalink() ),
esc_attr( get_the_time() ),
esc_attr( get_the_date( 'c' ) ),
esc_html( get_the_date() ),
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
sprintf( esc_attr__( 'View all posts by %s', 'twentyeleven' ), get_the_author() ),
esc_html( get_the_author() )
);
}
endif;
// necessary to make HTML5 validate - eliminates unnecessary rel attribute link
// UPDATE: no longer necessary for validation, also probably should be inside a function
// remove_action('wp_head', 'rsd_link');
//Try killing the auto-adding of <p> tags. Edit the post to see the difference.
//remove_filter ('the_content', 'wpautop');
// add theme support for HTML5
function twentyeleven_add_html5_support() {
add_theme_support(
'html5',
array(
'search-form',
'comment-form',
'comment-list',
'gallery',
'caption',
'script',
'style',
)
);
}
add_action( 'after_setup_theme', 'twentyeleven_add_html5_support' );