Beispiel #1
0
 static function sections()
 {
     static $sections;
     if (!isset($sections)) {
         $sections = array('sharing' => array('title' => __('Sharing', 'optimizepress'), 'module' => 'sharing', 'options' => op_theme_config('mod_options', 'sharing'), 'no_content' => true), 'related_posts' => array('title' => __('Related Posts Box', 'optimizepress'), 'module' => 'related_posts', 'options' => op_theme_config('mod_options', 'related_posts'), 'no_content' => true), 'comments' => array('title' => __('Comments System', 'optimizepress'), 'module' => 'comments', 'options' => op_theme_config('mod_options', 'comments'), 'on_off' => false), 'scripts' => array('title' => __('Other Scripts', 'optimizepress'), 'module' => 'scripts', 'options' => op_theme_config('mod_options', 'scripts'), 'on_off' => false), 'continue_reading' => array('title' => __('Continue Reading Links', 'optimizepress'), 'module' => 'continue_reading', 'options' => op_theme_config('mod_options', 'continue_reading'), 'on_off' => false));
         $sections = apply_filters('op_edit_sections_modules', $sections);
     }
     return $sections;
 }
Beispiel #2
0
 function sections()
 {
     static $sections;
     if (!isset($sections)) {
         $sections = array('header_logo_setup' => array('title' => __('Header & Logo Setup', OP_SN), 'action' => array($this, 'header_logo_setup'), 'save_action' => array($this, 'save_header_logo_setup')), 'favicon_setup' => array('title' => __('Favicon Setup', OP_SN), 'action' => array($this, 'favicon_setup'), 'save_action' => array($this, 'save_favicon_setup')), 'site_footer' => array('title' => __('Site Footer', OP_SN), 'action' => array($this, 'site_footer'), 'save_action' => array($this, 'save_site_footer')), 'seo' => array('title' => __('SEO Options', OP_SN), 'module' => 'seo', 'on_off' => true), 'promotion' => array('title' => __('Promotion Settings', OP_SN), 'module' => 'promotion', 'options' => op_theme_config('mod_options', 'promotion')), 'custom_css' => array('title' => __('Custom CSS (Sitewide)', OP_SN), 'action' => array($this, 'custom_css'), 'save_action' => array($this, 'save_custom_css')), 'typography' => array('title' => __('Typography', OP_SN), 'action' => array($this, 'typography'), 'save_action' => array($this, 'save_typography')), 'api_key' => array('title' => __('API Key', OP_SN), 'action' => array($this, 'api_key'), 'save_action' => array($this, 'save_api_key')), 'advanced_filter' => array('title' => __('Advanced WP Filter Settings', OP_SN), 'action' => array($this, 'advanced_filter'), 'save_action' => array($this, 'save_advanced_filter')), 'external_plugin_compatibility' => array('title' => __('External Plugin Compatibility', OP_SN), 'action' => array($this, 'external_plugin_compatibility'), 'save_action' => array($this, 'save_external_plugin_compatibility')), 'templates_reset' => array('title' => __('Content Templates', OP_SN), 'action' => array($this, 'templates_reset'), 'save_action' => array($this, 'content_templates_reset')), 'flowplayer_license' => array('title' => __('Flowplayer License', OP_SN), 'action' => array($this, 'flowplayer_license'), 'save_action' => array($this, 'save_flowplayer_license')), 'fancybox_images' => array('title' => __('Fancybox for Images', OP_SN), 'module' => 'fancybox_images', 'options' => op_theme_config('mod_options', 'fancybox_images')), 'compatibility_check' => array('title' => __('Compatibility Check', OP_SN), 'action' => array($this, 'compatibility_check')));
         $sections = apply_filters('op_edit_sections_global_settings', $sections);
     }
     return $sections;
 }
Beispiel #3
0
 function sections()
 {
     static $sections;
     if (!isset($sections)) {
         $sections = array('header_logo_setup' => array('title' => __('Header & Logo Setup', OP_SN), 'action' => array($this, 'header_logo_setup'), 'save_action' => array($this, 'save_header_logo_setup')), 'favicon_setup' => array('title' => __('Favicon Setup', OP_SN), 'action' => array($this, 'favicon_setup'), 'save_action' => array($this, 'save_favicon_setup')), 'site_footer' => array('title' => __('Site Footer', OP_SN), 'action' => array($this, 'site_footer'), 'save_action' => array($this, 'save_site_footer')), 'promotion' => array('title' => __('Promotion Settings', OP_T_SN), 'module' => 'promotion', 'options' => op_theme_config('mod_options', 'promotion')), 'custom_css' => array('title' => __('Custom CSS (Sitewide)', OP_SN), 'action' => array($this, 'custom_css'), 'save_action' => array($this, 'save_custom_css')), 'analytics_and_tracking' => array('title' => __('Analytics & Tracking', OP_SN), 'action' => array($this, 'analytics_and_tracking'), 'save_action' => array($this, 'save_analytics_and_tracking')), 'email_marketing_services' => array('title' => __('Email Marketing Services', OP_SN), 'action' => array($this, 'email_marketing_services'), 'save_action' => array($this, 'save_email_marketing_services')), 'social_integration' => array('title' => __('Social Integration', OP_SN), 'action' => array($this, 'social_integration'), 'save_action' => array($this, 'save_social_integration')));
         $sections = apply_filters('op_edit_sections_general', $sections);
     }
     return $sections;
 }
