function get_options() { //$content_fields = op_optin_default_fields(); $vid_opts = array('values' => array('type' => 'video', 'width' => '540', 'height' => '350')); op_mod('signup_form'); $style = array('title_logo' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Logo', 'optimizepress'), 'default' => $this->global_imgs . 'logo_default.png', 'element' => 'h1', 'type' => 'image'))), 'template' => array($this, 'content_fields')), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Title', 'optimizepress'), 'default' => __('Discover How You Can Build Pages Just Like This In Seconds...', 'optimizepress')), 'content' => array('name' => __('Content', 'optimizepress'), 'default' => __('Your high impact sub-headline or call to action text would be placed here. Enter your name and email below for instant access', 'optimizepress'), 'type' => 'wysiwyg', 'disable_font' => true))), 'before' => '<div>', 'after' => '</div>', 'template' => array($this, 'content_fields')), 'optin' => array('module' => 'signup_form', 'mod_options' => array('disable' => array('color_scheme'), 'ignore_fields' => array('title', 'form_header', 'footer_note'), 'content_fields' => op_optin_default_fields(), 'submit_button_config' => array('defaults' => array('content' => __('Get Started', 'optimizepress')))), 'template' => array($this, 'optin_box'), 'before' => '<div>', 'after' => '</div>'), 'footer_note' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('footer_note' => array('name' => __('Footer Note', 'optimizepress'), 'default' => __('We value your privacy. Your information will never be shared or sold.', 'optimizepress'), 'wrap' => '<p class="secure-icon"><img src="' . op_page_img('secure.png', true, 'global') . '" alt="secure" width="16" height="15"> %s</p>'))), 'template' => array($this, 'content_fields')), 'template' => array($this, 'style_template')); //1,6,2,7,3,8,4,9,5,10 $this->options = $style; }
function __construct() { $this->global_imgs = op_page_img('', true, 'global'); add_action('op_footer', array($this, 'print_js')); }
function op_page_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; switch ($comment->comment_type) { case 'pingback': case 'trackback': ?> <li id="comment-<?php comment_ID(); ?> " <?php comment_class(); ?> > <span class="author"><?php comment_author_link(); ?> </span> - <span class="date"><?php echo get_comment_date(get_option('date_format')); ?> </span> <span class="pingcontent"><?php comment_text(); ?> </span> <?php break; default: ?> <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?> "> <div id="comment-<?php comment_ID(); ?> "> <?php echo get_avatar($comment, 75); ?> <div class="comment-meta cf"> <p><?php comment_author_link(); ?> </p> <?php comment_reply_link(array_merge($args, array('reply_text' => sprintf(__('%1$s Reply', OP_P_SN), '<img src="' . op_page_img('reply-icon.png', true, 'global') . '" alt="' . __('Reply', OP_SN) . '" width="13" height="9" />'), 'depth' => $depth, 'max_depth' => $args['max_depth'], 'respond_id' => 'leave-reply'))); ?> <span><?php comment_date(); ?> </span> </div> <div class="comment-content"> <?php comment_text(); ?> <?php edit_comment_link(__('Edit', OP_P_SN), '<span class="edit-link">', '</span>'); ?> </div> <?php if ($comment->comment_approved == '0') { ?> <em class="comment-awaiting-moderation"><?php _e('Your comment is awaiting moderation.', OP_P_SN); ?> </em> <?php } ?> </div> <?php break; } }
?> </head> <body <?php body_class(); ?> > <div class="container"> <?php op_page_header(); $GLOBALS['op_feature_area']->load_feature(); op_page_feature_title(); ?> <div class="main-content"> <?php //if($GLOBALS['op_feature_enabled'] === true){ $img = op_page_img('launch-funnel/', true, 'global'); echo '<img src="' . $img . 'left-corner.png" class="left-corner" alt="left-corner" width="13" height="13" /><img src="' . $img . 'right-corner.png" class="right-corner" alt="right-corner" width="13" height="13" />'; //} ?> <div class="row main-content-area cf"> <?php echo $GLOBALS['op_content_layout']; ?> </div> </div> <?php op_page_footer(); ?> </div> <?php op_footer();
function op_optin_box($options, $values, $output, $tpl = '', $wrap_elems = array()) { static $global_imgs; if (!isset($global_imgs)) { $global_imgs = op_page_img('', true, 'global'); } $disable_name = isset($options['disable_name']); $content_fields = op_get_var($options, 'content_fields', array()); $ignore = array(); if (isset($options['ignore_fields'])) { $ignore = is_array($options['ignore_fields']) ? $options['ignore_fields'] : array_filter(explode('|', $options['ignore_fields'])); } if (!isset($values['content']) || count($values['content']) == 0) { $content = op_get_var($options, 'content_fields', array()); $values['content'] = array(); foreach ($content as $name => $field) { $values['content'][$name] = op_get_var($field, 'default'); } } if (!isset($values['form_open']) || !isset($values['form_close'])) { $values['form_open'] = '<form action="#" class="op-optin-validation">'; $values['form_close'] = '</form>'; $values['hidden_elems'] = ''; $values['email_input'] = '<input type="email" required="required" name="email" placeholder="' . $values['content']['email_default'] . '" class="email" />'; if (!$disable_name) { $values['name_input'] = '<input type="text" name="name" required="required" placeholder="' . $values['content']['name_default'] . '" class="name" />'; } } $content = op_get_var($values, 'content', array()); $fields = array('title' => '<h2>%s</h2>', 'form_header' => '<p>%s</p>', 'footer_note' => '<p class="secure-icon"><img src="' . $global_imgs . 'secure.png" alt="secure" width="16" height="15"> %s</p>'); $btn_config = op_get_var($options, 'submit_button_config', array()); $vars = array('form_open' => op_get_var($values, 'form_open'), 'form_close' => op_get_var($values, 'form_close'), 'hidden_elems' => op_get_var($values, 'hidden_elems'), 'name_input' => !$disable_name ? op_get_var($values, 'name_input') : '', 'email_input' => op_get_var($values, 'email_input'), 'submit_button' => op_mod('submit_button')->output(array('submit_button'), $btn_config, $values['submit_button'], true), 'extra_fields' => ''); if (isset($values['extra_fields']) && is_array($values['extra_fields'])) { $vars['extra_fields'] = implode('', $values['extra_fields']); } foreach ($content_fields as $name => $settings) { if (!isset($content[$name])) { $value = op_get_var($settings, 'default'); } else { $value = $content[$name]; } $wrap = ''; if (isset($wrap_elems[$name])) { $wrap = $wrap_elems[$name]; } elseif (isset($fields[$name])) { $wrap = $fields[$name]; } $vars[$name] = $wrap == '' ? $value : sprintf($wrap, $value); } if ($tpl != '') { $output = $tpl; } else { $output = ' <div class="op_signup_form"> {title} {form_header} {form_open} <div> {hidden_elems} {name_input} {email_input} {extra_fields} {submit_button} </div> {footer_note} {form_close} </div>'; } $out = op_convert_template($output, $vars); return $out; }