Exemplo n.º 1
0
function mab_constantcontact_form_html($html, $actionBoxObj)
{
    $settings = MAB('settings')->getAll();
    if ($settings['optin']['allowed']['constantcontact'] == 0) {
        return '';
    }
    $actionBoxObj->addClass('mab-ajax');
    $meta = $actionBoxObj->getMeta();
    $meta['ID'] = $actionBoxObj->getId();
    $filename = 'optinforms/constant-contact.php';
    $form = MAB_Utils::getView($filename, $meta);
    return $form;
}
Exemplo n.º 2
0
 public static function getActionBoxDefaultCallback($actionBoxObj)
 {
     $MabBase = MAB();
     $data = array();
     $meta = $actionBoxObj->getMeta();
     $meta['ID'] = $actionBoxObj->getId();
     $data['meta'] = $meta;
     $data['mab-html-id'] = $actionBoxObj->getHtmlId();
     $data['class'] = $actionBoxObj->getTemplateObj()->getClass();
     $data['html-data'] = $actionBoxObj->getTemplateObj()->htmlData();
     $data['inline-style'] = $actionBoxObj->getTemplateObj()->inlineStyles();
     $actionBoxType = $actionBoxObj->getActionBoxType();
     $data['action-box-type'] = $actionBoxType;
     $data['action-box-obj'] = $actionBoxObj;
     $data['the_content'] = apply_filters('mab_default_action_box_content', '', $actionBoxObj);
     $template = $actionBoxObj->getTemplateObj()->getTemplateFile();
     return MAB_Utils::getView($template, $data, '');
 }
Exemplo n.º 3
0
/**
 * Wrapper function to MAB_Utils::getView()
 * 
 * @param  string $filename path to file relative to the views directory
 * @param  array $data      
 * @return html should be html
 */
function mab_gforms_get_view($filename, $data = null)
{
    $parent = MAB_GFORMS_VIEWS;
    return MAB_Utils::getView($filename, $data, $parent);
}
Exemplo n.º 4
0
 function notifyOfDuplicate()
 {
     global $post;
     $MabBase = MAB();
     $duplicate_id = $MabBase->get_mab_meta($post->ID, 'duplicate');
     $filename = 'misc/duplicate-notice.php';
     $message = MAB_Utils::getView($filename, array('duplicate-id' => $duplicate_id));
     echo $message;
     delete_post_meta($post->ID, $MabBase->get_meta_key('duplicate'));
 }
Exemplo n.º 5
0
 static function postActionBox($post)
 {
     $MabBase = MAB();
     $data['meta'] = $MabBase->get_mab_meta($post->ID, 'post');
     $data['assets-url'] = MAB_ASSETS_URL;
     $filename = 'metaboxes/post-select-actionbox.php';
     $box = MAB_Utils::getView($filename, $data);
     echo $box;
 }
Exemplo n.º 6
0
/**
 * Wrapper function to MAB_Utils::getView()
 * 
 * @param  string $filename path to file relative to the views directory
 * @param  array $data      
 * @return html should be html
 */
function mab_cf7_get_view($filename, $data = null)
{
    $parent = MAB_CF7_VIEWS;
    return MAB_Utils::getView($filename, $data, $parent);
}