better defaults

This commit is contained in:
2016-10-14 14:21:12 +02:00
parent 5076222243
commit 00188758ee

View File

@@ -83,17 +83,17 @@ class better_twitter_widget extends WP_Widget {
$defaults = array( $defaults = array(
'link_target' => '_blank', 'link_target' => '_blank',
'allow_intro' => (is_array($options)) ? isset($options['allow_intro']) : true, 'allow_intro' => (is_array($options)) ? isset($options['allow_intro']) : true,
'show_summary' => false, 'show_summary' => true,
'show_author' => false, 'show_author' => false,
'show_date' => false, 'show_date' => true,
'show_time' => false, 'show_time' => false,
'nofollow' => false, 'nofollow' => true,
'enable_cache' => (is_array($options)) ? isset($options['enable_cache']) : true, 'enable_cache' => (is_array($options)) ? isset($options['enable_cache']) : true,
'cache_duration' => 3600, 'cache_duration' => 3600,
'items' => 10, 'items' => 5,
'title_length' => (is_array($options) && !empty($options['title_length'])) ? isset($options['title_length']) : 0, 'title_length' => (is_array($options) && !empty($options['title_length'])) ? isset($options['title_length']) : 0,
'excerpt' => 360, 'excerpt' => 360,
'suffix' => ' […]' 'suffix' => ' [...]'
); );
$this->options = (object) wp_parse_args($options, $defaults); $this->options = (object) wp_parse_args($options, $defaults);