本文整理汇总了PHP中bi_get_data函数的典型用法代码示例。如果您正苦于以下问题:PHP bi_get_data函数的具体用法?PHP bi_get_data怎么用?PHP bi_get_data使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了bi_get_data函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: bi_register_taxonomies
function bi_register_taxonomies()
{
//portfolio
$portfolio_post_type_name = bi_get_data('portfolio_post_type_name') ? bi_get_data('portfolio_post_type_name') : __('Portfolio', 'gents');
$portfolio_tax_slug = bi_get_data('portfolio_tax_slug') ? bi_get_data('portfolio_tax_slug') : 'portfolio-category';
// Portfolio taxonomies
register_taxonomy('portfolio_cats', 'portfolio', array('hierarchical' => true, 'labels' => apply_filters('bi_portfolio_tax_labels', array('name' => $portfolio_post_type_name . ' ' . __('Categories', 'gents'), 'singular_name' => $portfolio_post_type_name . ' ' . __('Category', 'gents'), 'search_items' => __('Search Categories', 'gents'), 'all_items' => __('All Categories', 'gents'), 'parent_item' => __('Parent Category', 'gents'), 'parent_item_colon' => __('Parent Category:', 'gents'), 'edit_item' => __('Edit Category', 'gents'), 'update_item' => __('Update Category', 'gents'), 'add_new_item' => __('Add New Category', 'gents'), 'new_item_name' => __('New Category Name', 'gents'), 'choose_from_most_used' => __('Choose from the most used categories', 'gents'))), 'query_var' => true, 'rewrite' => array('slug' => $portfolio_tax_slug)));
}
示例2: bi_custom_login_logo
function bi_custom_login_logo()
{
if (bi_get_data('custom_login_logo') !== '') {
$custom_login_logo_css = '';
$custom_login_logo_css .= '<style type="text/css">';
$custom_login_logo_css .= 'h1 a {';
$custom_login_logo_css .= 'background-image:url(' . bi_get_data('custom_login_logo') . ') !important;width: auto !important;background-size: auto !important;';
if (bi_get_data('custom_login_logo_height')) {
$custom_login_logo_css .= 'height: ' . bi_get_data('custom_login_logo_height') . ' !important;';
}
$custom_login_logo_css .= '}</style>';
echo $custom_login_logo_css;
}
}
示例3: bi_display_social
function bi_display_social()
{
$bi_social_links = bi_social_links();
$social_style = bi_get_data('social_style') !== 'one' ? NULL : '-sign';
if (!$bi_social_links) {
return;
}
$output = '<div class="social-icons nav pull-right">';
foreach ($bi_social_links as $social_link) {
if (bi_get_data($social_link)) {
$output .= '<a href="' . bi_get_data($social_link) . '" title="' . $social_link . '" target="_blank">
<i class="icon-' . $social_link . '' . $social_style . '"></i></a>';
}
}
$output .= '</div><!-- #social -->';
echo apply_filters('bi_display_social', $output);
}
示例4: esc_attr_e
<div class="col-lg-4 scroll-top"><a href="#scroll-top" title="<?php
esc_attr_e('scroll to top', 'responsive');
?>
"><?php
_e('<i class="icon-chevron-up"></i>', 'responsive');
?>
</a></div>
<div class="col-lg-4 powered">
<?php
if (bi_get_data('custom_power')) {
?>
<?php
echo bi_get_data('custom_power');
?>
<?php
} else {
?>
<a href="<?php
echo esc_url(__('http://strappress.com', 'responsive'));
?>
" title="<?php
esc_attr_e('StrapPress', 'responsive');
?>
">
<?php
printf('StrapPress');
?>
</a>
示例5: my_more_link
/**
* Custom Read More Button
*/
function my_more_link($more_link, $more_link_text)
{
$read_more_size = 'btn-' . bi_get_data('read_more_size', '');
$read_more_text = bi_get_data('read_more_text', '');
if (bi_get_data('read_more_block', '1')) {
$read_more_block = "btn-block";
}
return str_replace($more_link_text, '<p><a href="' . get_permalink() . '" class="readmore btn btn-default ' . $read_more_block . '' . $read_more_size . ' ">' . $read_more_text . ' </a> </p>', $more_link);
}
示例6: bi_create_post_types
function bi_create_post_types()
{
/******* Portfolio Post Type *******/
$portfolio_slug = bi_get_data('portfolio_post_type_slug') ? bi_get_data('portfolio_post_type_slug') : 'portfolio';
$portfolio_post_type_name = bi_get_data('portfolio_post_type_name') ? bi_get_data('portfolio_post_type_name') : __('Portfolio', 'gents');
$portfolio_labels = array('name' => $portfolio_post_type_name);
register_post_type('Portfolio', array('labels' => apply_filters('bi_portfolio_labels', $portfolio_labels), 'public' => true, 'has_archive' => false, 'supports' => array('title', 'editor', 'thumbnail', 'revisions', 'comments', 'custom-fields'), 'query_var' => true, 'rewrite' => array('slug' => $portfolio_slug), 'menu_icon' => get_template_directory_uri() . '/images/admin/icon-portfolio.png'));
}
示例7: bootstrap_styles
function bootstrap_styles()
{
// Register the style like this for a theme:
wp_register_style('bootstrap-styles', get_template_directory_uri() . '/admin/layouts/' . bi_get_data('bootswatch'), array(), '3.0.0', 'all');
wp_register_style('font-awesome', get_template_directory_uri() . '/css/font-awesome.min.css', array(), '3.0', 'all');
wp_register_style('magnific', get_template_directory_uri() . '/css/magnific.css', array(), '0.9.4', 'all');
wp_register_style('responsive-style', get_stylesheet_uri(), false, '3.0.0');
// enqueue the style:
wp_enqueue_style('bootstrap-styles');
wp_enqueue_style('font-awesome');
wp_enqueue_style('magnific');
wp_enqueue_style('responsive-style');
}
示例8: bi_custom_css
function bi_custom_css()
{
$custom_css = '';
/**custom css field**/
if (bi_get_data('custom_css_box')) {
$custom_css .= bi_get_data('custom_css_box');
}
//trim white space for faster page loading
$custom_css_trimmed = preg_replace('/\\s+/', ' ', $custom_css);
//echo css
$css_output = "<!-- Custom CSS -->\n<style type=\"text/css\">\n" . $custom_css_trimmed . "\n</style>";
if (!empty($custom_css)) {
echo $css_output;
}
}
示例9: bi_load_google_fonts
function bi_load_google_fonts()
{
$output_stylesheets = '';
$output_css = '';
// Body
$body_font = bi_get_data('body_gfont', 'default');
if ($body_font !== 'default') {
$output_stylesheets .= "<link href='http://fonts.googleapis.com/css?family={$body_font}' rel='stylesheet' type='text/css'>";
$output_css .= "body{font-family:'{$body_font}'; }";
}
// Headings
$headings_font = bi_get_data('headings_gfont', 'default');
if ($headings_font !== 'default') {
$output_stylesheets .= "<link href='http://fonts.googleapis.com/css?family={$headings_font}' rel='stylesheet' type='text/css'>";
$output_css .= "h1,h2,h3,h4,h5,h6, .hp-highlight h3 {font-family:'{$headings_font}'; }";
}
// Brand
$brand_font = bi_get_data('navbar_brand', 'default');
if ($brand_font !== 'default') {
$output_stylesheets .= "<link href='http://fonts.googleapis.com/css?family={$brand_font}' rel='stylesheet' type='text/css'>";
$output_css .= ".navbar-brand {font-family:'{$brand_font}'; }";
}
// Menu
$menu_font = bi_get_data('navigation_gfont', 'default');
if ($menu_font !== 'default') {
$output_stylesheets .= "<link href='http://fonts.googleapis.com/css?family={$menu_font}' rel='stylesheet' type='text/css'>";
$output_css .= ".navbar-nav > li > a, .dropdown-menu > li > a {font-family:'{$menu_font}'; }";
}
// Output stylesheets
if ($output_stylesheets) {
echo '<!-- Google Fonts -->';
echo $output_stylesheets;
}
// Output CSS
if ($output_css) {
echo '<!-- Custom Typography -->';
echo '<style type="text/css">' . $output_css . '</style>';
}
}
示例10: my_more_link
/**
* Custom Read More Button
*/
function my_more_link($more_link, $more_link_text)
{
$read_more_text = bi_get_data('read_more_text', '');
return str_replace($more_link_text, '<p><a href="' . get_permalink() . '" class="readmore">' . $read_more_text . ' </a> </p>', $more_link);
}
示例11: home_url
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<?php
if (bi_get_data('custom_logo') !== '') {
?>
<div id="logo"><a href="<?php
echo home_url();
?>
/" title="<?php
bloginfo('name');
?>
" rel="home">
<img src="<?php
echo bi_get_data('custom_logo');
?>
" alt="<?php
bloginfo('name');
?>
" />
</a></div>
<?php
} else {
?>
<?php
if (is_front_page()) {
?>
<a class="navbar-brand" href="<?php
bloginfo('url');
?>
示例12: the_permalink
>
<header>
<h1 class="post-title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
printf(__('Permanent Link to %s', 'responsive'), the_title_attribute('echo=0'));
?>
"><?php
the_title();
?>
</a></h1>
</header>
<?php
if (bi_get_data('enable_disable_meta', '1') == '1') {
?>
<section class="post-meta">
<?php
printf(__('<i class="icon-time"></i> %2$s <i class="icon-user"></i> %3$s', 'responsive'), 'meta-prep meta-prep-author', sprintf('<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', get_permalink(), esc_attr(get_the_time()), get_the_date()), sprintf('<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s">%3$s</a></span>', get_author_posts_url(get_the_author_meta('ID')), sprintf(esc_attr__('View all posts by %s', 'responsive'), get_the_author()), get_the_author()));
?>
<?php
if (comments_open()) {
?>
<span class="comments-link">
<span class="mdash">—</span>
<?php
comments_popup_link(__('No Comments <i class="icon-arrow-down"></i>', 'responsive'), __('1 Comment <i class="icon-arrow-down"></i>', 'responsive'), __('% Comments <i class="icon-arrow-down"></i>', 'responsive'));
?>
</span>
<?php
示例13: bi_custom_css
function bi_custom_css()
{
$custom_css = '';
/**custom css field**/
if (bi_get_data('custom_css_box')) {
$custom_css .= bi_get_data('custom_css_box');
}
//background image
$custom_background = bi_get_data('custom_bg');
if ($custom_background == '' || $custom_background == get_template_directory_uri() . '/images/bg/bg0.png') {
} elseif ($custom_background !== '' && $custom_background !== get_template_directory_uri() . '/images/bg/bg_20.png') {
$custom_css .= 'body{background-image: url(' . $custom_background . ');}';
} else {
$custom_css .= 'body{background-image: none;}';
}
//background color
if (bi_get_data('background_color', '#d9d9d9') !== '#d9d9d9') {
$custom_css .= 'body{background-color: ' . bi_get_data('background_color') . ';}';
}
//header padding
if (bi_get_data('header_padding') && bi_get_data('header_padding') !== '25px') {
$custom_css .= 'header{padding-top: ' . bi_get_data('header_padding') . '; padding-bottom: ' . bi_get_data('header_padding') . ';}';
}
//header
if (bi_get_data('header_background') !== '#FFF') {
$custom_css .= 'header { background: ' . bi_get_data('header_background') . ';}';
}
if (bi_get_data('disable_fixed_navbar') == '1') {
$custom_css .= 'body { padding-top: 70px; }';
}
//body text color
if (bi_get_data('main_text_color') !== '#333333') {
$custom_css .= 'body { color: ' . bi_get_data('main_text_color') . ';}';
}
//body link color
if (bi_get_data('main_link_color') !== '#428bca') {
$custom_css .= 'a { color: ' . bi_get_data('main_link_color') . ';}';
}
//body link hover color
if (bi_get_data('main_link_hover_color') !== '#2a6496') {
$custom_css .= 'a:hover, a:focus { color: ' . bi_get_data('main_link_hover_color') . ';}';
}
//navbar color
if (bi_get_data('navbar_color') !== '#eeeeee') {
$custom_css .= '.navbar {background-color: ' . bi_get_data('navbar_color') . ' !important;}';
}
//navbar brand
if (bi_get_data('navbar_brand_color') !== '#777777') {
$custom_css .= '.navbar-brand {color: ' . bi_get_data('navbar_brand_color') . ' !important;}';
}
//navbar brand
if (bi_get_data('navbar_brand_color_hover') !== '#5e5e5e') {
$custom_css .= '.navbar-brand:hover, .navbar-brand:focus {color: ' . bi_get_data('navbar_brand_color_hover') . ' !important;}';
}
//navbar menu links
if (bi_get_data('navbar_menu_links') !== '#777777') {
$custom_css .= '.navbar-nav > li > a, .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus
{color: ' . bi_get_data('navbar_menu_links') . ' !important;}';
}
//navbar menu links hover
if (bi_get_data('navbar_menu_links_hover') !== '#333333') {
$custom_css .= '.navbar-nav > li > a:hover, .navbar-nav > li > a:focus
{color: ' . bi_get_data('navbar_menu_links_hover') . ' !important;}';
}
//navbar menu link background color
if (bi_get_data('navbar_menu_link_bg') !== '#d5d5d5') {
$custom_css .= '.navbar-nav > .open > a, .navbar-nav > .open > a:hover, .navbar-nav > .open > a:focus, .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus
{background-color: ' . bi_get_data('navbar_menu_link_bg') . ' !important;}';
}
//navbar dropdown menu link color
if (bi_get_data('navbar_dd_link') !== '#333333') {
$custom_css .= '.dropdown-menu > li > a
{color: ' . bi_get_data('navbar_dd_link') . ' !important;}';
}
//navbar dropdown menu link hover color
if (bi_get_data('navbar_dd_hover_link') !== '#FFFFFF') {
$custom_css .= '.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus
{color: ' . bi_get_data('navbar_dd_hover_link') . ' !important;}';
}
//navbar dropdown menu link background color
if (bi_get_data('navbar_bg_hover_link') !== '#357ebd') {
$custom_css .= '.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus
{background-color: ' . bi_get_data('navbar_bg_hover_link') . ' !important;
background-image: -webkit-gradient(linear, left 0%, left 100%, from(' . bi_get_data('navbar_bg_hover_link') . '), to(' . bi_get_data('navbar_bg_hover_link') . '));
background-image: -webkit-linear-gradient(top, ' . bi_get_data('navbar_bg_hover_link') . ', 0%, ' . bi_get_data('navbar_bg_hover_link') . ', 100%);
background-image: -moz-linear-gradient(top, ' . bi_get_data('navbar_bg_hover_link') . ' 0%, ' . bi_get_data('navbar_bg_hover_link') . ' 100%);
background-image: linear-gradient(to bottom, ' . bi_get_data('navbar_bg_hover_link') . ' 0%, ' . bi_get_data('navbar_bg_hover_link') . ' 100%);}';
}
//jumbotron background color
if (bi_get_data('jumbotron_bg') !== '#eeeeee') {
$custom_css .= '.jumbotron
{background-color: ' . bi_get_data('jumbotron_bg') . ' !important;}';
}
//jumbotron text color
if (bi_get_data('jumbotron_text_color') !== '#333333') {
$custom_css .= '.jumbotron h1, .jumbotron h2, .jumbotron p
{color: ' . bi_get_data('jumbotron_text_color') . ' !important;}';
}
//jumbotron button color
if (bi_get_data('jumbotron_button_color') !== '#474949') {
//.........这里部分代码省略.........
示例14: bi_display_social
//social output - see functions/social-output.php
if (bi_get_data('disable_social', '1') == '1') {
bi_display_social();
}
?>
</div>
</div>
<nav role="navigation">
<div class="navbar navbar-default <?php
if (bi_get_data('disable_inverse_navbar', '1') == '1') {
echo 'navbar-inverse';
}
?>
<?php
if (bi_get_data('disable_fixed_navbar', '1') == '1') {
echo 'navbar-fixed-top';
}
?>
">
<div class="container">
<!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
示例15: the_permalink
the_permalink();
?>
" title="<?php
the_title_attribute();
?>
" >
<?php
the_post_thumbnail();
?>
</a>
<?php
}
?>
<?php
if (bi_get_data('project_title', '1')) {
?>
<p><?php
the_title();
?>
</p>
<?php
}
?>
</div> <!-- /col -->
<?php
}
?>
</div><!-- /row -->
</div><!-- /container -->