本文整理汇总了PHP中fw_get_db_settings_option函数的典型用法代码示例。如果您正苦于以下问题:PHP fw_get_db_settings_option函数的具体用法?PHP fw_get_db_settings_option怎么用?PHP fw_get_db_settings_option使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了fw_get_db_settings_option函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _settings_form_save
public function _settings_form_save($data)
{
fw_set_db_settings_option(null, array_merge((array) fw_get_db_settings_option(), fw_get_options_values_from_input(fw()->theme->get_settings_options())));
FW_Flash_Messages::add('fw_settings_form_saved', __('Options successfuly saved', 'fw'), 'success');
$data['redirect'] = fw_current_url();
return $data;
}
示例2: delete_builder_template
function delete_builder_template()
{
$path = 'builder_template/' . $_POST['builder_type'];
$db_options = fw_get_db_settings_option($path);
fw_aku(FW_Request::POST('uniqid'), $db_options);
fw_set_db_settings_option($path, $db_options);
}
示例3: fw_ssd_get_option
/**
* Get Unyson option
*/
function fw_ssd_get_option($option_id, $default_value = false)
{
if (function_exists('fw_get_db_settings_option')) {
return fw_get_db_settings_option($option_id, $default_value);
}
return $default_value;
}
示例4: render
/**
* Creates the breadcrumbs HTML
* @param string $separator, separator symbol that will be set between elements
*
* @return string
*/
public function render($separator = ">")
{
$data = array();
$settings = array();
$settings['labels'] = fw_get_db_settings_option($this->get_option_id());
$breadcrumbs = new Breadcrumbs_Builder($settings);
$data['items'] = $breadcrumbs->get_breadcrumbs();
$data['separator'] = $separator;
return $this->render_view('breadcrumbs', $data);
}
示例5: starry_ticker
function starry_ticker()
{
$hometickerspeed = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('hometickerspeed') : '';
echo '<script type="text/javascript">';
echo 'jQuery(document).ready(function() {';
echo 'jQuery("#ticker-text").vTicker("init", {';
echo 'speed: 300,';
echo 'pause: ' . $hometickerspeed;
echo '});';
echo '});';
echo '</script>';
}
示例6: prepare_post_type
/**
* @Prepare Post Type
* @return {}
*/
public function prepare_post_type()
{
if (function_exists('fw_get_db_settings_option')) {
$law_events_slug = fw_get_db_settings_option('law_events_slug', 'law_events');
if (empty($law_events_slug)) {
$law_events_slug = 'law_events';
}
} else {
$law_events_slug = 'law_events';
}
$labels = array('name' => esc_html__('Events', 'law-firm'), 'all_items' => esc_html__('Events', 'law-firm'), 'singular_name' => esc_html__('Events', 'law-firm'), 'add_new' => esc_html__('Add Event', 'law-firm'), 'add_new_item' => esc_html__('Add New Event', 'law-firm'), 'edit' => esc_html__('Edit', 'law-firm'), 'edit_item' => esc_html__('Edit Event', 'law-firm'), 'new_item' => esc_html__('New Event', 'law-firm'), 'view' => esc_html__('View Event', 'law-firm'), 'view_item' => esc_html__('View Event', 'law-firm'), 'search_items' => esc_html__('Search Event', 'law-firm'), 'not_found' => esc_html__('No Event found', 'law-firm'), 'not_found_in_trash' => esc_html__('No Event found in trash', 'law-firm'), 'parent' => esc_html__('Parent Event', 'law-firm'));
$args = array('labels' => $labels, 'description' => esc_html__('This is where you can add new Event', 'law-firm'), 'public' => true, 'supports' => array('title', 'thumbnail', 'editor', 'comments'), 'show_ui' => true, 'capability_type' => 'post', 'map_meta_cap' => true, 'publicly_queryable' => true, 'exclude_from_search' => false, 'hierarchical' => false, 'menu_position' => 8, 'rewrite' => array('slug' => $law_events_slug, 'with_front' => false), 'query_var' => true, 'has_archive' => 'false');
register_post_type('law_events', $args);
}
示例7: tarful_prefooter_content
*
* @package tarful
*/
?>
</div><!-- #content -->
<?php
tarful_prefooter_content();
?>
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<!--<?php
do_action('tarful_theme_credits');
?>
-->
<p><?php
printf(__('%s', 'tarful'), fw_get_db_settings_option('tf_footer_text'));
?>
</p>
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<?php
wp_footer();
tarful_after_footer();
?>
</body>
</html>
示例8: foreach
foreach ($terms as $term) {
$termname = strtolower($term->name);
$termname = str_replace(' ', '-', $termname);
echo '<button class="btn btn-default" data-filter=".portfolio-' . esc_attr($termname) . '"><i class="fa fa-tag"></i>' . esc_html($term->name) . '</button>';
}
?>
</div>
<?php
}
?>
</div>
<?php
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
?>
<?php
$portfolioorder = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('portfolioorder') : '';
?>
<?php
query_posts(array('post_type' => 'portfolio', 'orderby' => 'date', 'order' => $portfolioorder, 'posts_per_page' => 12, 'paged' => $paged));
?>
<div id="portfolio-container" class="portfolio-container with-separation-bottom with-separation-top">
<?php
if (have_posts()) {
?>
<?php
while (have_posts()) {
the_post();
?>
<?php
// THE CATEGORY FOR FILTERING
$terms = get_the_terms(get_the_ID(), 'portfolio-category');
示例9: array
if (has_nav_menu('copyright')) {
$settings_footer = array('theme_location' => 'copyright', 'container' => '', 'items_wrap' => '<ul id="footer-navigation" class="%2$s">%3$s</ul>');
wp_nav_menu($settings_footer);
}
?>
</div>
</div>
<?php
}
?>
</footer>
<!-- END FOOTER -->
<?php
// IF YOU WANT TO DISPLAY SCROLL BUTTON
$scrolltop = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('scrolltop') : '';
if ($scrolltop == "yes") {
?>
<!-- SCROLL TOP -->
<a href="#header" id="scroll-top" class="fadeInRight animate-me"><i class="fa fa-angle-double-up"></i></a>
<?php
}
?>
</div>
<!-- SCRIPTS -->
<?php
wp_footer();
?>
</body>
<!-- END BODY -->
示例10: fw_theme_change_style
function fw_theme_change_style()
{
if (!defined('FW')) {
return;
}
$styles = $headings = $body = $html = '';
$fonts_links = array();
//colors
$color = fw_get_db_settings_option('color_schemes');
$menu_text_color = fw_get_db_settings_option('menu_text_color');
$menu_bg = fw_get_db_settings_option('menu_bg');
$menu_sticky_bg = fw_get_db_settings_option('menu_sticky_bg');
$menu_sticky_text = fw_get_db_settings_option('menu_sticky_text');
//fonts
$headings_typography = fw_get_db_settings_option('enable_headings_font');
$body_typography = fw_get_db_settings_option('enable_body_font');
$url = get_template_directory_uri();
if ($headings_typography['enable_headings'] == 'yes') {
//add/get heading font
if (!empty($headings_typography['yes']['headings_typography']) && isset($headings_typography['yes']['headings_typography']['family'])) {
$fonts_links[$headings_typography['yes']['headings_typography']['family']][] = $headings_typography['yes']['headings_typography']['style'];
$headings = fw_theme_css_fonts($headings_typography['yes']['headings_typography'], 'h1,h2,h3,h4,h5,h6,h1 a, h2 a,
h3 a, h4 a, h5 a, h6 a, .list-a li .title, .list-b li .title, .slider-a li .title span,
.slider-a li .title, .list-c > li > span, .gallery-a li a > span');
}
}
if ($body_typography['enable_body'] == 'yes') {
//add/get body font
if (!empty($body_typography['yes']['body_typography']['family']) && isset($body_typography['yes']['body_typography']['family'])) {
if (!array_key_exists($body_typography['yes']['body_typography']['family'], $fonts_links)) {
$fonts_links[$body_typography['yes']['body_typography']['family']][] = $body_typography['yes']['body_typography']['style'];
$body = fw_theme_css_fonts($body_typography['yes']['body_typography'], 'body, textarea,
input, select, option, button, .download-a li.as, .nav-a > ul li.has-span a,
.js .search-a label, .news-a header ul li a, .news-a header ul li
');
}
}
}
//google font link
if (!empty($fonts_links)) {
$html .= "<link href='http://fonts.googleapis.com/css?family=";
//get each font
foreach ($fonts_links as $font => $style) {
$html .= str_replace(' ', '+', $font) . ':' . implode(',', $style) . '|';
}
$html = substr($html, 0, -1);
$html .= "' rel='stylesheet' type='text/css'>";
}
if (isset($_GET['color']) && !empty($_GET['color'])) {
$color_scheme = $_GET['color'];
} elseif (isset($color['schemes'])) {
$color_scheme = $color['schemes'];
} else {
$color_scheme = '';
}
if (!empty($color_scheme)) {
if ($color_scheme == 'custom') {
$styles .= '
#contact input:focus, #contact select:focus, #contact textarea:focus,
#contact .semantic-select.focus .input, #contact .semantic-select.active .input,
input:focus, select:focus, textarea:focus, .semantic-select.focus .input, .semantic-select.active .input,
.mc4wp-form .form-b input:focus
{ border-color: ' . $color['custom']['styling'] . '; }
.comments-a .date, .counter > span span, .gallery-c ul li > div .link,
.heading-a h1 .small, .heading-a h2 .small, .heading-a h3 .small,.nav-a h1 em,
.nav-a h2 em, .nav-a h3 em, .nav-a h4 em, .nav-a > ul, .nav-a.widget_nav_menu div > ul,
.nav-a > ul li p.link-a, .nav-a.widget_nav_menu div > ul li p.link-a,
.nav-a > ul li p.link-a a, .nav-a.widget_nav_menu div > ul li p.link-a a,
.nav-a > ul li p.link-a em, .nav-a > ul li p.link-a i, .nav-a.widget_nav_menu div > ul li p.link-a em,
.nav-a.widget_nav_menu div > ul li p.link-a i, .nav-a > ul li a span.scheme-a,
.nav-a.widget_nav_menu div > ul li a span.scheme-a, .nav-a > ul li a:hover span, .nav-a > ul li.active a span ,
.nav-a.widget_nav_menu div > ul li a:hover span, .nav-a.widget_nav_menu div > ul li.active a span,
#root .nav-a > ul.sub-menu li a:hover, #root .nav-a.widget_nav_menu > ul.sub-menu li.active a, #root .nav-a div > ul.sub-menu li a:hover,
#root .nav-a div > ul.sub-menu li.active a, .nav-a > ul.sub-menu li i:before, .nav-a.widget_nav_menu div > ul.sub-menu li i:before,
.nav-a b, #root .widget_recent_comments > ul li a:hover, #root .widget_recent_comments > ul li.active a,
.nav-a.aside-cal h1 + h2, .nav-a.aside-cal h2 + h3, .nav-a.aside-cal h3 + h4, .nav-a.aside-cal h4 + h5,
#root .nav-a.aside-cal ul li a:hover, #root .nav-a.aside-cal ul li.active a, .news-a header ul li a:hover,
.news-a header ul li i, .news-a header ul li i:before, .news-b article header p span, ins, mark, .scheme-a, a,
.list-a li i, #root .search-a button, .is-sticky, aside .widget_calendar caption, aside .widget_calendar thead th,
.nav-a.widget_nav_menu ul li ul.sub-menu li a:hover, .nav-a.widget_categories ul li ul.children li a:hover,
#clone nav > ul > li.active > a, #clone nav > ul > li:hover > a, #clone nav > ul > li > a:hover
{ color: ' . $color['custom']['styling'] . '; }
.counter > span span:before, .gallery-a li a:before, .gallery-a li.plain a .date:before,
.gallery-b li:before, .gallery-c ul li:before, .gallery-b.b > li > div:before,
#root .gallery-b li > .fit-a:before, #root .gallery-b li > .fit-a:after,
.gallery-c .bx-pager .bx-pager-item a.active, .news-d .bx-pager-item a.active,
.gallery-a .bx-pager-item a.active, .gallery-b .bx-pager-item a.active,.heading-a h1:before,
.heading-a h2:before, .heading-a h3:before, .nav-a > ul li a:hover, .nav-a > ul li.active a,
.nav-a div.widget_nav_menu > ul li a:hover, .nav-a.widget_nav_menu div > ul li.active a,
news-b article h1:before, .news-b article h2:before, .news-b article h3:before, .news-b article h5:before,
#content.page-template.a .news-c article, .news-d article h1:before, .news-d article h2:before, .news-d article h3:before,
.news-d article h4:before, .news-d article h5:before, .news-d article h6:before, .news-e header figure:before,
.news-e h1:before, .news-e h2:before, .news-e h3:before, .pagination-a li a:hover, .pagination-a li .current,.slider-ba,
.link-a a:hover, .list-a li a:hover i, .list-b li .no, .list-c li span span, .list-c li a:hover,
button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, #root .semantic-select ul li a:hover,
#root .semantic-select ul li.active a, .fancybox-title-over-wrap, #fancybox-thumbs ul li a, #contact .wpcf7-submit:hover,
#featured, #root #clone nav > ul > li.sub:hover > a, #clone nav > ul > li.a > a, #clone nav > ul > li > ul
{background: ' . $color['custom']['styling'] . '; }
//.........这里部分代码省略.........
示例11: _settings_form_save
public function _settings_form_save($data)
{
$flash_id = 'fw_settings_form_save';
$old_values = (array) fw_get_db_settings_option();
if (!empty($_POST['_fw_reset_options'])) {
// The "Reset" button was pressed
fw_set_db_settings_option(null, array());
FW_Flash_Messages::add($flash_id, __('The options were successfully reset', 'fw'), 'success');
do_action('fw_settings_form_reset', $old_values);
} else {
// The "Save" button was pressed
fw_set_db_settings_option(null, fw_get_options_values_from_input(fw()->theme->get_settings_options()));
FW_Flash_Messages::add($flash_id, __('The options were successfully saved', 'fw'), 'success');
do_action('fw_settings_form_saved', $old_values);
}
$redirect_url = fw_current_url();
$data['redirect'] = $redirect_url;
return $data;
}
示例12: fw_get_db_settings_option
.menu-main-page div ul a, .sidr ul li a, h1, a#sidr-menu {
color: <?php
echo fw_get_db_settings_option('main-color');
?>
!important;
}
a#sidr-menu { background: <?php
echo $rgb_main_bg;
?>
!important; }
<?php
}
?>
.cate-fw-portfolio a { color: <?php
echo fw_get_db_settings_option('main-color');
?>
}
</style>
<?php
wp_head();
?>
</head>
<body <?php
body_class();
?>
>
<div id="page-preloader"><span class="spinner"></span></div>
<div id="page" class="hfeed site">
示例13: die
<?php
if (!defined('FW')) {
die('Forbidden');
}
$options = array('header_blog_color' => array('type' => 'gradient', 'value' => array('primary' => '#000000', 'secondary' => '#000000'), 'label' => __('Header Color', 'fw'), 'desc' => __('Choose header color background', 'fw'), 'value' => fw_get_db_settings_option('header_blog_color')), 'header_blog_image' => array('label' => __('Header Image', 'fw'), 'desc' => __('Upload header image.', 'fw'), 'type' => 'upload', 'value' => fw_get_db_settings_option('header_blog_image')), 'header_blog_pattern' => array('label' => __('Header Pattern', 'fw'), 'desc' => __('Upload header pattern.', 'fw'), 'type' => 'upload', 'value' => fw_get_db_settings_option('header_blog_pattern')), 'blog-subtitle' => array('label' => __('Subtitle', 'fw'), 'desc' => __('Add category subtitle.', 'fw'), 'type' => 'text', 'value' => fw_get_db_settings_option('blog-subtitle')), 'blog-description' => array('label' => __('Short Description', 'fw'), 'desc' => __('Add category short description.', 'fw'), 'type' => 'textarea', 'value' => fw_get_db_settings_option('blog-description')));
示例14: starry_extrafooter
function starry_extrafooter()
{
$extrafooter = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafooter') : '';
$extrafooterexept = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafooterexept') : '';
if (!empty($extrafooterexept)) {
if (!is_page($extrafooterexept) && $extrafooter == "show") {
$extrafootertitle = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafootertitle') : '';
if (!empty($extrafootertitle)) {
echo '<div class="container">';
echo '<h2 class="with-breaker animate-me fadeInUp">';
$extrafootersubtitle = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafootersubtitle') : '';
echo esc_html($extrafootertitle) . '<span>' . esc_html($extrafootersubtitle) . '</span>';
echo '</h2>';
echo '</div>';
}
echo '<section class="contact-container with-separation-bottom with-separation-top">';
echo '<div class="contact-boxes">';
$extrafooterbox = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafooterbox') : '';
foreach ($extrafooterbox as $value) {
echo '<div class="contact-box animate-me zoomIn ' . $value['extrafooterboxicon'] . ' ' . starry_clean($value['extrafooterboxtitle']) . '">';
echo '<style type = "text/css" scoped>';
echo '.' . starry_clean($value['extrafooterboxtitle']) . '{background-color: ' . $value['extrafooterboxbg'] . ';} ';
echo '.' . starry_clean($value['extrafooterboxtitle']) . ' a.btn.btn-default:hover{ color: ' . $value['extrafooterboxbg'] . ';}';
echo '</style>';
echo '<h2>' . esc_html($value['extrafooterboxtitle']) . '</h2>';
echo '<p>' . esc_html($value['extrafooterboxcontent']) . '</p>';
echo '<a href="' . esc_url($value['extrafooterboxbuttonlink']) . '" class="btn btn-default" target="_blank"><i class="' . $value['extrafooterboxicon'] . '"></i> ' . esc_html($value['extrafooterboxbuttontitle']) . '</a>';
echo '</div>';
}
echo '</div>';
echo '</section>';
}
} else {
if ($extrafooter == "show") {
$extrafootertitle = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafootertitle') : '';
if (!empty($extrafootertitle)) {
echo '<div class="container">';
echo '<h2 class="with-breaker animate-me fadeInUp">';
$extrafootersubtitle = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafootersubtitle') : '';
echo esc_html($extrafootertitle) . '<span>' . esc_html($extrafootersubtitle) . '</span>';
echo '</h2>';
echo '</div>';
}
echo '<section class="contact-container with-separation-bottom with-separation-top">';
echo '<div class="contact-boxes">';
$extrafooterbox = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('extrafooterbox') : '';
foreach ($extrafooterbox as $value) {
echo '<div class="contact-box animate-me zoomIn ' . $value['extrafooterboxicon'] . ' ' . starry_clean($value['extrafooterboxtitle']) . '">';
echo '<style type = "text/css" scoped>';
echo '.' . starry_clean($value['extrafooterboxtitle']) . '{background-color: ' . $value['extrafooterboxbg'] . ';} ';
echo '.' . starry_clean($value['extrafooterboxtitle']) . ' a.btn.btn-default:hover{ color: ' . $value['extrafooterboxbg'] . ';}';
echo '</style>';
echo '<h2>' . esc_html($value['extrafooterboxtitle']) . '</h2>';
echo '<p>' . esc_html($value['extrafooterboxcontent']) . '</p>';
echo '<a href="' . esc_url($value['extrafooterboxbuttonlink']) . '" class="btn btn-default" target="_blank"><i class="' . $value['extrafooterboxicon'] . '"></i> ' . esc_html($value['extrafooterboxbuttontitle']) . '</a>';
echo '</div>';
}
echo '</div>';
echo '</section>';
}
}
}
示例15: function_exists
if (!empty($address3)) {
echo "<br>";
echo $address3;
}
?>
</li>
<?php
}
?>
<?php
if (!empty($contact_phone)) {
?>
<li class="contact-phone">
<?php
// GET SETTINGS SET IN WORDPRESS
$phone = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('phone') : '';
echo $phone;
?>
</li>
<?php
}
?>
</ul>
<?php
if (!empty($contact_social)) {
?>
<?php
starry_social_icons();
?>
<?php
}