在我的joomla中添加短代码
问题描述:
我想在wordpress中添加php短代码(<?php echo do_shortcode('[shortcode_id="1"]') ?>
)。在我的joomla中添加短代码
有没有办法做到这一点?请帮帮我 。
答
如果你不想使用您可以使用此代码(为Joomla 3.x的)任何扩展:
$params = new JObject;
$article = new stdClass;
$article->text = '------> Write/Assign here the text with shortcodes <-----';
JPluginHelper::importPlugin('content');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentPrepare', array('text', &$article, &$params, 0));
echo $article->text;
谢谢你,你帮了我 – Marina