function get_style()
 {
     /*
      * Shared settings and properties
      */
     $config = array('settings' => array('membership' => 'YjowOw==', 'theme' => 'YToyOntzOjQ6InR5cGUiO3M6NzoibGFuZGluZyI7czozOiJkaXIiO3M6MToiMiI7fQ==', 'header_layout' => 'YjowOw==', 'feature_area' => 'YTozOntzOjQ6InR5cGUiO2k6MTtzOjc6ImVuYWJsZWQiO3M6MToiWSI7czo4OiJzZXR0aW5ncyI7YTo1OntzOjEwOiJ0aXRsZV9sb2dvIjthOjE6e3M6NToidGl0bGUiO3M6MDoiIjt9czo3OiJjb250ZW50IjthOjI6e3M6NToidGl0bGUiO3M6MDoiIjtzOjc6ImNvbnRlbnQiO3M6MDoiIjt9czo1OiJvcHRpbiI7YTo0OntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czo5OiJmb3JtX2h0bWwiO2E6MjM6e3M6MTA6ImVtYWlsX2RhdGEiO3M6MDoiIjtzOjEzOiJlbWFpbF9hZGRyZXNzIjtzOjA6IiI7czoxMjoicmVkaXJlY3RfdXJsIjtzOjA6IiI7czoxMjoiZXh0cmFfZmllbGRzIjtzOjA6IiI7czoxODoiZW1haWxfZXh0cmFfZmllbGRzIjtzOjA6IiI7czoxMToiZW1haWxfb3JkZXIiO3M6MDoiIjtzOjEwOiJuYW1lX29yZGVyIjtzOjA6IiI7czo0OiJodG1sIjtzOjA6IiI7czoxMDoibmV3X3dpbmRvdyI7czowOiIiO3M6MTI6ImRpc2FibGVfbmFtZSI7czowOiIiO3M6ODoibmFtZV9ib3giO3M6MDoiIjtzOjk6ImVtYWlsX2JveCI7czowOiIiO3M6NjoiYWN0aW9uIjtzOjA6IiI7czo2OiJmaWVsZHMiO3M6MDoiIjtzOjY6Im1ldGhvZCI7czowOiIiO3M6MjQ6ImVtYWlsX2V4dHJhX2ZpZWxkc19vcmRlciI7czowOiIiO3M6MTY6ImludGVncmF0aW9uX3R5cGUiO3M6MDoiIjtzOjQ6Imxpc3QiO3M6MDoiIjtzOjE0OiJ0aGFua195b3V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GFkb3dfc3ByZWFkIjtzOjA6IiI7czoxNzoiZHJvcF9zaGFkb3dfY29sb3IiO3M6MDoiIjtzOjE5OiJkcm9wX3NoYWRvd19vcGFjaXR5IjtzOjA6IiI7czoxODoiaW5zZXRfc2hhZG93X3BhbmVsIjtzOjA6IiI7czoyMToiaW5zZXRfc2hhZG93X3ZlcnRpY2FsIjtzOjA6IiI7czoyMzoiaW5zZXRfc2hhZG93X2hvcml6b250YWwiO3M6MDoiIjtzOjE3OiJpbnNldF9zaGFkb3dfYmx1ciI7czowOiIiO3M6MTk6Imluc2V0X3NoYWRvd19zcHJlYWQiO3M6MDoiIjtzOjE4OiJpbnNldF9zaGFkb3dfY29sb3IiO3M6MDoiIjtzOjIwOiJpbnNldF9zaGFkb3dfb3BhY2l0eSI7czowOiIiO319czoxMToiZm9vdGVyX25vdGUiO2E6MTp7czoxMToiZm9vdGVyX25vdGUiO3M6MDoiIjt9czoxMjoiZm9udF9vcHRpb25zIjthOjM6e3M6MTA6InRpdGxlX2xvZ28iO2E6MDp7fXM6NzoiY29udGVudCI7YTowOnt9czoxMToiZm9vdGVyX25vdGUiO2E6MDp7fX19fQ==', 'feature_title' => 'YjowOw==', 'footer_area' => 'YTo3OntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czozOiJuYXYiO3M6MDoiIjtzOjExOiJmb250X3NoYWRvdyI7czowOiIiO3M6MTE6ImZvbnRfd2VpZ2h0IjtzOjA6IiI7czo5OiJmb250X3NpemUiO3M6MDoiIjtzOjExOiJmb250X2ZhbWlseSI7czoxNToiU291cmNlIFNhbnMgUHJvIjtzOjE3OiJmb290ZXJfZGlzY2xhaW1lciI7YToyOntzOjc6ImVuYWJsZWQiO3M6MToiTiI7czo3OiJtZXNzYWdlIjtzOjA6IiI7fX0=', 'color_scheme_template' => 'YjowOw==', 'typography' => 'YToyOntzOjEzOiJmb250X2VsZW1lbnRzIjthOjk6e3M6MTA6InNpdGVfdGl0bGUiO2E6NDp7czo0OiJzaXplIjtzO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jQ6e3M6NDoic2l6ZSI7czoyOiIxNyI7czo0OiJmb250IjtzOjE1OiJTb3VyY2UgU2FucyBQcm8iO3M6NToic3R5bGUiO3M6Njoibm9ybWFsIjtzOjU6ImNvbG9yIjtzOjQ6IiM0NDQiO31zOjI6Img2IjthOjQ6e3M6NDoic2l6ZSI7czoyOiIxNyI7czo0OiJmb250IjtzOjE1OiJTb3VyY2UgU2FucyBQcm8iO3M6NToic3R5bGUiO3M6Njoibm9ybWFsIjtzOjU6ImNvbG9yIjtzOjQ6IiM0NDQiO319czoxNDoiY29sb3JfZWxlbWVudHMiO2E6Njp7czoxNzoiZm9vdGVyX3RleHRfY29sb3IiO3M6MDoiIjtzOjE3OiJmb290ZXJfbGlua19jb2xvciI7czowOiIiO3M6MjM6ImZvb3Rlcl9saW5rX2hvdmVyX2NvbG9yIjtzOjA6IiI7czoxODoiZmVhdHVyZV90ZXh0X2NvbG9yIjtzOjA6IiI7czoxODoiZmVhdHVyZV9saW5rX2NvbG9yIjtzOjA6IiI7czoyNDoiZmVhdHVyZV9saW5rX2hvdmVyX2NvbG9yIjtzOjA6IiI7fX0=', 'color_scheme_advanced' => 'YjowOw==', 'mobile_redirect' => 'YjowOw==', 'seo' => 'YjowOw==', 'scripts' => 'YjowOw==', 'fb_share' => 'YjowOw==', 'lightbox' => 'YjowOw==', 'exit_redirect' => 'YjowOw==', 'one_time_offer' => 'YjowOw==', 'launch_gateway' => 'YjowOw==', 'launch_funnel' => 'YjowOw==', 'landing_bg' => 'YToxOntzOjU6ImltYWdlIjtzOjA6IiI7fQ=='), 'settings_images' => 'YTowOnt9');
     /*
      * Custom settings and properties
      */
     switch ($this->style) {
         case 'A':
             $config['settings']['size_color'] = 'YTozOntzOjk6ImJveF93aWR0aCI7czozOiIzMDAiO3M6MTU6ImJveF9jb2xvcl9zdGFydCI7czo3OiIjZjlmOWY5IjtzOjEzOiJib3hfY29sb3JfZW5kIjtzOjc6IiNkYWRhZGEiO30=';
             $config['layouts'] = 'YTo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cGMyTnBibWNnWld4cGRDNGdSRzl1WldNZ2RtVnNJRzUxYm1NZ2JtOXVJR3hoWTNWeklIWmxibVZ1WVhScGN5QmpiMjF0YjJSdkxnPT1bL29wdGluX2JveF9maWVsZF1bb3B0aW5fYm94X2ZpZWxkIG5hbWU9InByaXZhY3kiXVdlIHZhbHVlIHlvdXIgcHJpdmFjeSBhbmQgd291bGQgbmV2ZXIgc3BhbSB5b3VbL29wdGluX2JveF9maWVsZF1bb3B0aW5fYm94X2ZpZWxkIG5hbWU9InRvcF9jb2xvciJddW5kZWZpbmVkWy9vcHRpbl9ib3hfZmllbGRdW29wdGluX2JveF9idXR0b24gdHlwZT0iMCIgYnV0dG9uX2JlbG93PSJZIl1HZXQgSW5zdGFudCBBY2Nlc3MhWy9vcHRpbl9ib3hfYnV0dG9uXSBbL29wdGluX2JveF0iO3M6MTM6ImVsZW1lbnRfY2xhc3MiO3M6MjA6ImVsZW1lbnQtY29udGFpbmVyIGNmIjtzOjE4OiJlbGVtZW50X2RhdGFfc3R5bGUiO3M6MDoiIjt9fX19fX19';
             $config['images'] = 'YToxOntzOjQ2OiJ3cC1jb250ZW50L3VwbG9hZHMvMjAxMy8xMC9TYW1wbGVMb2dvLURhcmsucG5nIjtzOjE5OiJTYW1wbGVMb2dvLURhcmsucG5nIjt9';
             break;
         case 'B':
             $config['settings']['size_color'] = 'YTozOntzOjk6ImJveF93aWR0aCI7czozOiIzMDAiO3M6MTU6ImJveF9jb2xvcl9zdGFydCI7czo3OiIjMDAwMDAwIjtzOjEzOiJib3hfY29sb3JfZW5kIjtzOjc6IiMwMDAwMDAiO30=';
             $config['layouts'] = 'YToxOntzOjQ6ImJvZHkiO2E6MTp7aTowO2E6NDp7czo5OiJyb3dfY2xhc3MiO3M6MjY6InJvdyBvbmUtY29sIGNmIHVpLXNvcnRhYmxlIjtzOjk6InJvd19zdHlsZSI7czowOiIiO3M6MTQ6InJvd19kYXRhX3N0eWxlIjtzOjA6IiI7czo4OiJjaGlsZH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SB5b3VyIHByaXZhY3kgYW5kIHdvdWxkIG5ldmVyIHNwYW0geW91Wy9vcHRpbl9ib3hfZmllbGRdW29wdGluX2JveF9maWVsZCBuYW1lPSJ0b3BfY29sb3IiXXVuZGVmaW5lZFsvb3B0aW5fYm94X2ZpZWxkXVtvcHRpbl9ib3hfYnV0dG9uIHR5cGU9IjAiIGJ1dHRvbl9iZWxvdz0iWSJdR2V0IEluc3RhbnQgQWNjZXNzIVsvb3B0aW5fYm94X2J1dHRvbl0gWy9vcHRpbl9ib3hdIjtzOjEzOiJlbGVtZW50X2NsYXNzIjtzOjIwOiJlbGVtZW50LWNvbnRhaW5lciBjZiI7czoxODoiZWxlbWVudF9kYXRhX3N0eWxlIjtzOjA6IiI7fX19fX19fQ==';
             $config['images'] = 'YToxOntzOjQ3OiJ3cC1jb250ZW50L3VwbG9hZHMvMjAxMy8xMC9TYW1wbGVMb2dvLUxpZ2h0LnBuZyI7czoyMDoiU2FtcGxlTG9nby1MaWdodC5wbmciO30=';
             break;
         default:
             return;
     }
     /*
      * Fixing image paths, switching {op_filename:"wp-content/uploads/10/SampleLogo-Dark.png"} with
      * path to real file location (inside of page image collection)
      */
     $config = $this->fix_image_paths($config, trailingslashit(OP_PAGES_URL . 'landing/2/styles'));
     $settings = op_get_var($config, 'settings', array());
     $settings = base64_encode(serialize($settings));
     $this->config->settings = $settings;
     $this->config->layouts = op_get_var($config, 'layouts', array());
     op_page_set_saved_settings($this->config, array());
 }
