switch ( $type ) { case 'html':
$gen = '<meta name="generator" content="WordPress ' .
esc_attr( get_bloginfo( 'version'
) ) . '">';
break;
case 'xhtml':
$gen = '<meta name="generator" content="WordPress ' .
esc_attr( get_bloginfo( 'version'
) ) . '" />';
break;
case 'atom':
$gen = '<generator uri="https://wordpress.org/" version="' .
esc_attr( get_bloginfo_rss( 'version'
) ) . '">WordPress</generator>';
break;
case 'rss2':
$gen = '<generator>' .
sanitize_url( 'https://wordpress.org/?v=' .
get_bloginfo_rss( 'version'
) ) . '</generator>';
break;
case 'rdf':
$gen = '<admin:generatorAgent rdf:resource="' .
sanitize_url( 'https://wordpress.org/?v=' .
get_bloginfo_rss( 'version'
) ) . '" />';
break;
case 'comment':
$gen = '<!-- generator="WordPress/' .
esc_attr( get_bloginfo( 'version'
) ) . '" -->';
break;
case 'export':
$gen = '<!-- generator="WordPress/' .
esc_attr( get_bloginfo_rss( 'version'
) ) . '" created="' .
gmdate( 'Y-m-d H:i'
) . '" -->';
break;
}