Beispiel #1
0
 function possiblyEndOutputBuffering()
 {
     global $pagenow;
     $MabBase = MAB();
     if ($pagenow == 'post-new.php' && isset($_GET['post_type']) && $_GET['post_type'] == $MabBase->get_post_type()) {
         $result = ob_get_clean();
         $filename = 'interceptions/post-new.php';
         //$data = $result;
         $view = ProsulumMabCommon::getView($filename);
         echo $view;
     }
 }
Beispiel #2
0
 /**
  * OPTIN FORM
  *
  * @param object $actionBoxObj - MAB_ActionBox object
  * @return string HTML
  */
 public static function getActionBoxOptin($actionBoxObj)
 {
     $MabBase = MAB();
     $meta = $actionBoxObj->getMeta();
     $meta['ID'] = $actionBoxObj->getId();
     //get unique action box id because some optin form providers need this i.e. wysija
     $data['mab-html-id'] = $actionBoxObj->getHtmlId();
     $meta['mab-html-id'] = $data['mab-html-id'];
     //get Opt In Form
     $optInForm = self::getOptInForm($actionBoxObj);
     //if form is empty, then there should be no need to show the action box
     if (empty($optInForm)) {
         return '';
     }
     //$data['meta'] = $meta;
     //convert old optin settings keys to keys used by other action boxes
     $data['meta'] = self::convertOptinKeys($meta);
     $data['form'] = $optInForm;
     $data['action-box-type'] = $actionBoxObj->getActionBoxType();
     $data['class'] = $actionBoxObj->getTemplateObj()->getClass();
     $data['html-data'] = $actionBoxObj->getTemplateObj()->htmlData();
     $data['inline-style'] = $actionBoxObj->getTemplateObj()->inlineStyles();
     $mainTemplate = $actionBoxObj->getTemplateObj()->getTemplateFile();
     $actionBox = ProsulumMabCommon::getView($mainTemplate, $data, '');
     return $actionBox;
 }
Beispiel #3
0
 function getButtonCode($button, $key = '')
 {
     $filelocation = 'misc/button-code.php';
     $data['button'] = $button;
     $data['key'] = $key;
     $button_code = ProsulumMabCommon::getView($filelocation, $data);
     return $button_code;
 }