Exemple #2
0
 function output($section_name, $config, $button_atts, $return = false)
 {
     $default = array('type' => 1, 'image' => '', 'location' => null, 'content' => '', 'element_type' => 'a', 'href' => '', 'new_window' => '', 'cc' => '', 'align' => 'center', 'text' => '', 'text_size' => 20, 'text_color' => null, 'text_font' => null, 'text_bold' => 'N', 'text_underline' => 'N', 'text_italic' => 'N', 'text_letter_spacing' => null, 'subtext_panel' => 'N', 'subtext' => '', 'subtext_size' => 15, 'subtext_color' => null, 'subtext_font' => null, 'subtext_bold' => 'N', 'subtext_underline' => 'N', 'subtext_italic' => 'N', 'subtext_letter_spacing' => null, 'text_shadow_panel' => 'N', 'text_shadow_vertical' => 0, 'text_shadow_horizontal' => 0, 'text_shadow_color' => null, 'text_shadow_blur' => 0, 'styling_width' => 63, 'styling_height' => 23, 'styling_border_color' => null, 'styling_border_size' => 0, 'styling_border_radius' => 0, 'styling_border_opacity' => 100, 'styling_gradient' => 'N', 'styling_shine' => 'N', 'styling_gradient_start_color' => null, 'styling_gradient_end_color' => null, 'drop_shadow_panel' => 'N', 'drop_shadow_vertical' => 0, 'drop_shadow_horizontal' => 0, 'drop_shadow_blur' => 0, 'drop_shadow_spread' => 0, 'drop_shadow_color' => null, 'drop_shadow_opacity' => 100, 'inset_shadow_panel' => 'N', 'inset_shadow_vertical' => 0, 'inset_shadow_horizontal' => 0, 'inset_shadow_blur' => 0, 'inset_shadow_spread' => 0, 'inset_shadow_color' => null, 'inset_shadow_opacity' => 100);
     if (isset($config['defaults'])) {
         $default = wp_parse_args($config['defaults'], $default);
     }
     $button_atts = wp_parse_args($button_atts, $default);
     $type = op_get_var($button_atts, 'type', 0);
     $content = op_get_var($button_atts, 'content');
     switch ($type) {
         case '1':
         case '7':
             $button_atts['text'] = $content;
             $button_atts['element_type'] = 'button';
             $out = call_user_func_array(array('OptimizePress_Default_Assets', 'button_' . $type), array($button_atts, $content));
             break;
             // case '7':
             // 	$out = sprintf('<button type="submit" class="image-button"><img src="%1$s" alt="%2$s" /></button>', op_get_var($button_atts, 'image'), $content);
             // 	break;
         // case '7':
         // 	$out = sprintf('<button type="submit" class="image-button"><img src="%1$s" alt="%2$s" /></button>', op_get_var($button_atts, 'image'), $content);
         // 	break;
         default:
             $out = sprintf(op_get_var($config, 'default_button', '<button type="submit" class="default-button"><span>%1$s</span></button>'), $content);
             break;
     }
     if ($return) {
         return $out;
     }
     echo $out;
 }
