__('Recent Comments'),
'post_type' => 'post',
'exclude_pings' => 1,
'number' => 5,
'order' => 'desc',
'show_thumbs' => 1,
'thumb_size' => 55,
'show_excerpt' => 1,
'excerpt_length' => 50,
'comment_format' => $_comment_format,
'list_style' => $_list_style,
);
$defaults = apply_filters( 'acw_instance_defaults', $_defaults );
return $defaults;
}
/**
* Builds form field: title
*
* @access public
*
* @since 1.0
*
* @param array $instance Current settings.
* @param object $widget Widget object.
*/
public static function build_field_title( $instance, $widget )
{
ob_start();
?>
/>
Avatars
/>
Comment Content
/>
Comment Format
true) );
$post_types = get_post_types( $post_type_args, 'objects' );
$_ptypes = array();
$_ptypes['all'] = __('All');
foreach( $post_types as $post_type ){
if ( post_type_supports( $post_type->name, 'comments' ) ) {
$query_var = ( ! $post_type->query_var ) ? $post_type->name : $post_type->query_var ;
$label = $post_type->labels->singular_name;
$_ptypes[ $query_var ] = $label;
}
}
$_ptypes = apply_filters( 'acw_allowed_post_types', $_ptypes );
$_ptypes = ( ! is_array( $_ptypes ) ) ? (array) $_ptypes : $_ptypes ;
// Clean the values (since it can be filtered by other plugins)
$_ptypes = array_map('esc_html', $_ptypes);
/**
* Flip to clean the keys (used as