本文整理汇总了PHP中smartadapt_option函数的典型用法代码示例。如果您正苦于以下问题:PHP smartadapt_option函数的具体用法?PHP smartadapt_option怎么用?PHP smartadapt_option使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了smartadapt_option函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_class_of_component
<div class="<?php
echo get_class_of_component('menu', smartadapt_option('smartadapt_layout'));
?>
">
<nav id="site-navigation" class="main-navigation hide-for-small" role="navigation">
<a class="assistive-text" href="#content"
title="<?php
esc_attr_e('Skip to content', 'smartadapt');
?>
"><?php
_e('Skip to content', 'smartadapt');
?>
</a>
<?php
//fixed menu option
$fixed = smartadapt_option('smartadapt_menu_fixed');
?>
<div class="nav-menu tabs vertical<?php
echo $fixed == '1' ? ' fixed-menu' : '';
?>
">
<?php
wp_nav_menu(array('theme_location' => 'categories', 'container' => false));
?>
</div>
</nav>
<!-- #site-navigation -->
</div>
示例2: get_template_part
get_template_part('content', 'page');
?>
<?php
comments_template('', true);
?>
<?php
}
// end of the loop.
?>
</div><!-- #content -->
<?php
if (check_position_of_component('menu', 'right', smartadapt_option('smartadapt_layout'))) {
get_template_part('section', 'menu');
}
//if menu is one the right side
?>
</div><!-- #main -->
</div><!-- #page -->
<?php
//add sidebar on the right side
if (check_position_of_component('sidebar', 'right', smartadapt_option('smartadapt_layout'))) {
get_sidebar();
}
?>
</div><!-- #wrapper -->
<?php
get_footer();
示例3: smartadapt_display_favicon
/**
* Display favicon
*
* @since SmartAdaptPro 1.0
*/
function smartadapt_display_favicon()
{
$favico = smartadapt_option('smartadapt_favicon');
if (!empty($favico)) {
$extension = substr($favico, strrpos($favico, '.') + 1, 3);
?>
<link rel="icon" type="image/<?php
echo $extension;
?>
" href="<?php
echo $favico;
?>
" />
<?php
}
}
示例4: get_class_of_component
?>
<div id="page" role="main" class="<?php
echo get_class_of_component('page', smartadapt_option('smartadapt_layout'));
?>
">
<?php
smartadapt_header();
//display header info or header image
?>
<div id="main" class="row">
<nav id="mobile-navigation" class="columns sixteen show-for-small" role="navigation">
<?php
//if layout has vertical menu
if (smartadapt_option('smartadapt_layout') != 3) {
//display mobile menu
smartadapt_wp_nav_menu_select(array('theme_location' => 'categories'));
}
?>
</nav>
<?php
//if menu is one the left side
if (check_position_of_component('menu', 'left', smartadapt_option('smartadapt_layout'))) {
get_template_part('section', 'menu');
}
?>
示例5: smartadapt_get_social_buttons
/**
* Display social buttons
*/
function smartadapt_get_social_buttons()
{
?>
<ul class="no-bullet soical-widgets">
<?php
if (smartadapt_option('social_button_facebook')) {
?>
<li>
<div class="fb-like" data-href="<?php
the_permalink();
?>
" data-send="false" data-layout="box_count"
data-width="260" data-show-faces="false"></div>
</li>
<?php
}
if (smartadapt_option('social_button_gplus')) {
wp_enqueue_script('gplus_script', 'https://apis.google.com/js/plusone.js');
?>
<li>
<g:plusone size="tall"></g:plusone>
</li>
<?php
}
if (smartadapt_option('social_button_twitter')) {
?>
<li>
<a href="https://twitter.com/share" style="width:50px" class="twitter-share-button" data-count="vertical"
data-dnt="true">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>
</li>
<?php
}
if (smartadapt_option('social_button_pinterest')) {
?>
<li class="pinterest-button">
<a data-pin-config="above" href="//pinterest.com/pin/create/button/" data-pin-do="buttonBookmark"><img
src="//assets.pinterest.com/images/pidgets/pin_it_button.png" /></a>
</li>
<?php
}
?>
</ul>
<?php
}
示例6: get_class_of_component
<section id="sidebar" class="<?php
echo get_class_of_component('sidebar', smartadapt_option('smartadapt_layout'));
?>
">
<?php
if (is_active_sidebar('sidebar-1')) {
?>
<div id="secondary" class="widget-area" role="complementary">
<?php
if (is_archive()) {
dynamic_sidebar('sidebar-4');
} else {
if (is_single()) {
dynamic_sidebar('sidebar-5');
} else {
dynamic_sidebar('sidebar-1');
}
}
?>
</div><!-- #secondary -->
<?php
}
?>
</section><!-- #sidebar .widget-area -->
示例7: get_sidebar
<footer id="main-footer" class="main-footer">
<?php
if (!is_404()) {
get_sidebar('footer');
}
//Add footer sidebar
?>
<div id="footer-bottom">
<div class="row">
<div class="four columns">
<?php
echo smartadapt_option('title_tagline_footer');
?>
</div>
<div class="twelve columns footer-navigation">
<?php
wp_nav_menu(array('theme_location' => 'footer_pages', 'container' => false, 'depth' => 1));
?>
</div>
</div>
</div>
</footer>
<?php
wp_footer();
?>
</body>
</html>