Exemple #3
0
 function get_options()
 {
     //$content_fields = op_optin_default_fields();
     $fields = array('title' => array('name' => __('Title', 'optimizepress'), 'help' => __('Enter the title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress')), 'paragraph' => array('name' => __('Content', 'optimizepress'), 'help' => __('Enter the sub title/message text above your submit button', 'optimizepress'), 'type' => 'wysiwyg', 'default' => __('Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.<br />Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum.', 'optimizepress'), 'disable_font' => true), 'submit_button' => array('name' => __('Submit Button', 'optimizepress'), 'help' => __('Enter the text for the button on your feature area', 'optimizepress'), 'default' => __('Take The Tour...', 'optimizepress'), 'disable_font' => true), 'link_url' => array('name' => __('Button Link URL', 'optimizepress'), 'disable_font' => true));
     $img_fields = array('image' => array('name' => __('Image', 'optimizepress'), 'help' => __('Enter the URL to the image', 'optimizepress'), 'default' => '', 'type' => 'image', 'disable_font' => true));
     $vid_opts = array('values' => array('type' => 'video', 'width' => '580', 'height' => '325'));
     $styles = array(1 => array('content' => array('module' => 'content_fields', 'title' => __('Content', 'optimizepress'), 'mod_options' => array('fields' => $fields), 'template' => array($this, 'content_fields'), 'before' => '<div class="twelve columns">', 'after' => '</div>'), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'template' => array($this, 'content_fields'), 'before' => '<div class="twelve featured-image columns">', 'after' => '</div>')), 2 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="nine columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>')), 3 => array('optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>'), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve columns featured-image offset-by-two">', 'after' => '</div>')), 4 => array('optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>'), 'video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>')), 5 => array('image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve featured-image columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="twelve columns">', 'after' => '</div>')), 6 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields), 'before' => '<div class="nine columns">', 'after' => '</div>')), 7 => array('image' => array('module' => 'content_fields', 'mod_options' => array('fields' => $img_fields), 'before' => '<div class="twelve columns featured-image">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns offset-by-two">', 'after' => '</div>')), 8 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fifteen columns video-panel">', 'after' => '</div>'), 'optin' => array('module' => 'signup_form', 'before' => '<div class="nine columns">', 'after' => '</div>')), 9 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('title' => array('name' => __('Title', 'optimizepress'), 'help' => __('Enter the title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress')), 'subtitle' => array('name' => __('Sub Title', 'optimizepress'), 'help' => __('Enter the sub title to be displayed at the top of the content area', 'optimizepress'), 'default' => __('The perfect way to convert your traffic into sales', 'optimizepress'))))), 'image' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('image' => array('name' => __('Image', 'optimizepress'), 'help' => __('Enter the URL to the image', 'optimizepress'), 'default' => OP_PAGES_URL . 'global/images/marketing-sites/screenies.png', 'type' => 'image', 'disable_font' => true))))), 10 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => $fields))), 11 => array('content_large' => array('module' => 'live_editor', 'module_type' => 'page')));
     //1,6,2,7,3,8,4,9,5,10
     $this->options = isset($styles[$this->style]) ? $styles[$this->style] : array();
     if ($this->style != 11) {
         $this->options = array_merge(array('liveeditor_above' => array('module' => 'live_editor', 'module_type' => 'page')), $this->options, array('liveeditor_below' => array('module' => 'live_editor', 'module_type' => 'page')));
     }
     foreach ($this->options as $name => $options) {
         op_mod($options['module'], op_get_var($options, 'module_type', 'blog'));
         if (!isset($options['template'])) {
             if ($this->options[$name]['module'] == 'content_fields') {
                 $this->options[$name]['template'] = array($this, 'content_fields');
             } elseif ($this->options[$name]['module'] == 'signup_form') {
                 $this->options[$name]['template'] = array($this, 'optin_box');
                 $this->options[$name]['mod_options'] = array('disable' => 'color_scheme', 'content_fields' => op_optin_default_fields());
                 $this->options[$name]['mod_options']['submit_button_config'] = array('defaults' => array('content' => __('Get Started', 'optimizepress')));
             } elseif ($this->options[$name]['module'] == 'video') {
                 $this->options[$name]['template'] = array($this, 'video_placeholder');
             }
         }
     }
 }
 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     $data = array('enabled' => op_get_var($op, 'enabled', 'N'), 'url' => op_get_var($op, 'url'), 'code' => op_get_var($op, 'code'));
     if ($return) {
         return $data;
     }
     $this->update_option($section_name, $data);
 }
 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     $data = array('like_url' => op_get_var($op, 'like_url'));
     if ($return) {
         return $data;
     }
     $this->update_option($section_name, $data);
 }
Exemple #6
0
 function __construct()
 {
     if (defined('OP_PAGEBUILDER_ID')) {
         $this->_page_id = OP_PAGEBUILDER_ID;
     } elseif (is_admin() && op_get_var($_GET, 'page') == OP_SN . '-page-builder' && isset($_GET['page_id'])) {
         $this->_page_id = $_GET['page_id'];
     }
 }
    function output($section_name, $config, $op, $return = false)
    {
        if ($return) {
            return $op;
        }
        $style = op_get_current_item($this->_get_styles(), op_get_var($op, 'style'));
        echo '
<div class="post-promo-box post-promo-' . $style . '">' . implode("\n", op_get_var($op, 'fields', array())) . '</div>';
    }
 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     $time = op_get_var($op, 'time', array());
     $data = array('enabled' => op_get_var($op, 'enabled', 'N'), 'url' => op_get_var($op, 'url'), 'time' => array('days' => op_get_var($time, 'days'), 'hours' => op_get_var($time, 'hours'), 'minutes' => op_get_var($time, 'minutes'), 'seconds' => op_get_var($time, 'seconds')));
     if ($return) {
         return $data;
     }
     $this->update_option($section_name, $data);
 }
 /**
  * Save form data
  * @param  array $data
  * @return void
  */
 public function saveTheme($data)
 {
     // Frontend
     op_update_option('op_external_theme_css', op_get_var($data, 'external_theme_css'));
     op_update_option('op_external_theme_js', op_get_var($data, 'external_theme_js'));
     // Backend
     op_update_option('op_le_external_theme_css', op_get_var($data, 'le_external_theme_css'));
     op_update_option('op_le_external_theme_js', op_get_var($data, 'le_external_theme_js'));
 }
 function check_redirect()
 {
     $options = op_page_option('mobile_redirect');
     $url = op_get_var($options, 'url');
     if (op_get_var($options, 'enabled', 'N') == 'Y' && !empty($url)) {
         if ($this->is_mobile()) {
             header('Location: ' . $url);
             exit;
         }
     }
 }
Exemple #11
0
 function output($section_name, $config, $op, $return = false)
 {
     $id = rtrim($this->get_fieldid($section_name), '_');
     $id = ltrim($id, 'op_');
     $one_col = op_get_var($config, 'one_col', false);
     $add_class = op_get_var($config, 'container_class');
     if (!empty($add_class)) {
         $add_class = ' ' . $add_class;
     }
     $default = op_get_var($config, 'default_layout', array());
     if (!is_array($default)) {
         $default = unserialize(base64_decode($default));
     }
     return op_page_layout($id, false, $id . '_area', 'editable-area' . $add_class, $default, $one_col);
 }
Exemple #12
0
    function hover_image($content)
    {
        $content = op_get_var($content, 'content', array());
        $image = op_get_var($content, 'image');
        $hover_image = op_get_var($content, 'hover_image');
        $html = '';
        if ($image != '') {
            $html = '
<div class="op-hover-image">
	<img src="' . $image . '" alt=""' . ($hover_image != '' ? ' class="normal"' : '') . ' />' . ($hover_image != '' ? '
	<img src="' . $hover_image . '" class="hover" alt="" />' : '') . '
</div>';
        }
        return $html;
    }
 function save_content_layout($op)
 {
     global $wpdb;
     $layout = op_get_var($op, 'option');
     if ($layout == 'current') {
         return;
     }
     $content_layout = array();
     if ($layout != 'blank') {
         if ($result = $wpdb->get_var($wpdb->prepare("SELECT layout FROM `{$wpdb->prefix}optimizepress_predefined_layouts` WHERE id=%d", $layout))) {
             $content_layout = unserialize(base64_decode($result));
         }
     }
     op_page_update_layout($content_layout, 'body');
 }
