"attachment-$size alignleft", 'alt' => trim(strip_tags(strip_shortcodes( $attachment->post_excerpt ))), 'title' => trim(strip_tags(strip_shortcodes( $attachment->post_title ))), ); $thumb=get_the_post_thumbnail($post->ID, $whatthumb,$default_attr); } } if ($post->post_excerpt!=""){ $excerpt=$thumb.$post->post_excerpt; $linkmore = ' '.$testomore.''; } else { if (strlen($post->post_content)>get_option("excerpt_everywhere_length")){ $excerpt= $thumb.myTruncate(strip_tags(strip_shortcodes($post->post_content)), get_option("excerpt_everywhere_length"), " ", ""); $linkmore = ' '.$testomore.''; } else { $excerpt=$thumb.$post->post_content; $linkmore=""; } } return $excerpt.$linkmore; } function custom_excerpt_everywhere_length() { return get_option("excerpt_everywhere_length"); } function add_settings_link($links, $file) { static $this_plugin; if (!$this_plugin) $this_plugin = plugin_basename(__FILE__); if ($file == $this_plugin){ $settings_link = ''.__("Settings", "auto-excerpt-everywhere").''; array_unshift($links, $settings_link); } return $links; } add_action('the_post', 'auto_excerpt_everywhere_construct'); add_action('admin_menu','auto_excerpt_everywhere_options'); add_filter('excerpt_length', 'custom_excerpt_everywhere_length'); add_filter('plugin_action_links', 'add_settings_link', 10, 2 ); if ( function_exists( 'add_theme_support' ) ) { add_theme_support( 'post-thumbnails' ); } ?>