当前位置: 首页>>代码示例>>PHP>>正文


PHP op_default_option函数代码示例

本文整理汇总了PHP中op_default_option函数的典型用法代码示例。如果您正苦于以下问题:PHP op_default_option函数的具体用法?PHP op_default_option怎么用?PHP op_default_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了op_default_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: print_scripts

 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);
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:12,代码来源:assets.php

示例2: display

 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>';
         }
     }
 }
开发者ID:denis-chmel,项目名称:wordpress,代码行数:12,代码来源:promotion.php

示例3: save_color_scheme

 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);
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:18,代码来源:social_integration.php

示例4: save_header_prefs

 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);
 }
开发者ID:kyscastellanos,项目名称:arepa,代码行数:37,代码来源:layout.php

示例5: op_page_option

<?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>
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:footer_area.php

示例6: op_register_scripts

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);
    }
}
开发者ID:JalpMi,项目名称:v2contact,代码行数:25,代码来源:scripts.php

示例7: _e

?>
    <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 
开发者ID:kyscastellanos,项目名称:arepa,代码行数:31,代码来源:blog_header.php

示例8: get_disabled_filters

 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;
 }
开发者ID:shahadat014,项目名称:geleyi,代码行数:16,代码来源:page_options.php

示例9: _e

<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>
开发者ID:denis-chmel,项目名称:wordpress,代码行数:28,代码来源:social_integration.php

示例10: _e

    ?>
</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>
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:site_footer.php

示例11: _e

<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>
开发者ID:kyscastellanos,项目名称:arepa,代码行数:12,代码来源:promotion_settings.php

示例12: array

     $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 
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:typography.php

示例13: theme1_output_css

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) {
//.........这里部分代码省略.........
开发者ID:JalpMi,项目名称:v2contact,代码行数:101,代码来源:functions.php

示例14: _e

<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>
开发者ID:denis-chmel,项目名称:wordpress,代码行数:14,代码来源:favicon.php

示例15: op_color_picker

			<?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>';
}
开发者ID:shahadat014,项目名称:geleyi,代码行数:31,代码来源:header_prefs.php


注:本文中的op_default_option函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。