. */ global $wp_version; $exit_msg = 'AuthorBox plugin requires WordPress 2.7 or higher. Please upgrade!'; if (version_compare($wp_version, "2.7", "<")) { exit($exit_msg); } function authorbox_init_locale(){ //load translation file if any for the current language load_plugin_textdomain('authorbox', PLUGINDIR . '/' . plugin_basename(dirname(__FILE__)) . '/locale', 'i18n'); } add_filter('init', 'authorbox_init_locale'); function authorbox_css() { $authorboxcss = WP_CONTENT_URL.'/plugins/'.plugin_basename(dirname(__FILE__)).'/authorbox.css'; echo ''; } add_action('wp_head', 'authorbox_css'); function authorbox_display( $content='' ) { if( is_single() ) { $content .= '
' .'
' .'

'.__("About the author", 'authorbox').'

' .'

'.get_avatar( get_the_author_email(), '110' ) .' '.get_the_author_meta( 'description' ).'

' .'
'; $url = get_the_author_meta('url'); if(! empty( $url )) { $content .= '
' .'

'.__("More at ", 'authorbox') .''.__("the profile", 'authorbox').' »

'; } $content .= '
' .'
'; } return $content; } add_filter('the_content', 'authorbox_display'); ?>