Exemple #14
0
 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     global $wpdb;
     $gateway = op_get_var($op, 'gateway_override', array());
     $data = array('enabled' => op_get_var($op, 'enabled', 'N'), 'funnel_id' => op_get_var($op, 'funnel_id'), 'gateway_override' => array('enabled' => op_get_var($gateway, 'enabled', 'N'), 'redirect' => op_get_var($gateway, 'redirect'), 'code' => op_get_var($gateway, 'code')));
     $entry = $wpdb->get_col($wpdb->prepare("SELECT page_id FROM `{$wpdb->prefix}optimizepress_launchfunnels_pages` WHERE `page_id` = %s AND `funnel_id` = %s", OP_PAGEBUILDER_ID, $data['funnel_id']));
     if (!$entry) {
         $wpdb->query($wpdb->prepare("DELETE FROM `{$wpdb->prefix}optimizepress_launchfunnels_pages` WHERE `page_id` = %s", OP_PAGEBUILDER_ID));
         if ($data['enabled'] == 'Y') {
             $insert = array('funnel_id' => $data['funnel_id'], 'page_id' => OP_PAGEBUILDER_ID);
             $wpdb->insert($wpdb->prefix . 'optimizepress_launchfunnels_pages', $insert);
         }
     }
     if ($return) {
         return $data;
     }
     update_post_meta(OP_PAGEBUILDER_ID, '_' . OP_SN . '_launch_funnel', maybe_serialize($data));
     $this->update_option($section_name, $data);
 }
Exemple #15
0
    function get_options()
    {
        //$content_fields = op_optin_default_fields();
        $vid_opts = array('values' => array('type' => 'video', 'width' => '540', 'height' => '350'));
        $styles = array(1 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'title' => __('Content', OP_SN), 'mod_options' => array('fields' => array()), 'template' => array($this, 'vid_list_1'), 'before' => '<div class="ten columns">', 'after' => '</div>')), 2 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array()), 'template' => array($this, 'vid_list_2'), 'before' => '<div class="ten columns">', 'after' => '</div>')), 3 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('paragraph' => array('name' => __('Content', OP_SN), 'help' => __('Enter the content for your feature area', OP_SN), 'type' => 'wysiwyg', 'default' => __('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', OP_SN), 'disable_font' => true))), 'before' => '<div class="ten columns">', 'after' => '</div>')), 4 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div class="fourteen columns">', 'after' => '</div>'), 'content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array()), 'template' => array($this, 'vid_list_3'), 'before' => '<div class="ten columns">', 'after' => '</div>')), 5 => array('video' => array('module' => 'video', 'mod_options' => $vid_opts, 'before' => '<div>', 'after' => '</div>')), 6 => array('content' => array('module' => 'content_fields', 'mod_options' => array('fields' => array('subtitle' => array('title' => __('Title', OP_SN), 'help' => __('Enter the title to be displayed at the top of the content area', OP_SN), 'default' => __('Launch Videos', OP_SN)))), 'before' => '<div class="row cf">
					<div class="twentytwo columns offset-by-one cf">
						<div class="eleven columns alpha">', 'after' => '
						</div>
						<div class="eleven columns omega">
							<div class="social-buttons">
								<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>
								<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
								<fb:like send="false" width="220" show_faces="false"></fb:like>	
							</div>
						</div>
					</div>
				</div>', 'template' => array($this, 'content_template_fb')), 'video' => array('module' => 'video', 'mod_options' => array('values' => array('type' => 'video', 'width' => '860', 'height' => '470')), 'before' => '
				<div class="row cf">
					<div class="twentytwo offset-by-one columns">', 'after' => '
					</div>
				</div>')), 7 => array('content_large' => array('module' => 'live_editor', 'module_type' => 'page')));
        //1,6,2,7,3,8,4,9,5,10
        $this->options = isset($styles[$this->style]) ? $styles[$this->style] : array();
        if ($this->style != 7) {
            $this->options = array_merge(array('liveeditor_above' => array('module' => 'live_editor', 'module_type' => 'page')), $this->options, array('liveeditor_below' => array('module' => 'live_editor', 'module_type' => 'page')));
        }
        foreach ($this->options as $name => $options) {
            op_mod($options['module'], op_get_var($options, 'module_type', 'blog'));
            if (!isset($options['template'])) {
                if ($this->options[$name]['module'] == 'content_fields') {
                    $this->options[$name]['template'] = array($this, 'content_fields');
                } elseif ($this->options[$name]['module'] == 'signup_form') {
                    $this->options[$name]['template'] = array($this, 'optin_box');
                    $this->options[$name]['mod_options'] = array('disable' => 'color_scheme', 'content_fields' => op_optin_default_fields());
                    $this->options[$name]['mod_options']['submit_button_config'] = array('defaults' => array('content' => __('Get Started', OP_SN)));
                } elseif ($this->options[$name]['module'] == 'video') {
                    $this->options[$name]['template'] = array($this, 'video_placeholder');
                }
            }
        }
    }
Exemple #16
0
 function save_settings($section_name, $config = array(), $op, $return = false)
 {
     $video = array('type' => 'url', 'embed' => '', 'url' => '', 'url1' => '', 'url2' => '');
     if (isset($op['type'])) {
         $width = 511;
         $height = 288;
         if (isset($config['values'])) {
             extract($config['values']);
         }
         if ($op['type'] == 'embed' || $op['type'] == 'url' || $op['type'] == 'youtube') {
             $video = array('type' => $op['type'], 'embed' => stripslashes(op_get_var($op, 'embed')), 'url' => op_get_var($op, 'url'), 'url1' => op_get_var($op, 'url1'), 'url2' => op_get_var($op, 'url2'), 'placeholder' => op_get_var($op, 'placeholder'), 'width' => op_get_var($op, 'width', $width), 'height' => op_get_var($op, 'height', $height), 'hide_controls' => op_get_var($op, 'hide_controls', 'N'), 'auto_play' => op_get_var($op, 'auto_play', 'N'), 'auto_buffer' => op_get_var($op, 'auto_buffer', 'N'), 'youtube_url' => op_get_var($op, 'youtube_url'), 'youtube_auto_play' => op_get_var($op, 'youtube_auto_play', 'N'), 'youtube_hide_controls' => op_get_var($op, 'youtube_hide_controls', 'N'), 'youtube_remove_logo' => op_get_var($op, 'youtube_remove_logo', 'N'), 'youtube_show_title_bar' => op_get_var($op, 'youtube_show_title_bar', 'N'), 'youtube_force_hd' => op_get_var($op, 'youtube_force_hd', 'none'), 'margin_top' => op_get_var($op, 'margin_top', 0), 'margin_bottom' => op_get_var($op, 'margin_bottom', 20), 'border_size' => op_get_var($op, 'border_size', '0'), 'border_color' => op_get_var($op, 'border_color', '#fff'));
             if (empty($video['width'])) {
                 $video['width'] = $width;
             }
             if (empty($video['height'])) {
                 $video['height'] = $height;
             }
         }
     }
     if ($return) {
         return $video;
     }
     $this->update_option($section_name, $video);
 }
Exemple #17
0
 function save_advanced($op)
 {
     $advanced = op_page_option('color_scheme_advanced');
     $advanced = is_array($advanced) ? $advanced : array();
     $typography = op_typography_elements();
     $current_typography = op_page_option('typography');
     if (!is_array($current_typography)) {
         $current_typography = op_page_config('default_config', 'typography');
         if (!is_array($current_typography)) {
             $current_typography = array();
         }
     }
     if (!isset($current_typography['color_elements'])) {
         $current_typography['color_elements'] = array();
     }
     $elements = array('page' => array('link_color' => 'link_color', 'link_hover_color' => 'link_hover_color'), 'footer' => array('text_color' => 'footer_text_color', 'link_color' => 'footer_link_color', 'link_hover_color' => 'footer_link_hover_color'), 'feature_area' => array('text_color' => 'feature_text_color', 'link_color' => 'feature_link_color', 'link_hover_color' => 'feature_link_hover_color'));
     $options = $this->_advanced_sections();
     foreach ($options as $section => $settings) {
         $vals = op_get_var($op, $section, array());
         if (!isset($advanced[$section])) {
             $advanced[$section] = array();
         }
         $start_color = '';
         foreach ($settings['elements'] as $name => $options) {
             $tmp = op_get_var($vals, $name);
             //Check if this is a gradient. If so, and the bottom color is empty, set to first color
             if (strstr($name, '_start')) {
                 $start_color = $tmp;
             }
             if (strstr($name, '_end') && empty($tmp)) {
                 $tmp = $start_color;
             }
             if (isset($options['text_decoration'])) {
                 $newtmp = array('color' => op_get_var($tmp, 'color'), 'text_decoration' => op_get_var($tmp, 'text_decoration'));
             } else {
                 $newtmp = $tmp;
             }
             $advanced[$section][$name] = $newtmp;
             if (isset($elements[$section])) {
                 if (isset($elements[$section][$name])) {
                     $current_typography['color_elements'][$elements[$section][$name]] = $newtmp;
                 }
             }
         }
     }
     op_update_page_option('typography', $current_typography);
     /*$options = array(
     			'header' => array('nav_bar_start','nav_bar_end','nav_bar_link'),
     			'feature_area' => array('feature_start','feature_end'),
     			'footer' => array('footer_start','footer_end'),
     			'page' => array('repeating_bg','bg_color','link_color')
     		);
     
     		foreach($options as $name => $fields){
     			$vals = op_get_var($op,$name,array());
     			if(!isset($advanced[$name])){
     				$advanced[$name] = array();
     			}
     			foreach($fields as $f){
     				$advanced[$name][$f] = op_get_var($vals,$f);
     			}
     		}*/
     op_update_page_option('color_scheme_advanced', $advanced);
 }
Exemple #18
0
 function get_metas()
 {
     global $page, $paged, $post;
     $title = $keywords = $description = '';
     if (is_single() || is_page()) {
         $seo = maybe_unserialize(get_post_meta(get_queried_object_id(), '_' . OP_SN . '_seo', true));
         $seo = is_array($seo) ? $seo : array();
         $title = op_get_var($seo, 'title');
         $keywords = op_get_var($seo, 'keywords');
         $description = op_get_var($seo, 'description');
         $ogtitle = op_get_var($seo, 'ogtitle');
         $ogdescription = op_get_var($seo, 'ogdescription');
         $ogimage = op_get_var($seo, 'ogimage');
     }
     if (empty($title)) {
         $titleFull = false;
         $title = wp_title('&mdash;', false, 'right');
         $temp = explode('&mdash;', $title);
         if (isset($temp[1]) && strlen($temp[1]) == 1) {
             $title .= get_bloginfo('name');
         }
     } else {
         $titleFull = true;
         //$title .= ' &mdash; ';
     }
     $site_title = '';
     if (!($site_title = op_get_option('seo', 'title'))) {
         $site_title = get_bloginfo('name');
         /*$site_description = get_bloginfo( 'description', 'display' );
           if ( $site_description && ( is_home() || is_front_page() ) )
               $site_title .= ' &mdash; ' . $site_description;*/
     }
     if ($titleFull) {
         if (!empty($site_title)) {
             $title .= ' &mdash; ' . $site_title;
         }
     }
     if ($paged >= 2 || $page >= 2) {
         $title .= ' &mdash; ' . sprintf(__('Page %s', OP_SN), max($paged, $page));
     }
     if (empty($keywords)) {
         $keywords = '';
     }
     if (empty($description)) {
         if (!empty($post->post_content)) {
             $cont = substr(strip_tags(strip_shortcodes($post->post_content)), 0, 150);
             $description = trim($cont);
         } else {
             $description = '';
         }
     }
     if (empty($ogtitle)) {
         $ogtitle = $title;
     }
     if (empty($ogdescription)) {
         $ogdescription = $description;
     }
     if (empty($ogimage)) {
         if (has_post_thumbnail($post->ID)) {
             $thumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'list-image');
             $ogimage = $thumbnail[0];
         } else {
             $ogimage = '';
         }
     }
     return array('title' => $title, 'description' => $description, 'keywords' => $keywords, 'ogtitle' => $ogtitle, 'ogdescription' => $ogdescription, 'ogimage' => $ogimage);
 }
