Ejemplo n.º 1
0
 /**
  * Get
  * @return [type] [description]
  */
 public function get()
 {
     global $wp, $wp_scripts;
     $mabid = $wp->query_vars['mabid'];
     $type = !empty($wp->query_vars['maboutputtype']) ? $wp->query_vars['maboutputtype'] : 'html';
     if (empty($mabid)) {
         die('Invalid MAB ID.');
     }
     $actionBox = mab_get_actionbox($mabid);
     switch ($type) {
         case 'json':
             $this->sendResponse($actionBox);
             break;
         case 'html':
         case 'iframe':
         default:
             echo $actionBox;
             break;
     }
     exit;
 }
Ejemplo n.º 2
0
function mab_get_actionbox_shortcode_wrap($atts = array(), $content = '', $code = '')
{
    $default = array('id' => null, 'force_show' => false);
    extract(shortcode_atts($default, $atts));
    return mab_get_actionbox($id, true, $force_show);
}