芝麻web文件管理V1.00
';
return $form;
}
endif;
add_filter( 'get_search_form', 'royale_news_search_form', 20 );
/**
* Filters For Excerpt
*
*/
if( !function_exists( 'royale_news_excerpt_more' ) ) :
/*
* Excerpt More
*/
function royale_news_excerpt_more( $more ) {
return '';
}
endif;
add_filter( 'excerpt_more', 'royale_news_excerpt_more' );
if( !function_exists( 'royale_news_excerpt_length' ) ) :
/*
* Excerpt More
*/
function royale_news_excerpt_length( $length ) {
return 30;
}
endif;
add_filter( 'excerpt_length', 'royale_news_excerpt_length' );
if( !function_exists( 'royale_news_comment_form_fields' ) ) :
/**
* Add custom style of form field
*/
function royale_news_comment_form_fileds( $fields ) {
$commenter = wp_get_current_commenter();
$req = get_option( 'require_name_email' );
$aria_req = ( $req ? " aria-required='true'" : '' );
$html5 = current_theme_supports( 'html5', 'comment-form' ) ? 1 : 0;
$fields = array(
'author'=> '
'. ( $req ? '
' : '' ),
'email'=> '
' . ( $req ? '
' : '' ),
'url'=> '
',
);
return $fields;
}
endif;
add_filter( 'comment_form_default_fields', 'royale_news_comment_form_fileds' );
if( !function_exists( 'royale_news_comment_form' ) ) :
/**
* Add custom default values of form.
*/
function royale_news_comment_form( $args ) {
$args['class_form'] = esc_attr__('comment_news comment-form', 'royale-news');
$args['title_reply'] = esc_html__('Leave comment','royale-news');
$args['title_reply_before'] = '
';
$args['title_reply_after'] = '
';
$args['comment_notes_before'] = '
'. esc_html__( 'Your email address will not be published. Required fields are marked with *.','royale-news' ).'
';
$args['comment_field'] = '
';
$args['class_submit'] = esc_attr__('btn btn-default submit-btn', 'royale-news');
$args['label_submit'] = esc_attr__('Post A Comment', 'royale-news');
return $args;
}
endif;
add_filter( 'comment_form_defaults', 'royale_news_comment_form' );