function _op_on_off_switch($sections, $func = 'op_default_option') { $on = false; if (isset($sections[2]) && is_bool($sections[2])) { $on = $sections[2]; array_splice($sections, 2, -1); } $opts = array('Y' => 'On', 'N' => 'Off'); $str = ''; if (isset($sections[0]) && is_array($sections[0])) { $id = 'op_' . implode('_', $sections[0]); $name = 'op[' . implode('][', $sections[0]) . '][enabled]'; } else { $id = 'op_' . implode('_', $sections); $name = 'op[' . implode('][', $sections) . '][enabled]'; } $sections[] = 'enabled'; $val = call_user_func_array($func, $sections); return _op_on_off_switch_html($name, $id, $val, '', $on); }
<div class="op-bsw-grey-panel op-bsw-grey-panel-no-content"> <div class="op-bsw-grey-panel-header cf"> <h3><?php _e('Publish This Stage', 'optimizepress'); ?> </h3> <div class="op-bsw-panel-controls cf"> <?php _op_on_off_switch_html('op[funnel_pages]' . $field_name . '[publish_stage][publish]' . $field_ext, 'op_funnel_pages_publish_stage_publish_' . $index, op_get_var(op_get_var($config, 'publish_stage', array()), 'publish', 'N'), 'op-disable-ibutton-load'); ?> </div> </div> </div> <p class="op-micro-copy"><?php _e('When this page is set to published the links in the funnel navigation will be live. When page is not published the inactive/coming soon thumbnail and link will be used.', 'optimizepress'); ?> <p class="op-micro-copy"><?php _e('In Perpetual/Evergreen mode you need to set a page to be published in order for it to appear in your funnel (the status will depend on the links you use to your pages)', 'optimizepress');
<div class="op-bsw-panel-controls cf"> <?php _op_on_off_switch_html('op[funnel_pages]' . $field_name . '[page_setup][open_sales_cart]' . $field_ext, 'op_funnel_pages_page_setup_open_sales_cart_' . $index, op_get_var($conf, 'open_sales_cart', 'N')); ?> </div> </div> </div> <div class="op-bsw-grey-panel op-bsw-grey-panel-no-content" id="hide_cart"> <div class="op-bsw-grey-panel-header cf"> <h3><?php _e('Hide Cart Link', OP_SN); ?> </h3> <div class="op-bsw-panel-controls cf"> <?php _op_on_off_switch_html('op[funnel_pages]' . $field_name . '[page_setup][hide_cart]' . $field_ext, 'op_funnel_pages_page_setup_hide_cart_' . $index, op_get_var($conf, 'hide_cart', 'N')); ?> </div> </div> </div> <label class="form-title"><?php _e('Sales Page / Offer Page', 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> <select name="op[funnel_pages]<?php echo $field_name; ?>
</div> </div> </div> <div class="op-bsw-grey-panel section-<?php echo $id; ?> -inset-shadow"> <div class="op-bsw-grey-panel-header cf"> <h3><a href="#"><?php _e('Inner Shadow', OP_SN); ?> </a></h3> <div class="op-bsw-panel-controls cf"> <div class="show-hide-panel"><a href="#"></a></div> <?php _op_on_off_switch_html($fieldname . '[inset_shadow_panel]', 'panel_control_op_assets_submit_button_inset_shadow', 'Y', '', 'Y' == op_get_var($button, 'inset_shadow_panel')); ?> </div> </div> <div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf" id="op_container_content_<?php echo $id; ?> _inset_shadow"> <div class="field-slider field-id-op_assets_submit_button_inset_shadow_vertical_axis_3"> <label><?php _e('Vertical Axis', OP_SN); ?> </label> <?php echo op_slider_picker($fieldname . '[inset_shadow_vertical]', op_get_var($button, 'inset_shadow_vertical', 0), 'op_assets_submit_button_inset_shadow_vertical_axis_3', -50, 50); ?>