<?php

$conf = op_get_var($config, 'page_thumbnails');
?>
<label class="form-title"><?php 
_e('Page Thumbnail', OP_SN);
?>
</label>
<p class="op-micro-copy"><?php 
_e('Select the landing page for this stage of your launch funnel. The user will be redirected here', OP_SN);
?>
</p>
<?php 
op_thumb_gallery('op[funnel_pages]' . $field_name . '[page_thumbnails][active_thumbnail_preset]', op_get_var($conf, 'active_thumbnail_preset'), 'page_thumbs');
op_upload_field('op[funnel_pages]' . $field_name . '[page_thumbnails][active_thumbnail]' . $field_ext, op_get_var($conf, 'active_thumbnail'));
?>

<label class="form-title"><?php 
_e('Coming Soon Thumbnail', OP_SN);
?>
</label>
<p class="op-micro-copy"><?php 
_e('This page contains your launch content, video or training to add value as part of the launch process', OP_SN);
?>
</p>
<?php 
op_thumb_gallery('op[funnel_pages]' . $field_name . '[page_thumbnails][inactive_thumbnail_preset]', op_get_var($conf, 'inactive_thumbnail_preset'), 'page_thumbs');
op_upload_field('op[funnel_pages]' . $field_name . '[page_thumbnails][inactive_thumbnail]' . $field_ext, op_get_var($conf, 'inactive_thumbnail'));
Exemple #20
0
 function save_settings($section_name, $config = array(), $op)
 {
     $sharing = array('enabled' => op_get_var($op, 'enabled', 'N'));
     $this->update_option($section_name, $sharing);
 }
