function print_scripts() { wp_enqueue_style(OP_SN . '-admin-assets', OP_CSS . 'assets' . OP_SCRIPT_DEBUG . '.css', array(OP_SN . '-admin-common', OP_SN . '-fancybox'), OP_VERSION); wp_enqueue_script(OP_SN . '-base64', OP_JS . 'jquery/jquery.basesixtyfour.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION); wp_enqueue_script(OP_SN . '-asset-browser', OP_JS . 'assets/dialog' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js', OP_SN . '-admin-common', OP_SN . '-base64', OP_SN . '-fancybox'), OP_VERSION, 1); // Fancybox for images $fancybox_images = op_default_option('fancybox_images'); if (is_array($fancybox_images) && $fancybox_images['enabled'] === 'Y') { wp_enqueue_script(OP_SN . '-fancybox-images', OP_JS . 'fancybox_images' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js', OP_SN . '-fancybox'), OP_VERSION, true); } wp_enqueue_script('jquery-ui-slider', false, array(OP_SN . '-noconflict-js'), OP_VERSION); }
function display($section_name = '', $return = false, $add_to_config = array()) { $promotion = op_default_option('promotion'); if ($this->get_option('promotion', 'enabled') == 'Y' && ($url = $this->get_option('promotion', 'aff_url')) && !empty($url)) { echo '<p class="op-promote"><a href="' . $url . '" target="_blank">' . __('Powered by OptimizePress 2.0', OP_SN) . '</a></p>'; } else { $promotion = op_default_option('promotion'); if (isset($promotion['enabled']) && $promotion['enabled'] == 'Y' && ($url = $promotion['aff_url']) && !empty($url)) { echo '<p class="op-promote"><a href="' . $url . '" target="_blank">' . __('Powered by OptimizePress 2.0', OP_SN) . '</a></p>'; } } }
function save_color_scheme($op) { if (isset($op['color_scheme'])) { op_update_option('color_scheme', $op['color_scheme']); } $current = op_default_option('color_scheme_fields'); $current = is_array($current) ? $current : array(); $fields = isset($op['color_scheme_fields']) ? $op['color_scheme_fields'] : array(); $color_fields = $this->color_fields(); if (count($color_fields) > 0) { foreach ($color_fields as $name => $title) { if (isset($fields[$name])) { $current[$name] = $fields[$name]; } } } op_update_option('color_scheme_fields', $current); }
function save_header_prefs($op) { //First we process and save the top nav color scheme fields $current = op_default_option('color_scheme_fields'); $current = is_array($current) ? $current : array(); $fields = isset($op['color_scheme_fields']) ? $op['color_scheme_fields'] : array(); /*$color_fields = $this->color_fields(); if(count($color_fields) > 0){ foreach($color_fields as $name => $title){ if(isset($fields[$name])){ $current[$name] = $fields[$name]; } } }*/ foreach ($fields as $name => $field) { $current[$name] = $field; } op_update_option('color_scheme_fields', $current); //Now we process and save the original header prefs $op = isset($op['header_prefs']) ? $op['header_prefs'] : array(); $header_prefs = op_get_option('header_prefs'); $header_prefs = is_array($header_prefs) ? $header_prefs : array(); foreach ($op as $key => $val) { $header_prefs[$key] = $val; } if (isset($op['menu_position'])) { $header_prefs['menu-position'] = $op['menu_position']; } if (isset($op['link_color'])) { $header_prefs['link_color'] = $op['link_color']; } $header_prefs['color_dropdowns'] = 'N'; if (isset($op['color_dropdowns']) && $op['color_dropdowns'] == 'Y') { $header_prefs['color_dropdowns'] = 'Y'; } op_update_option('header_prefs', $header_prefs); }
<?php $footer_area = op_page_option('footer_area'); $footer_defaults = op_default_option('site_footer'); ?> <div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf" id="op_page_layout_footer_area"> <label for="op_footer_area_nav" class="form-title"><?php _e('Footer Navigation', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('Select a source for the menu to be assigned to the footer links (next to the copyright message). Select none to show no menu', OP_SN); ?> </p> <select id="op_footer_area_nav" name="op[footer_area][nav]"><option value=""><?php _e('None', OP_SN); ?> </option> <?php $cur = !empty($footer_area['nav']) ? $footer_area['nav'] : $footer_defaults['nav']; foreach ($nav_menus as $nav) { echo '<option value="' . $nav->term_id . '"' . ($cur == $nav->term_id ? ' selected="selected"' : '') . '>' . $nav->name . '</option>'; } ?> </select> <label for="op_footer_area_font" class="form-title"><?php _e('Select Navigation Bar Font (optional)', OP_SN); ?> </label>
function op_register_scripts() { // AKISMET 3.0 and higher fix... we are deregistering their comment_form script in framework, and returning it here // under a different handle if (defined('AKISMET_VERSION') && version_compare(AKISMET_VERSION, '3.0.0') >= 0) { wp_register_script('akismet-form-2', AKISMET__PLUGIN_URL . '_inc/form.js', array(OP_SN . '-noconflict-js'), AKISMET_VERSION); wp_enqueue_script('akismet-form-2'); } //If jQuery version is higher than 1.9 we require jQuery migrate plugin (which is by default registered in WP versions that come with jQuery 1.9 or higher) if (wp_script_is('jquery-migrate', 'registered')) { wp_enqueue_script(OP_SN . '-noconflict-js', OP_JS . 'jquery/jquery.noconflict' . OP_SCRIPT_DEBUG . '.js', array('jquery', 'jquery-migrate'), OP_VERSION); } else { wp_enqueue_script(OP_SN . '-noconflict-js', OP_JS . 'jquery/jquery.noconflict' . OP_SCRIPT_DEBUG . '.js', array('jquery'), OP_VERSION); } wp_enqueue_script(OP_SN . '-loadScript', OP_JS . 'jquery/jquery.loadScript' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION); wp_register_script(OP_SN . '-backstretch', OP_JS . 'jquery/jquery.backstretch' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION); wp_enqueue_script(OP_SN . '-placeholder', OP_JS . 'jquery/jquery.placeholder.min.js', array(OP_SN . '-noconflict-js'), OP_VERSION, true); wp_enqueue_script(OP_SN . '-fancybox', OP_JS . 'fancybox/jquery.fancybox.pack' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js'), OP_VERSION, true); wp_register_script(OP_SN . '-fancybox-op', OP_JS . 'fancybox/helpers/jquery.fancybox-op' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js', OP_SN . '-fancybox'), OP_VERSION); // Fancybox for images $fancybox_images = op_default_option('fancybox_images'); if (is_array($fancybox_images) && $fancybox_images['enabled'] === 'Y') { wp_enqueue_script(OP_SN . '-fancybox-images', OP_JS . 'fancybox_images' . OP_SCRIPT_DEBUG . '.js', array(OP_SN . '-noconflict-js', OP_SN . '-fancybox'), OP_VERSION, true); } }
?> <div class="clear"></div> <!-- <div class="op-hr"><hr /></div> --> <label for="op_sections_blog_header_bgimg" class="form-title"><?php _e('Upload a Banner Image', 'optimizepress'); ?> </label> <p class="op-micro-copy"><?php _e('Recommended if you don\'t have a logo. Upload a header image up to 975px in width with any graphics on it, and we\'ll throw that on instead.', 'optimizepress'); ?> </p> <?php op_upload_field('op[sections][blog_header][bgimg]', op_default_option('blog_header', 'bgimg')); ?> <label for="op_sections_blog_header_repeatbgimg" class="form-title"><?php _e('Upload Repeating Header Background Image', 'optimizepress'); ?> </label> <p class="op-micro-copy"><?php _e('This would normally be a gradient. Upload a repeating header background image which will be tiled horizontally on your header. We recommend you use a gradient of your choice which is 1px by 250px or the same height as the banner image above if you have uploaded one', 'optimizepress'); ?> </p> <?php op_upload_field('op[sections][blog_header][repeatbgimg]', $repeatbgimg); ?> <label><?php
function get_disabled_filters() { if (null === $this->_disabled_filters) { $filters = op_default_option('advanced_filter'); $disabled = array(); if (!empty($filters)) { foreach ($filters as $key => $filter) { if ($filter === '1') { $disabled[] = $key; } } } $this->_disabled_filters = $disabled; } return $this->_disabled_filters; }
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf"> <?php if ($error = $this->error('op_sections_site_footer')) { ?> <span class="error"><?php echo $error; ?> </span> <?php } ?> <label for="op_sections_social_integration_facebook_app_id" class="form-title"><?php _e('Facebook App ID', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('If you would like to integrate Facebook services with your website, please enter your Facebook APP ID below. Follow our guide to setting up a Facebook APP ID ', OP_SN); ?> <a target="_blank" href="https://optimizepress.zendesk.com/hc/en-us/articles/200874728-Setup-Facebook-Comments-Facebook-App-ID"><?php _e('here', OP_SN); ?> </a></p> <?php op_text_field('op[sections][social_integration][facebook_app_id]', op_default_option('social_integration', 'facebook_app_id')); ?> <div class="clear"></div> </div>
?> </span> <?php } ?> <label for="op_sections_site_footer_copright" class="form-title"><?php _e('Copyright Information', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('Copyright information will show on all pages in the footer, when the footer is activated.', OP_SN); ?> </p> <?php op_text_field('op[sections][site_footer][copyright]', op_default_option('site_footer', 'copyright')); ?> <div class="clear"></div> <label for="op_sections_site_footer_disclaimer" class="form-title"><?php _e('Disclaimer', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('Disclaimer will show on all pages in the footer, when the footer is activated.', OP_SN); ?> </p> <?php op_text_area('op[sections][site_footer][disclaimer]', stripslashes(op_default_option('site_footer', 'disclaimer'))); ?> </div>
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar"> <label class="form-title" for="op_sections_promotion_settings_affiliate_url"><?php _e('Affiliate URL'); ?> </label> <p class="op-micro-copy"><?php _e('Enter your OptimizePress affiliate URL here. This will link to the "Powered by OptimizePress " message in the footer. To promote OptimizePress join at <a target="_blank" href="http://www.optimizepress.com/affiliates">http://www.optimizepress.com/affiliates</a>. Leave blank to remove "Powered by..." message.', 'optimizepress'); ?> <?php op_text_field('op[sections][promotion_settings][affiliate_url]', op_default_option('promotion_settings', 'affiliate_url')); ?> </div>
$opt_array = array('default_typography', 'color_elements', $element); $page_opt_array = array('typography', 'color_elements', $element); $page_opts = op_default_page_option($page_opt_array); if (is_array($page_opts)) { $color = $page_opts['color']; $decoration = $page_opts['text_decoration']; } else { $color = $page_opts; $decoration = ''; } $color_test = str_replace('#', '', $color); if (empty($color_test)) { $color = op_default_option($opt_array, 'color'); } if (!empty($decoration)) { $decoration = op_default_option($opt_array, 'decoration'); op_color_picker($tmp_field . '[color]', $color, $tmp_id . '_color'); op_text_decoration_drop($tmp_field . '[text_decoration]', $decoration, $tmp_id . '_text_decoration'); } else { op_color_picker($tmp_field, $color, $tmp_id); } ?> <a href="#reset" class="reset-link">Reset</a> </div> </li> <?php } ?> </ul> <?php
function theme1_output_css($css = '') { $op_fonts = new OptimizePress_Fonts(); if (($start = op_get_option('color_scheme_fields', 'start')) && ($end = op_get_option('color_scheme_fields', 'end'))) { $css .= ' .featured-panel { background: ' . $end . '; background: -moz-linear-gradient(top, ' . $start . ' 0%, ' . $end . ' 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $start . '), color-stop(100%,' . $end . ')); background: -webkit-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: -o-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: -ms-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%)); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'' . $start . '\', endColorstr=\'' . $end . '\',GradientType=0 ); } .op-page-header{ background: ' . $end . '; background: -moz-linear-gradient(top, ' . $start . ' 0%, ' . $end . ' 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,' . $start . '), color-stop(100%,' . $end . ')); background: -webkit-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: -o-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: -ms-linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%); background: linear-gradient(top, ' . $start . ' 0%,' . $end . ' 100%)); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=\'' . $start . '\', endColorstr=\'' . $end . '\',GradientType=0 ); }'; } if ($top_nav_font = op_get_option('color_scheme_fields', 'top_nav_font')) { $op_fonts->add_font($top_nav_font['font_family']); $nav_weight = ''; if ($top_nav_font['font_weight'] == '300') { $nav_weight = 'font-weight: 300;'; } elseif ($top_nav_font['font_weight'] == 'italic') { $nav_weight = 'font-style: italic;'; } elseif (strtolower($top_nav_font['font_weight']) == 'bold italic') { $nav_weight = 'font-weight: bold; font-style: italic;'; } elseif (strtolower($top_nav_font['font_weight']) == 'normal') { $nav_weight = 'font-weight: normal;'; } elseif (strtolower($top_nav_font['font_weight']) == 'bold') { $nav_weight = 'font-weight: bold;'; } $nav_shadow = ''; switch (strtolower(str_replace(' ', '', $top_nav_font['font_shadow']))) { case 'light': $nav_shadow = 'text-shadow: 1px 1px 0px rgba(255,255,255,0.5);'; break; case 'dark': $nav_shadow = 'text-shadow: 0 1px 1px #000000, 0 1px 1px rgba(0, 0, 0, 0.5);'; break; case 'textshadow': case 'none': default: $nav_shadow = 'text-shadow: none;'; } $css .= ' body #nav-top.navigation,body #nav-top.navigation ul li a {'; if (!empty($top_nav_font['font_family'])) { $css .= ' font-family: ' . op_font_str($top_nav_font['font_family']) . ';'; } if (!empty($top_nav_font['font_size'])) { $css .= ' font-size: ' . $top_nav_font['font_size'] . 'px;'; } $css .= $nav_shadow . $nav_weight; $css .= '}'; } if ($top_nav = op_get_option('color_scheme_fields', 'top_nav_color')) { $css .= ' body #nav-top.navigation,body #nav-top.navigation ul ul li { background-color: ' . $top_nav . ' }'; } if ($link_color = op_get_option('color_scheme_fields', 'link_color')) { $css .= ' body #nav-top.navigation ul#navigation-above li a{ color: ' . $link_color . ' }'; } if ($top_nav_hover_link = op_get_option('color_scheme_fields', 'top_nav_hover_link')) { $css .= ' body #nav-top.navigation ul#navigation-above li:hover a{ color: ' . $top_nav_hover_link . ' }'; } if ($top_nav_dd = op_get_option('color_scheme_fields', 'top_nav_dd')) { $css .= ' body #nav-top.navigation ul#navigation-above li ul.sub-menu a { background-color: ' . $top_nav_dd . ' }'; } if ($top_nav_dd_hover = op_get_option('color_scheme_fields', 'top_nav_dd_hover')) { $css .= ' body #nav-top.navigation ul#navigation-above li ul.sub-menu li:hover a { background-color: ' . $top_nav_dd_hover . ' }'; } if ($top_nav_dd_link = op_get_option('color_scheme_fields', 'top_nav_dd_link')) { $css .= ' body #nav-top.navigation ul#navigation-above li ul.sub-menu li a { color: ' . $top_nav_dd_link . ' }'; } if ($top_nav_dd_hover_link = op_get_option('color_scheme_fields', 'top_nav_dd_hover_link')) { $css .= ' body #nav-top.navigation ul#navigation-above li ul.sub-menu li:hover a { color: ' . $top_nav_dd_hover_link . ' }'; } if ($headline = op_get_option('color_scheme_fields', 'headline_title')) { $css .= ' .op-page-header h2,.op-page-header h2 a, .op-page-header h2 span { color: ' . $headline . ' }'; } if ($layouts = op_theme_config('header_prefs', 'menu-positions')) { $cur_layout = op_get_current_item($layouts, op_default_option('header_prefs', 'menu-position')); $layout = $layouts[$cur_layout]; if (isset($layout['link_color']) && $layout['link_color'] === true) { if ($link_color = op_get_option('header_prefs', 'link_color')) { $css .= ' ' . $layout[op_default_option('header_prefs', 'color_dropdowns') == 'Y' ? 'dropdown_selector' : 'link_selector'] . ' { color: ' . $link_color . ' }'; } } } $widths = theme1_column_widths(); if (isset($widths['main-sidebar']) && $widths['main-sidebar'] != 309) { $css .= ' .main-content .main-sidebar, .main-content .sidebar-bg { width:' . $widths['main-sidebar'] . 'px }' . (isset($widths['main-content']) ? ' .main-content-area { width:' . $widths['main-content'] . 'px }' : ''); } if (($cols = op_get_option('footer_prefs', 'value')) && ($widths = op_get_option('footer_prefs', 'widths'))) { if ($cols > 1) { $cols = $cols > 4 ? 4 : $cols; $cols++; for ($i = 1; $i < $cols; $i++) { $int = intval(op_get_var($widths, $i, 0)); if ($int > 0) { $css .= ' .sub-footer .col:nth-child(' . $i . '){width:' . $int . 'px}'; } } } else { $css .= ' .sub-footer .col{width:' . op_theme_config('footer_prefs', 'full_width') . 'px;margin-right:0}'; } } return $css; }
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf"> <label for="op_favicon" class="form-title"><?php _e('Upload your favicon', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('Favicons should be 16px by 16px and in .ico format. You can easily convert images into .ico format using <a href="http://iconverticons.com/online/" target="_blank">http://iconverticons.com/online/</a>.', OP_SN); ?> </p> <?php op_upload_field('op[sections][favicon]', op_default_option('favicon')); ?> <div class="clear"></div> </div>
<?php op_color_picker('op[sections][color_scheme_fields][top_nav_dd_hover_link]', op_default_option('color_scheme_fields', 'top_nav_dd_hover_link'), 'op_sections_color_scheme_fields_top_nav_dd_hover_link'); ?> <br style="clear: left;" /> <label for="op_sections_color_scheme_fields_top_nav_dd" class="form-title"><?php _e('Dropdown Background', OP_SN); ?> </label> <p class="op-micro-copy">Choose the colour for your dropdown menu background.</p> <?php op_color_picker('op[sections][color_scheme_fields][top_nav_dd]', op_default_option('color_scheme_fields', 'top_nav_dd'), 'op_sections_color_scheme_fields_top_nav_dd'); ?> <br style="clear: left;" /> <label for="op_sections_color_scheme_field_top_nav_dd_hover" class="form-title"><?php _e('Dropdown Background Hover', OP_SN); ?> </label> <p class="micro-copy">Choose the background colour for the hover state of child pages in your navigation bar</p> <?php op_color_picker('op[sections][color_scheme_fields][top_nav_dd_hover]', op_default_option('color_scheme_fields', 'top_nav_dd_hover'), 'op_sections_color_scheme_fields_top_nav_dd_hover'); ?> </div> </div> </div> <?php if (count($js) > 0) { echo ' <script type="text/javascript"> var op_menu_link_colors = ' . json_encode($js) . '; </script>'; }
_e('Select a default source for the menu to be assigned to the footer links (next to the copyright message). Select none to show no menu', OP_SN); ?> </p> <select id="op_sections_site_footer_nav" name="op[sections][site_footer][nav]"><option value=""><?php _e('None', OP_SN); ?> </option> <?php $cur = $footer_area['nav']; foreach (wp_get_nav_menus() as $nav) { echo '<option value="' . $nav->term_id . '"' . ($cur == $nav->term_id ? ' selected="selected"' : '') . '>' . $nav->name . '</option>'; } ?> </select> <label for="op_sections_site_footer_font" class="form-title"><?php _e('Select Navigation Bar Font (optional)', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('If you would like to change the default font for this navigation menu, you may change these settings below. We recommend using a menu with no more than five items on it.', OP_SN); ?> </p> <?php $font_family = !empty($footer_area['font_family']) ? $footer_area['font_family'] : op_default_option($footer_area, 'font_family'); $font_weight = !empty($footer_area['font_weight']) ? $footer_area['font_weight'] : op_default_option($footer_area, 'font_weight'); $font_size = !empty($footer_area['font_size']) ? $footer_area['font_size'] : op_default_option($footer_area, 'font_size'); $font_shadow = !empty($footer_area['font_shadow']) ? $footer_area['font_shadow'] : op_default_option($footer_area, 'font_shadow'); op_font_selector('op[sections][site_footer]', array('family' => $font_family, 'style' => $font_weight, 'size' => $font_size, 'shadow' => $font_shadow), '<div class="op-micro-copy-font-selector">', '</div>', false); ?> </div>
function set_typography_defaults() { //Get the header preferences $default_typography = op_default_option('default_typography'); if (!empty($default_typography)) { //Loop through each of them and set the defaults if not set foreach ($default_typography['font_elements'] as $key => $cat) { foreach ($cat as $key2 => $pref) { //Check to see if this value is empty so we can set the default, if needed if (empty($pref)) { //Explode the key so we can see which setting this is for $key2_array = explode('_', $key2); //Get the setting by seeing what is the last index of the array $setting = end($key2_array); //Check the last index in the array to see which setting this is for switch ($setting) { case 'font': $default_typography['font_elements'][$key][$key2] = 'Source Sans Pro, sans-serif'; break; case 'size': if ($key == 'default') { $default_typography['font_elements'][$key][$key2] = 15; } break; /*case 'style': $default_typography['font_elements'][$key][$key2] = OP_FONT_STYLE; break; case 'spacing': $default_typography['font_elements'][$key][$key2] = OP_FONT_SPACING; break; case 'shadow': $default_typography['font_elements'][$key][$key2] = OP_FONT_SHADOW; break;*/ /*case 'style': $default_typography['font_elements'][$key][$key2] = OP_FONT_STYLE; break; case 'spacing': $default_typography['font_elements'][$key][$key2] = OP_FONT_SPACING; break; case 'shadow': $default_typography['font_elements'][$key][$key2] = OP_FONT_SHADOW; break;*/ case 'color': if ($key == 'default') { $default_typography['font_elements'][$key][$key2] = '###4'; } break; } } } } //Update the default typography settings op_update_option('default_typography', $default_typography); } //Also check the footer defaults $site_footer = op_default_option('site_footer'); //Set the default font family but only if it is not currently set $site_footer['font_family'] = !empty($site_footer['font_family']) ? 'Source Sans Pro, sans-serif' : ''; //Update the default footer font settings op_update_option('site_footer', $site_footer); }
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar cf"> <?php if ($error = $this->error('op_sections_social_integration_facebook_app_id')) { ?> <span class="error"><?php echo $error; ?> </span> <?php } ?> <label for="op_sections_facebook_app_id" class="form-title"><?php _e('Facebook App ID', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('If you would like to integrate Facebook services with your website, please enter your Facebook APP ID below. Follow our guide to setting up a Facebook APP ID ', OP_SN); ?> <a target="_blank" href="https://optimizepress.zendesk.com/hc/en-us/articles/200874728-Setup-Facebook-Comments-Facebook-App-ID"><?php _e('here', OP_SN); ?> </a></p> <?php op_text_field('op[sections][facebook_app_id]', op_default_option('comments', 'facebook', 'id')); ?> <div class="clear"></div> </div>
_e('Upload a Banner Image', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('Upload a header image'); ?> </p> <?php op_upload_field('op[sections][header_logo_setup][bgimg]', op_default_option('header_logo_setup', 'bgimg')); ?> <div class="clear"></div> <label for="op_sections_header_logo_setup_repeatbgimg" class="form-title"><?php _e('Upload Repeating Header Image', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('This would normally be a gradient. Upload a repeating header background image which will be tiled horizontally on your header. We recommend you use a gradient of your choice which is 1px by 250px or the same height as the banner image above if you have uploaded one', OP_SN); ?> </p> <?php op_upload_field('op[sections][header_logo_setup][repeatbgimg]', op_default_option('header_logo_setup', 'repeatbgimg')); ?> <label><?php _e('or Choose a header background colour', OP_SN); ?> </label> <?php op_color_picker('op[sections][header_logo_setup][bgcolor]', op_default_attr('header_logo_setup', 'bgcolor'), 'op_header_logo_setup'); ?> </div>
function save_step_4() { $op_fonts = new OptimizePress_Fonts(); $op = $_POST['op']; foreach ($this->sections as $name => $section) { $sections = $section['object']->sections(); foreach ($sections as $section_name => $section_section) { if (is_array($section_section)) { if (isset($section_section['save_action'])) { call_user_func_array($section_section['save_action'], array(op_get_var($op, $section_name, array()))); } if (isset($section_section['module'])) { $mod_ops = op_get_var($op, $section_name, array()); $opts = op_get_var($section_section, 'options', array()); op_mod($section_section['module'], op_get_var($section_section, 'module_type', 'blog'))->save_settings($section_name, $opts, $mod_ops); } } } } //Set this page's typography settings to be that of the defaults $default_typography = op_default_option('default_typography'); if (!empty($default_typography) && isset($default_typography['font_elements'])) { foreach ($default_typography['font_elements'] as $typography) { $op_fonts->add_font($typography['font']); } op_update_page_option('typography', $default_typography); } if (op_has_error()) { $this->error = __('There was a problem processing the form, please review the errors below', OP_SN); } /* else { $this->notification = __('Your page settings have been updated.',OP_SN); }*/ $this->_redirect(); }
?> <li> <label for="<?php echo $tmp_id; ?> size" class="form-title"><?php echo $title; ?> </label> <?php echo empty($help) ? '' : '<p class="op-micro-copy">' . $help . '</p>'; ?> <div class="font-chooser cf"> <?php $opt_array = array('typography', 'color_elements', $element); op_color_picker($tmp_field, op_default_option($opt_array), $tmp_id); ?> <a href="#reset" class="reset-link"><?php _e('Reset', OP_SN); ?> </a> </div> </li> <?php } ?> </ul> <?php } ?>
function op_output_css() { $css = apply_filters('op_output_css', ''); $css = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $css); $css = str_replace(array("\r\n", "\r", "\n", "\t"), '', $css); $css = str_replace(array(' {', ':', ';}'), array('{', ':', '}'), $css); if (!empty($css)) { echo ' <style type="text/css" id="op_header_css"> ' . $css . ' </style>'; } //Echo out custom CSS if entered $custom_css = op_default_option('custom_css'); if (!empty($custom_css)) { echo '<style id="op_custom_css">' . stripslashes($custom_css) . '</style>'; } }
</label> <?php op_text_field('op[sections][flowplayer_license][license_key]', op_default_option('flowplayer_license', 'license_key')); ?> <label for="op_sections_flowplayer_license_js_file" class="form-title"><?php _e('HTML5 commercial version file (JS)', OP_SN); ?> </label> <?php op_upload_field('op[sections][flowplayer_license][js_file]', op_default_option('flowplayer_license', 'js_file')); ?> <label for="op_sections_flowplayer_license_swf_file" class="form-title"><?php _e('Flash commercial version file (SWF)', OP_SN); ?> </label> <?php op_upload_field('op[sections][flowplayer_license][swf_file]', op_default_option('flowplayer_license', 'swf_file')); ?> <label for="op_sections_flowplayer_license_custom_logo" class="form-title"><?php _e('Custom logo', OP_SN); ?> </label> <?php op_upload_field('op[sections][flowplayer_license][custom_logo]', op_default_option('flowplayer_license', 'custom_logo')); ?> <div class="clear"></div> </div>
function op_page_footer() { $op_fonts = new OptimizePress_Fonts(); if (($footer = op_page_option('footer_area')) !== false && op_get_var($footer, 'enabled') == 'Y') { ?> <div class="full-width footer small-footer-text"> <?php if (!(op_page_config('disable', 'layout', 'footer_area', 'large_footer') === true)) { if (isset($footer['large_footer']) && isset($footer['large_footer']['enabled']) && $footer['large_footer']['enabled'] == 'Y') { echo $GLOBALS['op_footer_layout']; } } ?> <div class="row"> <div class="fixed-width"> <?php //Init the style variables $font_family_style = ''; $font_weight_style = ''; $font_size_style = ''; $font_style = ''; //If not empty, set the font family style and add font to system if (!empty($footer['font_family'])) { $op_fonts->add_font($footer['font_family']); $font_family_style .= 'font-family: "' . $footer['font_family'] . '", sans-serif;'; } //If not empty, set the font style if (!empty($footer['font_weight'])) { if (strstr(strtolower($footer['font_weight']), '300')) { $font_weight_style .= 'font-weight: 300;'; } if (strstr(strtolower($footer['font_weight']), 'bold')) { $font_weight_style .= 'font-weight: bold;'; } if (strstr(strtolower($footer['font_weight']), 'italic')) { $font_weight_style .= 'font-style: italic;'; } } //If not empty, set the font size if (!empty($footer['font_size'])) { $font_size_style .= 'font-size: ' . $footer['font_size'] . 'px;'; } //If not empty, set the font shadow if (!empty($footer['font_shadow'])) { $textShadow = ''; switch (strtolower(str_replace(' ', '', $footer['font_shadow']))) { case 'textshadow': case 'none': $textShadow = 'none'; break; case 'light': $textShadow = '1px 1px 0px rgba(255,255,255,0.5)'; break; case 'dark': default: $textShadow = '0 1px 1px #000000, 0 1px 1px rgba(0, 0, 0, 0.5)'; } $font_style .= 'text-shadow: ' . $textShadow . ';'; } //Output the styles to the page echo ' <style> .footer-navigation ul li a, .footer-navigation ul li a:hover{ ' . $font_family_style . $font_size_style . $font_style . $font_weight_style . ' } .footer, .footer p, .op-promote a, .footer .footer-copyright, .footer .footer-disclaimer{ ' . $font_family_style . $font_style . $font_weight_style . ' } .footer p{ ' . $font_size_style . ' } </style> '; //Get the disclaimer text ready $disclaimer = op_get_var($footer, 'footer_disclaimer', array()); $site_footer = op_default_option('site_footer'); $disc = !empty($disclaimer['message']) ? $disclaimer['message'] : $site_footer['disclaimer']; //Print out the disclaimer if it's not empty echo !empty($disc) && $disclaimer['enabled'] == 'Y' ? '<small class="footer-disclaimer">' . stripslashes($disc) . '</small>' : ''; //Echo out the nav if it's set echo !empty($footer['nav']) ? ' <nav class="footer-navigation"> <ul id="nav-footer" class="inline-nav"> ' . wp_nav_menu(array('menu' => $footer['nav'], 'items_wrap' => '%3$s', 'container' => false, 'depth' => 1, 'echo' => false)) . ' </ul> </nav> ' : ''; //Print out the copyright notice //$copy = op_default_option('copyright_notice'); echo !empty($site_footer['copyright']) ? '<p class="footer-copyright">' . $site_footer['copyright'] . '</p>' : ''; //Display any additional information op_mod('promotion')->display(); ?> </div> </div> </div> <?php } }
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar column-layout"> <?php if ($layouts = op_theme_config('layouts')) { $cur_layout = op_get_current_item($layouts['layouts'], op_default_option('column_layout', 'option')); $previews = $js = $widths = $fields = array(); foreach ($layouts['layouts'] as $name => $layout) { $field_id = 'op_sections_column_layout_' . $name; $selected = $cur_layout == $name; $li_class = $input_attr = ''; if ($selected) { $li_class = ' img-radio-selected'; $input_attr = ' checked="checked"'; $fields = op_get_var($layout, 'widths', array()); } $preview = $layout['preview']; $preview['li_class'] = $li_class; $preview['input'] = '<input type="radio" name="op[sections][column_layout][option]" id="' . $field_id . '" value="' . $name . '"' . $input_attr . ' />'; $previews[] = $preview; if (isset($layout['widths'])) { $widths[$name] = $layout['widths']; } } $js['width'] = $layouts['width']; $js['widths'] = $widths; echo $this->load_tpl('generic/img_radio_selector', array('previews' => $previews)); ?> <div class="column-container"> <h3><?php _e('Choose the width of your columns', 'optimizepress'); ?> </h3>
</option> <?php $cur = op_page_option('header_layout', 'nav_bar_alongside', 'nav'); foreach ($nav_menus as $nav) { echo '<option value="' . $nav->term_id . '"' . ($cur == $nav->term_id ? ' selected="selected"' : '') . '>' . $nav->name . '</option>'; } ?> </select> <label for="op_header_layout_nav_bar_alongside_font" class="form-title"><?php _e('Select Navigation Bar Font (optional)', OP_SN); ?> </label> <p class="op-micro-copy"><?php _e('If you would like to change the font for this navigation menu, you may change these settings below.', OP_SN); ?> </p> <div class="op-micro-copy-font-selector"> <?php $font_family = isset($header_layout['nav_bar_alongside']['font_family']) ? $header_layout['nav_bar_alongside']['font_family'] : op_default_option($header_layout['nav_bar_alongside'], 'font_family'); $font_weight = isset($header_layout['nav_bar_alongside']['font_weight']) ? $header_layout['nav_bar_alongside']['font_weight'] : op_default_option($header_layout['nav_bar_alongside'], 'font_weight'); $font_size = isset($header_layout['nav_bar_alongside']['font_size']) ? $header_layout['nav_bar_alongside']['font_size'] : op_default_option($header_layout['nav_bar_alongside'], 'font_size'); $font_shadow = isset($header_layout['nav_bar_alongside']['font_shadow']) ? $header_layout['nav_bar_alongside']['font_shadow'] : op_default_option($header_layout['nav_bar_alongside'], 'font_shadow'); op_font_selector('op[header_layout][nav_bar_alongside]', array('family' => $font_family, 'style' => $font_weight, 'size' => $font_size, 'shadow' => $font_shadow), '<div class="op-micro-copy-font-selector">', '</div>', false); ?> </div> <div class="clear"></div><br/> </div> </div> </div>
function display($output) { $output .= '</p><p class="continue-reading"><a href="' . esc_url(get_permalink()) . '">' . op_default_option('continue_reading', 'link_text') . '</a></p>'; return $output; }
function display($section_name, $return = false, $add_to_config = array()) { $section_name .= '</p><p class="continue-reading"><a href="' . esc_url(get_permalink()) . '">' . op_default_option('continue_reading', 'link_text') . '</a></p>'; return $section_name; }
</p> <?php op_text_area('op[sections][analytics_and_tracking][google_analytics_tracking_code]', stripslashes(op_default_option('analytics_and_tracking', 'google_analytics_tracking_code'))); ?> <div class="clear"></div> <label for="op_sections_analytics_and_tracking_in_body_tag_code" class="form-title"><?php _e('Tracking & Analytics Codes In Body', 'optimizepress'); ?> </label> <p class="op-micro-copy"><?php _e('Enter any tracking or analytics code which need to be placed after the <body> tag.', 'optimizepress'); ?> </p> <?php op_text_area('op[sections][analytics_and_tracking][in_body_tag_code]', stripslashes(op_default_option('analytics_and_tracking', 'in_body_tag_code'))); ?> <div class="clear"></div> <label for="op_sections_analytics_and_tracking_sitewide_tracking_code" class="form-title"><?php _e('Other Tracking Codes', 'optimizepress'); ?> </label> <p class="op-micro-copy"><?php _e('Enter any code here which needs to be placed at the footer of the page code before the </body> tag', 'optimizepress'); ?> </p> <?php op_text_area('op[sections][analytics_and_tracking][sitewide_tracking_code]', stripslashes(op_default_option('analytics_and_tracking', 'sitewide_tracking_code'))); ?> </div>
<div class="sub-footer cf"> <div class="content-width"> <?php dynamic_sidebar('sub-footer-sidebar'); ?> </div> </div> <?php } ?> <div class="footer"> <div class="content-width"> <div class="footer-content cf"> <div class="footer-left"> <?php $copy = op_default_option('copyright_notice'); if (!empty($copy)) { echo '<p>' . $copy . '<br /></p>'; } op_mod('promotion')->display(); ?> </div> <?php has_nav_menu('footer') && wp_nav_menu(array('theme_location' => 'footer', 'depth' => 1)); ?> </div> </div> </div> </div> <?php op_footer();