Theoretically, you could hook into wp_head
and echo
your tags from within your callback:
function wpse_36395_meta_tags() {
echo '<meta name="description" content="Your Description" />';
}
add_action( 'wp_head', 'wpse_36395_meta_tags' );
But note that if a theme already has the tag(s) hardcoded into its <head></head>
section, you’ll end up with duplicate tags.
Whether that’s more desirable than missing yours on those pages, you will have to decide for yourself.
I don’t think I’d keep a plugin installed that forces meta tags into my header.
Edit: As for your comment, I am not familiar with the WordPress SEO API at all, but those are simple filters, so take a look at add_filter
and you should be able to use that API.
This should yield the desired result:
function wpse_36395_metadesc() {
return 'Your Description';
}
add_filter( 'wpseo_metadesc', 'wpse_36395_metadesc' );
Note that now you make your plugin dependent on WordPress SEO, though it will gracefully decline, if that’s not activated/installed.