public function hookPublicItemsShow($args)
 {
     $item = $args['item'];
     $id = $item->id;
     $mapfigItem = get_db()->getTable('MapfigStudioItem')->getByItemId($item->id);
     if (count($mapfigItem) > 0) {
         $tobj = new Omeka_View_Helper_Shortcodes();
         echo $tobj->shortcodes($mapfigItem->content);
     }
 }
예제 #2
0
/**
 * Add a shortcode.
 *
 * @since 2.2
 * @package Omeka\Function\View
 * @uses Omeka_View_Helper_Shortcodes::shortcodeCallbacks()
 * @param string $shortcodeName Name of the new shortcode.
 * @param callback $function Callback to execute for this shortcode.
 */
function add_shortcode($shortcodeName, $function)
{
    return Omeka_View_Helper_Shortcodes::addShortcode($shortcodeName, $function);
}
예제 #3
0
<?php

$tobj = new Omeka_View_Helper_Shortcodes();
echo $tobj->shortcodes($text);