Exemple #21
0
 function output($section_name, $config, $op, $return = false)
 {
     $disable = $this->_get_disabled($config);
     if (is_array($section_name[0]) && count($section_name) > 1) {
         $tmp = $section_name;
         $section_name = $section_name[0];
         for ($i = 1, $sl = count($tmp); $i < $sl; $i++) {
             array_push($section_name, $tmp[$i]);
         }
     }
     $data = $used_fields = array();
     if (isset($op['form_html'])) {
         $fh = $op['form_html'];
         $data['before_form'] = op_get_var($config, 'before_form');
         $data['after_form'] = op_get_var($config, 'after_form');
         $data['extra_fields'] = array();
         $form_class = '';
         $disable_name = op_get_var($fh, 'disable_name', 'N') == 'Y';
         $js_defaults = array();
         $fields = array('email');
         if (!$disable_name) {
             array_unshift($fields, 'name');
         }
         switch (op_get_var($fh, 'integration_type')) {
             case 'email':
                 $email_address = op_get_var($fh, 'email_address');
                 $redirect_url = op_get_var($fh, 'redirect_url');
                 if (!isset($disable['content']) && isset($op['content'])) {
                     foreach ($fields as $field) {
                         if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                             $js_defaults[$field] = $op['content'][$field . '_default'];
                         }
                     }
                     if (count($js_defaults) > 0) {
                         $count = count($this->output_defaults);
                         $this->output_defaults[++$count] = $js_defaults;
                         $form_class = 'op-signup-form-' . $count;
                     }
                 }
                 $new_fields = array();
                 foreach ($fields as $field) {
                     $data[$field . '_input'] = '<input type="text" name="' . $field . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                     $new_fields[$field] = array('name' => $field, 'text' => op_get_var($js_defaults, $field));
                 }
                 $extra_fields = op_get_var($fh, 'email_extra_fields', array());
                 $new_extra = array();
                 if (is_array($extra_fields)) {
                     $counter = 1;
                     foreach ($extra_fields as $field) {
                         $new_extra['op_extra_' . $counter] = $field;
                         $data['extra_fields'][] = '<input type="text" name="op_extra_' . $counter . '" placeholder="' . op_attr($field) . '" />';
                         $counter++;
                     }
                 }
                 $data['form_open'] = '<form action="' . op_current_url() . '" method="post"' . ($form_class == '' ? '' : ' class="' . $form_class . '"') . '>';
                 $data['form_close'] = '</form>';
                 $hidden = array('email_to' => $email_address, 'redirect_url' => $redirect_url, 'extra_fields' => $new_extra, 'fields' => $new_fields);
                 $data['hidden_elems'] = '<input type="hidden" name="op_optin_form_data" value="' . op_attr(base64_encode(serialize($hidden))) . '" /><input type="hidden" name="op_optin_form" value="Y" />';
                 break;
             case 'custom':
             case 'oneshoppingcart':
                 $action = site_url('/process-optin-form/');
                 if ($action != '') {
                     if (!isset($disable['content']) && isset($op['content'])) {
                         foreach ($fields as $field) {
                             if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                                 $js_defaults[$field] = $op['content'][$field . '_default'];
                             }
                         }
                         if (count($js_defaults) > 0) {
                             $count = count($this->output_defaults);
                             $this->output_defaults[++$count] = $js_defaults;
                             $form_class = 'op-signup-form-' . $count;
                         }
                     }
                     $data['form_open'] = '<form action="' . esc_url($action) . '" method="' . op_get_var($fh, 'method', 'post') . '"' . ($form_class == '' ? '' : ' class="' . $form_class . '"') . (op_get_var($fh, 'new_window', 'N') == 'Y' ? ' target="_blank"' : '') . '>';
                     $data['form_close'] = '</form>';
                     foreach ($fields as $field) {
                         $fieldname = '';
                         if (isset($fh[$field . '_box']) && !empty($fh[$field . '_box'])) {
                             $used_fields[$fh[$field . '_box']] = true;
                             $fieldname = $fh[$field . '_box'];
                         }
                         $data[$field . '_input'] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                     }
                     $extra_fields = op_get_var($fh, 'extra_fields', array());
                     $field_names = op_get_var($extra_fields, 'field_name', array());
                     $field_titles = op_get_var($extra_fields, 'title', array());
                     $field_text = op_get_var($extra_fields, 'text', array());
                     for ($i = 0, $il = count($field_names); $i < $il; $i++) {
                         $fieldname = $field_names[$i];
                         if ($field_names[$i] == '' || $field_names[$i] == 'op_add_new_field') {
                             $fieldname = $field_titles[$i];
                         }
                         $data['extra_fields'][] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr($field_text[$i]) . '" />';
                         $used_fields[$fieldname] = true;
                     }
                     $hidden_elems = '';
                     if (isset($fh['fields']) && isset($fh['fields']['field_name']) && isset($fh['fields']['field_vals'])) {
                         $field_names = $fh['fields']['field_name'];
                         $field_vals = $fh['fields']['field_vals'];
                         $field_count = count($field_names);
                         if (is_array($field_names) && is_array($field_vals) && $field_count == count($field_vals)) {
                             for ($i = 0; $i < $field_count; $i++) {
                                 if (!isset($used_fields[$field_names[$i]])) {
                                     $hidden_elems .= '<input type="hidden" name="' . op_attr($field_names[$i]) . '" value="' . op_attr($field_vals[$i]) . '" />';
                                 }
                             }
                         }
                     }
                     $data['hidden_elems'] = $hidden_elems;
                     $data['hidden_elems'] .= '<input type="hidden" name="redirect_url" value="' . op_get_var($fh, 'action') . '" />';
                 }
                 break;
             case 'infusionsoft':
                 $action = op_get_var($fh, 'action_page');
                 if (!isset($disable['content']) && isset($op['content'])) {
                     foreach ($fields as $field) {
                         if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                             $js_defaults[$field] = $op['content'][$field . '_default'];
                         }
                     }
                     if (count($js_defaults) > 0) {
                         $count = count($this->output_defaults);
                         $this->output_defaults[++$count] = $js_defaults;
                         $form_class = 'op-signup-form-' . $count;
                     }
                 }
                 $data['form_open'] = '<form action="' . esc_url($action) . '" method="POST"' . ($form_class == '' ? '' : ' class="' . $form_class . '"') . '>';
                 $data['form_close'] = '</form>';
                 /*
                  * Hardcoding the email field name
                  */
                 $fh['email_box'] = 'inf_field_Email';
                 foreach ($fields as $field) {
                     $fieldname = '';
                     if (isset($fh[$field . '_box']) && !empty($fh[$field . '_box'])) {
                         $used_fields[$fh[$field . '_box']] = true;
                         $fieldname = $fh[$field . '_box'];
                     }
                     $data[$field . '_input'] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                 }
                 $extra_fields = op_get_var($fh, 'extra_fields', array());
                 $field_names = op_get_var($extra_fields, 'field_name', array());
                 $field_titles = op_get_var($extra_fields, 'title', array());
                 $field_text = op_get_var($extra_fields, 'text', array());
                 for ($i = 0, $il = count($field_names); $i < $il; $i++) {
                     $fieldname = $field_names[$i];
                     if ($field_names[$i] == '' || $field_names[$i] == 'op_add_new_field') {
                         $fieldname = $field_titles[$i];
                     }
                     $data['extra_fields'][] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr($field_text[$i]) . '" />';
                     $used_fields[$fieldname] = true;
                 }
                 $hidden_elems = '';
                 if (isset($fh['fields']) && isset($fh['fields']['field_name']) && isset($fh['fields']['field_vals'])) {
                     $field_names = $fh['fields']['field_name'];
                     $field_vals = $fh['fields']['field_vals'];
                     $field_count = count($field_names);
                     if (is_array($field_names) && is_array($field_vals) && $field_count == count($field_vals)) {
                         for ($i = 0; $i < $field_count; $i++) {
                             if (!isset($used_fields[$field_names[$i]])) {
                                 $hidden_elems .= '<input type="hidden" name="' . op_attr($field_names[$i]) . '" value="' . op_attr($field_vals[$i]) . '" />';
                             }
                         }
                     }
                 }
                 $data['hidden_elems'] = $hidden_elems;
                 $data['hidden_elems'] .= '<input type="hidden" name="provider" value="' . op_get_var($fh, 'integration_type') . '" />';
                 $data['hidden_elems'] .= '<input type="hidden" name="redirect_url" value="' . op_get_var($fh, 'thank_you_page', op_current_url()) . '" />';
                 $data['hidden_elems'] .= '<input type="hidden" name="list" value="' . op_get_var($fh, 'list') . '" />';
                 break;
             case 'aweber':
             case 'mailchimp':
             case 'icontact':
             case 'getresponse':
             case 'campaignmonitor':
             case 'officeautopilot':
                 $action = site_url('/process-optin-form/');
                 if (!isset($disable['content']) && isset($op['content'])) {
                     foreach ($fields as $field) {
                         if (isset($op['content'][$field . '_default']) && !empty($op['content'][$field . '_default'])) {
                             $js_defaults[$field] = $op['content'][$field . '_default'];
                         }
                     }
                     if (count($js_defaults) > 0) {
                         $count = count($this->output_defaults);
                         $this->output_defaults[++$count] = $js_defaults;
                         $form_class = 'op-signup-form-' . $count;
                     }
                 }
                 $data['form_open'] = '<form action="' . esc_url($action) . '" method="POST"' . ($form_class == '' ? '' : ' class="' . $form_class . '"') . '>';
                 $data['form_close'] = '</form>';
                 /*
                  * Hardcoding the email field name
                  */
                 $fh['email_box'] = 'email';
                 foreach ($fields as $field) {
                     $fieldname = '';
                     if (isset($fh[$field . '_box']) && !empty($fh[$field . '_box'])) {
                         $used_fields[$fh[$field . '_box']] = true;
                         $fieldname = $fh[$field . '_box'];
                     }
                     $data[$field . '_input'] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr(op_get_var($js_defaults, $field)) . '" class="' . $field . '" />';
                 }
                 $extra_fields = op_get_var($fh, 'extra_fields', array());
                 $field_names = op_get_var($extra_fields, 'field_name', array());
                 $field_titles = op_get_var($extra_fields, 'title', array());
                 $field_text = op_get_var($extra_fields, 'text', array());
                 for ($i = 0, $il = count($field_names); $i < $il; $i++) {
                     $fieldname = $field_names[$i];
                     if ($field_names[$i] == '' || $field_names[$i] == 'op_add_new_field') {
                         $fieldname = $field_titles[$i];
                     }
                     $data['extra_fields'][] = '<input type="text" name="' . op_attr($fieldname) . '" value="' . getOptinUrlValue($fieldname) . '" placeholder="' . op_attr($field_text[$i]) . '" />';
                     $used_fields[$fieldname] = true;
                 }
                 $data['hidden_elems'] = $hidden_elems;
                 $data['hidden_elems'] = '<input type="hidden" name="provider" value="' . op_get_var($fh, 'integration_type') . '" />';
                 $data['hidden_elems'] .= '<input type="hidden" name="redirect_url" value="' . op_get_var($fh, 'thank_you_page', op_current_url()) . '" />';
                 $data['hidden_elems'] .= '<input type="hidden" name="list" value="' . op_get_var($fh, 'list') . '" />';
                 break;
         }
         if (op_get_var($fh, 'gotowebinar')) {
             $data['hidden_elems'] .= '<input type="hidden" name="gotowebinar" value="' . op_get_var($fh, 'gotowebinar') . '" />';
         }
     }
     $tpl = '';
     $out = '';
     $data['content'] = array();
     if (!isset($disable['content'])) {
         $fields = $this->_get_fields($config);
         $data['content'] = op_mod('content_fields')->output(array($section_name, 'content'), array('fields' => $fields), op_get_var($op, 'content', array()));
     }
     $btnconf = op_get_var($config, 'submit_button_config', array());
     if (isset($op['submit_button'])) {
         $btnop = $op['submit_button'];
     } else {
         $btnop = array();
         if (!isset($btnconf['type'])) {
             $btnop['type'] = 0;
         }
         if (isset($btnconf['defaults']) && isset($btnconf['defaults']['content'])) {
             $btnop['content'] = $btnconf['defaults']['content'];
         }
     }
     if (is_array($btnop)) {
         $data['submit_button'] = op_mod('submit_button')->save_settings(array($section_name, 'submit_button'), $btnconf, $btnop, true);
     } else {
         $data['submit_button'] = $btnop;
     }
     if (!isset($disable['color_scheme'])) {
         $styles = $this->_get_color_schemes($section_name, $config);
         if (count($styles) > 0) {
             $tpl = 'output';
             $style = op_get_current_item($styles, op_get_var($op, 'color_scheme'));
             if (isset($styles[$style]['output'])) {
                 $tpl = $styles[$style]['output'];
             }
             $data['color_scheme'] = $style;
         }
     }
     if (isset($config['template'])) {
         $tpl = $config['template'];
     }
     if (!empty($tpl)) {
         $out = $this->load_tpl('output/' . $tpl, $data);
     }
     if (!empty($out)) {
         if ($return) {
             return $out;
         }
         echo $out;
         return true;
     } else {
         return $data;
     }
 }
