Forums / Cotonti / Core Labs / set metas from standalone plugin

Trustmaster
#8853 2009-02-25 22:39
# Orkan :
$output = preg_replace(
'/<meta(.+)name="keywords"([^>]+)>/i', 
'<meta name="keywords" content="'.$my_plugin['meta_keywords'].'" />', 
$output, 1);
This. It's not really a good design to have post-factum overwriting callbacks with regular expressions. It should be avoided if there is a way of assigning data straight into its place.
May the Source be with you!