Beispiel #4
0
function op_theme1_modules($sections)
{
    $sections = array_merge(array('home_feature' => array('title' => __('Homepage Feature Area', OP_SN), 'module' => 'feature_area', 'options' => array('before' => '
<div class="featured-panel">
	<div class="content-width cf">', 'after' => '
	</div>
</div>')), 'advertising' => array('title' => __('Advertising', OP_SN), 'module' => 'advertising', 'options' => op_theme_config('mod_options', 'advertising')), 'sidebar_optin' => array('title' => __('Side Bar Optin', OP_SN), 'module' => 'signup_form', 'options' => op_theme_config('mod_options', 'sidebar_optin'))), $sections);
    return $sections;
}
Beispiel #5
0
 function sections()
 {
     static $sections;
     if (!isset($sections)) {
         $sections = array('header_logo_setup' => array('title' => __('Header & Logo Setup', OP_SN), 'action' => array($this, 'header_logo_setup'), 'save_action' => array($this, 'save_header_logo_setup')), 'favicon_setup' => array('title' => __('Favicon Setup', OP_SN), 'action' => array($this, 'favicon_setup'), 'save_action' => array($this, 'save_favicon_setup')), 'site_footer' => array('title' => __('Site Footer', OP_SN), 'action' => array($this, 'site_footer'), 'save_action' => array($this, 'save_site_footer')), 'seo' => array('title' => __('SEO Options', OP_T_SN), 'module' => 'seo', 'on_off' => true), 'promotion' => array('title' => __('Promotion Settings', OP_T_SN), 'module' => 'promotion', 'options' => op_theme_config('mod_options', 'promotion')), 'custom_css' => array('title' => __('Custom CSS (Sitewide)', OP_SN), 'action' => array($this, 'custom_css'), 'save_action' => array($this, 'save_custom_css')), 'typography' => array('title' => __('Typography', OP_SN), 'action' => array($this, 'typography'), 'save_action' => array($this, 'save_typography')), 'api_key' => array('title' => __('API Key', OP_SN), 'action' => array($this, 'api_key'), 'save_action' => array($this, 'save_api_key')), 'advanced_filter' => array('title' => __('Advanced WP Filter Settings', OP_SN), 'action' => array($this, 'advanced_filter'), 'save_action' => array($this, 'save_advanced_filter')));
         $sections = apply_filters('op_edit_sections_global_settings', $sections);
     }
     return $sections;
 }
Beispiel #6
0
 function init_admin()
 {
     $this->tpls = op_theme_config('post_layouts');
     $tpls = array('no-sidebar' => 'no-sidebar.php', 'sidebar-left' => 'left-sidebar.php', 'sidebar-right' => 'right-sidebar.php');
     $this->tpls = apply_filters('op_page_template_options', $tpls);
     if ($this->tpls && count($this->tpls) > 0) {
         add_action(OP_SN . '-post_page-metas', array($this, 'page_template'));
         add_action('pre_post_update', array($this, 'save_page_template'));
     }
     add_action('admin_print_styles', array($this, 'print_scripts'));
     add_action('edit_page_form', array($this, 'build_layout'));
     add_action('edit_form_advanced', array($this, 'build_layout'));
     //add_action('admin_footer', array($this,'iframe_output'));
 }
Beispiel #7
0
        printf(__('Enter the width of your sidebar. Enter a value between %1$s and %2$s or click Default to restore default setting', 'optimizepress'), op_get_var($field, 'min', 230), op_get_var($field, 'max', 400));
        ?>
</p>
		    	<input type="text" name="<?php 
        echo $fieldname . '[' . $name . ']';
        ?>
" id="<?php 
        echo $fieldid . $name;
        ?>
" value="<?php 
        echo op_default_attr('column_layout', 'widths', $name);
        ?>
" />
		    	
                <?php 
        op_default_link($fieldid . $name, op_theme_config($default_arr, $name));
        ?>
                
				<?php 
        if ($error = $this->error('op_sections_column_layout_withs_' . $name)) {
            ?>
                <span class="error"><?php 
            echo $error;
            ?>
</span>
                <?php 
        }
        ?>
			</div>
		<?php 
    }
Beispiel #8
0
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;
}
Beispiel #9
0
<?php

$header_prefs = op_default_option('header_prefs');
$color_scheme = op_default_option('color_scheme_fields');
?>
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar">
	<p class="op-micro-copy"><?php 
printf(__('Choose the layout for your Blog header from the options below.  Remember to create and assign menus to your blog Menus within the %1$sWordpress Menus admin panel%2$s', OP_SN), '<a href="nav-menus.php">', '</a>');
?>
</p>
	<?php 
if ($layouts = op_theme_config('header_prefs', 'menu-positions')) {
    $cur_layout = op_get_current_item($layouts, op_default_option('header_prefs', 'menu-position'));
    $previews = array();
    $link_color = false;
    $js = array();
    foreach ($layouts as $name => $layout) {
        $field_id = 'op_sections_header_prefs_menu-position_' . $name;
        $selected = $cur_layout == $name;
        $li_class = $input_attr = '';
        $tmp_color = isset($layout['link_color']) && $layout['link_color'] === true;
        if ($selected) {
            $link_color = $tmp_color;
            $li_class = ' img-radio-selected';
            $input_attr = ' checked="checked"';
        }
        if ($name == 'alongside' && (!($logo = op_get_option('blog_header', 'logo')) && ($bannerimg = op_get_option('blog_header', 'bgimg')))) {
            continue;
        }
        if ($tmp_color) {
            $js[$name] = true;
Beispiel #10
0
<div class="op-bsw-grey-panel-content op-bsw-grey-panel-no-sidebar">
	<?php 
if ($schemes = op_theme_config('color_schemes')) {
    /*?>
        <h3><?php _e('Choose From Our Pre-Existing Options', 'optimizepress') ?></h3>
        <p class="op-micro-copy"><?php _e('Select from the options available below to customise the colour schemes for your blog feature area and top navigation.', 'optimizepress') ?></p>
        <?php
    	$cur_scheme = op_get_current_item($schemes,op_default_option('color_scheme'));
    	$previews = array();
        foreach($schemes as $name => $scheme){
            $field_id = 'op_sections_color_scheme_'.$name;
            $selected = ($cur_scheme == $name);
            $li_class = $input_attr = '';
            if($selected){
                $li_class = ' img-radio-selected';
                $input_attr = ' checked="checked"';
            }
    		$preview = $scheme['preview'];
    		$preview['input'] = '<input type="radio" name="op[sections][color_scheme]" id="'.$field_id.'" value="'.$name.'"'.$input_attr.' />';
    		$preview['li_class'] = $li_class;
    		$previews[] = $preview;
    	}*/
    //echo $this->load_tpl('generic/img_radio_selector',array('previews'=>$previews,'classextra'=>'color-schemes'));
    ?>
    <script type="text/javascript">
    //var op_color_schemes = <?php 
    echo json_encode($schemes);
    ?>
;
    </script>
    <h3><?php 
Beispiel #11
0
function op_init_theme($load_modules = true)
{
    op_theme_file('functions');
    $tpl_dir = op_get_option('theme', 'dir');
    if ($tpl_dir) {
        define('OP_THEME_DIR', OP_THEMES . $tpl_dir . '/');
        define('OP_THEME_URL', OP_URL . 'themes/' . $tpl_dir . '/');
    }
    if ($load_modules) {
        $modules = op_theme_config('modules');
        $modules = is_array($modules) ? $modules : array();
        foreach ($modules as $mod) {
            op_mod($mod);
        }
    }
    do_action('op_init_theme');
}
Beispiel #12
0
function op_init_theme($load_modules = true)
{
    op_theme_file('functions');
    $tpl_dir = op_get_option('theme', 'dir');
    // fixing the dreaded 4.0.1 issue with encoded quotes in sc attributes on normal pages/posts
    //add_filter( 'run_wptexturize', '__return_false' );
    if ($tpl_dir) {
        define('OP_THEME_DIR', OP_THEMES . $tpl_dir . '/');
        define('OP_THEME_URL', OP_URL . 'themes/' . $tpl_dir . '/');
    }
    if ($load_modules) {
        $modules = op_theme_config('modules');
        $modules = is_array($modules) ? $modules : array();
        foreach ($modules as $mod) {
            op_mod($mod);
        }
    }
    do_action('op_init_theme');
}
Beispiel #13
0
 function _footer_prefs()
 {
     $arr = array('columns' => array('min' => 1, 'max' => 4));
     if ($width = op_theme_config('footer_prefs', 'full_width')) {
         $arr['full_width'] = $width;
     }
     if ($margin = op_theme_config('footer_prefs', 'column_margin')) {
         $arr['column_margin'] = $margin;
     }
     return apply_filters('op_footer_prefs_settings', $arr);
 }