Exemple #22
0
function op_font_style_str($vars, $prefix = 'font_')
{
    $font = '';
    $font_vars = array('size', 'font', 'style', 'color', 'spacing', 'shadow');
    foreach ($font_vars as $f) {
        $var = op_get_var($vars, $prefix . $f);
        $font .= op_css_font_str($f, $var);
    }
    return $font;
}
 function output($section_name, $config, $options, $return = false)
 {
     if (!($content_fields = $this->_check_fields($config))) {
         return false;
     }
     $content_fields = $this->_prep_fields($content_fields);
     $content = array();
     foreach ($content_fields as $field => $field_options) {
         $content[$field] = op_get_var($options, $field, op_get_var($field_options, 'default'));
     }
     return $content;
 }
Exemple #24
0
 function is_enabled($section_name)
 {
     $id = $this->get_fieldid($section_name);
     if (isset($this->_enabled_sections[$id])) {
         return $this->_enabled_sections[$id];
     }
     if (!is_array($section_name)) {
         $section_name = array($section_name);
     }
     $config = array();
     $op = array();
     $enabled = false;
     if ($section_config = op_section_config($section_name[0])) {
         $config = op_get_var($section_config, 'options', array());
         $enabled = true;
         if (!(isset($section_config['on_off']) && $section_config['on_off'] === false)) {
             $enabled = false;
             if ($this->get_option($section_name[0], 'enabled') == 'Y') {
                 $enabled = true;
             }
         }
         if (!($op = $this->get_option($section_name))) {
             $op = array();
             $enabled = false;
         }
         if (!is_array($config)) {
             $config = array();
         }
     }
     $this->_enabled_sections[$id] = $enabled;
     $this->_configs[$id] = $config;
     $this->_options[$id] = $op;
     return $enabled;
 }
 function content_fields($fields, $values)
 {
     $fonts = array();
     if (isset($values[0])) {
         $fonts = $values[1];
         $values = $values[0];
     }
     $html = '';
     $fields = $fields['fields'];
     foreach ($fields as $name => $settings) {
         $font_str = op_font_style_str(op_get_var($fonts, $name, array()));
         if ($font_str != '') {
             $font_str = ' style=\'' . $font_str . '\'';
         }
         $value = op_get_var($values, $name);
         $type = op_get_var($settings, 'type');
         if ($type == 'textarea' || $type == 'wysiwyg') {
             $GLOBALS['OP_LIVEEDITOR_FONT_STR'] = array('elements' => array('p', 'a'), 'style_str' => $font_str);
             $value = do_shortcode(wpautop($value));
             $value = op_process_asset_content($value);
         } elseif ($type == 'image') {
             $value = '<img src="' . $value . '" alt="" />';
         }
         $values[$name] = $value;
         if (empty($value)) {
             continue;
         }
         if ($name == 'title') {
             $el1 = op_get_var($settings, 'element', 'h2');
             $value = '<' . $el1 . $font_str . '>' . $value . '</' . $el1 . '>';
         } elseif ($name == 'subtitle') {
             $el2 = op_get_var($settings, 'element', 'h3');
             $value = '<' . $el2 . $font_str . '>' . $value . '</' . $el2 . '>';
         } elseif ($name == 'link_url') {
             $value = '';
         } elseif ($name == 'submit_button') {
             $value = '<a class="button-style-2 button-style-2-orange button-style-2-large" href="' . $values['link_url'] . '"><span>' . $value . '</span></a>';
         } elseif ($name == 'image' && $type != 'image') {
             $value = '<img src="' . $value . '" alt="" />';
         }
         if (isset($settings['wrap'])) {
             $html .= sprintf($settings['wrap'], $value);
         } else {
             $html .= $value;
         }
     }
     return $html;
 }
