forked from librewiki/liberty-skin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfunctions.php
44 lines (40 loc) · 956 Bytes
/
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
<?php
/**
* Liberty theme functions file.
*
* @package Liberty
* @since 1.0.0
*/
/**
* Print "...." when content exceed length.
*
* @package Liberty
* @since 1.0.0
* @param type $more is not used.
* @return string "....".
*/
function wpdocs_excerpt_more( $more ) {
return '....';
};
/**
* Hooks for filter the comment form fields.
*
* @package Liberty
* @since 1.0.0
* @param array $fields is not used.
*/
function comments_field( $fields ) {
$comment_field = $fields['comment'];
$author_field = $fields['author'];
unset( $fields['comment'] );
unset( $fields['author'] );
unset( $fields['email'] );
unset( $fields['url'] );
unset( $fields['cookies'] );
$fields['author'] = $author_field;
$fields['comment'] = $comment_field;
return $fields;
};
add_theme_support( 'automatic-feed-links' );
add_filter( 'comment_form_fields', 'comments_field' );
add_filter( 'excerpt_more', 'wpdocs_excerpt_more' );