Exemple #26
0
 function gateway_key()
 {
     $gateway_override = op_page_option('launch_funnel', 'gateway_override');
     $found = false;
     if (op_get_var($gateway_override, 'enabled') == 'Y') {
         if (($key = op_get_var($gateway_override, 'code')) && $key != '') {
             $this->custom_key = $key;
             $this->use_custom = true;
             $found = true;
         }
         if (($url = op_get_var($gateway_override, 'redirect')) && $url != '') {
             $this->custom_redirect = $url;
         }
     }
     if (!$found) {
         $gateway_key = op_launch_option('gateway_key');
         if (op_get_var($gateway_key, 'enabled', 'N') == 'Y') {
             $this->gateway_key = $gateway_key['key'];
         }
     }
 }
Exemple #27
0
 $help = $cur_action = $cur_module = '';
 $module_type = 'blog';
 $on_off = $no_content = false;
 $options = array();
 if (is_array($section)) {
     if (isset($section['action'])) {
         $cur_action = $section['action'];
     }
     if (isset($section['help'])) {
         $help = $section['help'];
     }
     $on_off = op_get_var($section, 'on_off', true);
     $no_content = op_get_var($section, 'no_content', false);
     if (isset($section['module'])) {
         $cur_module = $section['module'];
         $options = op_get_var($section, 'options', $options);
         if (isset($section['module_type'])) {
             $module_type = $section['module_type'];
         }
     }
 } else {
     $cur_action = $section;
 }
 if ($cur_action == '' && $cur_module == '') {
     $no_content = true;
 }
 $class = $name;
 if (op_has_group_error($section_type . '_' . $name)) {
     $class .= ' has-error';
     op_section_error($section_type);
 }
Exemple #28
0
function op_font_options_str($title, $fieldname, $values = array())
{
    static $field_count = 0;
    $fieldid = str_replace(array('[]', '][', '[', ']'), array('_' . $field_count, '_', '_', ''), $fieldname) . '_';
    $field_count++;
    return '
		<div class="feature-area-font-dropdown">
			<label class="form-title" for="' . $fieldid . 'font">' . $title . '</label>
			<div class="font-chooser cf">
				' . op_font_size_dropdown($fieldname . '[font_size]', op_get_var($values, 'font_size'), $fieldid . 'size') . op_font_dropdown($fieldname . '[font_font]', op_get_var($values, 'font_font'), $fieldid . 'family') . op_font_style_dropdown($fieldname . '[font_style]', op_get_var($values, 'font_style'), $fieldid . 'style') . op_color_picker($fieldname . '[font_color]', op_get_var($values, 'font_color'), $fieldid . 'color', false, true) . '
				<a href="#reset" class="reset-link">Reset</a>
			</div>
		</div>
	';
}
Exemple #29
0
	<a href="#" class="optin-modal-link"><?php 
echo $trigger_button;
?>
</a>
	
	<div id="<?php 
echo $id;
?>
" class="optin-box optin-box-15 optin-modal"<?php 
echo $style_str;
?>
>
	<?php 
$headline = op_get_var($content, 'headline', '', '<h2>%1$s</h2>');
echo !empty($headline) ? $headline : '';
$paragraph = op_get_var($content, 'paragraph', '');
echo !empty($paragraph) ? '<p class="description">' . strip_tags($paragraph) . '</p>' : '';
echo $form_open . $hidden_str;
op_get_var_e($fields, 'email_field');
echo implode('', $extra_fields);
?>
		<a href="#" class="css-button-block css-button style-1">
		    <span class="text"><?php 
echo $button_content;
?>
</span>
		    <div class="shine"></div>
		    <div class="hover"></div>
		    <div class="active"></div>
		</a>
	</form>
Exemple #30
0
 function output($section_name, $config, $options, $return = false)
 {
     $styles = $this->_get_styles($section_name, $config);
     $type = op_get_var($options, 'type');
     $before = op_get_var($config, 'before');
     $after = op_get_var($config, 'after');
     if (!empty($type) && isset($styles[$type]) && isset($options[$type])) {
         $style = $styles[$type];
         if (isset($style['config'])) {
             extract($style['config']);
         }
         $options = $options[$type];
         $content_done = $button_done = false;
         $content_options = array();
         array_push($section_name, $type);
         $feature_content = array();
         $used_content = $used_button = '';
         foreach ($style['options'] as $option_name => $option) {
             $tmp_content = '';
             if (isset($option['display_action'])) {
                 $tmp_content = call_user_func_array($option['display_action'], array($section_name, $config));
             } elseif (isset($option['module'])) {
                 $mod_config = op_get_var($option, 'mod_options', array());
                 $mod_options = op_get_var($options, $option_name, array());
                 if (isset($option['use_content']) && isset($style['options'][$option['use_content']])) {
                     $used_content = $option['use_content'];
                     $content_config = op_get_var($style['options'][$option['use_content']], 'mod_options', array());
                     $content_opts = op_get_var($options, $option['use_content'], array());
                     $content_options = op_mod('content_fields')->output(array($section_name, $option['use_content']), $content_config, $content_opts, true);
                     $mod_config['content_fields'] = op_get_var($content_config, 'fields', array());
                     if (isset($mod_config['disable'])) {
                         $mod_config['disable'] = str_replace('content', '', $mod_config['disable']);
                     }
                     $content_done = true;
                     $mod_options['content'] = $content_options;
                 }
                 if (isset($option['use_button']) && isset($style['options'][$option['use_button']])) {
                     $used_button = $option['use_button'];
                     $button_opts = op_get_var($options, $used_button, array());
                     $button_done = true;
                     $mod_options['submit_button'] = op_mod('submit_button')->output(array($section_name, $used_button), array(), $button_opts, true);
                 }
                 if (!($option_name == $used_content && $content_done === true) && !($option_name == $used_button && $button_done === true)) {
                     $tmp_content = op_mod($option['module'])->output(array($section_name, $option_name), $mod_config, $mod_options, true);
                     $content = '';
                     if (is_array($tmp_content)) {
                         if (count($tmp_content) > 0) {
                             if ($option['module'] == 'content_fields') {
                                 $tmp_content = array('content' => $tmp_content);
                             }
                             if (isset($option['template'])) {
                                 if (is_array($option['template'])) {
                                     if (is_object($option['template'][0])) {
                                         if (is_callable($option['template'])) {
                                             $content = call_user_func_array($option['template'], array($tmp_content));
                                         }
                                     } else {
                                         $content = op_tpl($option['template'][0], $tmp_content, $option['template'][1]);
                                     }
                                 } else {
                                     if (is_callable($option['template'])) {
                                         $content = call_user_func_array($option['template'], array($tmp_content));
                                     } else {
                                         $content = $this->load_tpl('output/' . $option['template'], $tmp_content);
                                     }
                                 }
                             } else {
                                 $content = $this->load_tpl('output/' . $option['module'], $tmp_content);
                             }
                         }
                     } else {
                         $content = $tmp_content;
                     }
                     $feature_content[] = $content;
                 }
             }
         }
         $out = $before . implode('', $feature_content) . $after;
         if ($return) {
             return $out;
         }
         echo $out;
     }
 }