• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fw_get_db_post_option函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_frontend_data

 public function get_frontend_data($post_id)
 {
     $collector = array();
     $meta = fw_get_db_post_option($post_id);
     $post_status = get_post_status($post_id);
     if ('publish' === $post_status and isset($meta['populated'])) {
         $slider_name = $meta['slider']['selected'];
         $population_method = $meta['slider'][$slider_name]['population-method'];
         $number_of_images = (int) $meta['number_of_images'];
         $collector = array('slides' => array(), 'settings' => array('title' => $meta['title'], 'slider_type' => $slider_name, 'population_method' => $population_method, 'post_id' => $post_id, 'extra' => isset($meta['custom-settings']) ? $meta['custom-settings'] : array()));
         $query_data = array();
         $post_type = $meta['tags']['selected'];
         $terms = $meta['tags'][$post_type]['terms'];
         $tax_query = array('tax_query' => array('relation' => 'OR'));
         foreach ($terms as $term) {
             $decoded_data = json_decode($term, true);
             $query_data[$decoded_data['taxonomy']][] = $decoded_data['term_id'];
         }
         foreach ($query_data as $taxonomy => $terms) {
             $tax_query['tax_query'][] = array('taxonomy' => $taxonomy, 'field' => 'id', 'terms' => $terms);
         }
         $final_query = array_merge(array('post_status' => 'publish', 'posts_per_page' => $number_of_images, 'post_type' => $post_type, 'meta_key' => '_thumbnail_id'), $tax_query);
         global $post;
         $original_post = $post;
         $the_query = new WP_Query($final_query);
         while ($the_query->have_posts()) {
             $the_query->the_post();
             array_push($collector['slides'], array('title' => get_the_title(), 'multimedia_type' => $this->multimedia_types[0], 'src' => wp_get_attachment_url(get_post_thumbnail_id(get_the_ID())), 'desc' => get_the_excerpt(), 'extra' => array('post_id' => $post->ID)));
         }
         wp_reset_postdata();
         $post = $original_post;
         unset($original_post);
     }
     return $collector;
 }
开发者ID:Archrom,项目名称:wordpress_remaf,代码行数:35,代码来源:class-fw-extension-population-method-tags.php


示例2: fw_ext_events_render_map

 function fw_ext_events_render_map($post_id = 0)
 {
     if (0 === $post_id && null === ($post_id = get_the_ID())) {
         return null;
     }
     $fw_ext_events = fw()->extensions->get('events');
     if (empty($fw_ext_events)) {
         return null;
     }
     $post = get_post($post_id);
     if ($post->post_type !== $fw_ext_events->get_post_type_name()) {
         return null;
     }
     $shortcode_ext = fw()->extensions->get('shortcodes');
     if (empty($shortcode_ext)) {
         return null;
     }
     $shortcode_map = $shortcode_ext->get_shortcode('map');
     if (empty($shortcode_map)) {
         return null;
     }
     $options = fw_get_db_post_option($post->ID, $fw_ext_events->get_event_option_id());
     if (empty($options['event_location']['location']) or empty($options['event_location']['coordinates']['lat']) or empty($options['event_location']['coordinates']['lng'])) {
         return null;
     }
     return $shortcode_map->render_custom(array(array('title' => $post->post_title, 'url' => get_permalink($post->ID), 'description' => $options['event_location']['location'], 'thumb' => array('attachment_id' => get_post_thumbnail_id($post->ID)), 'location' => array('coordinates' => array('lat' => $options['event_location']['coordinates']['lat'], 'lng' => $options['event_location']['coordinates']['lng'])))), array('map_height' => false, 'map_type' => false));
 }
开发者ID:northpen,项目名称:project_11,代码行数:27,代码来源:helpers.php


示例3: fw_ext_portfolio_get_gallery_images

function fw_ext_portfolio_get_gallery_images($post_id = 0)
{
    if (0 === $post_id && null === ($post_id = get_the_ID())) {
        return array();
    }
    return fw_get_db_post_option($post_id, 'project-gallery', array());
}
开发者ID:northpen,项目名称:northpen,代码行数:7,代码来源:helpers.php


示例4: _theme_filter_remove_autop

 /**
  * Removes the autop filter if the post was created via the layout builder
  *
  * @internal
  */
 public function _theme_filter_remove_autop($content)
 {
     global $post;
     if (in_array($post->post_type, $this->get_config('supported_post_types'))) {
         $builder_meta = fw_get_db_post_option($post->ID, $this->builder_option_key);
         if ($builder_meta['builder_active']) {
             remove_filter('the_content', 'wpautop');
         }
     }
     return $content;
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:16,代码来源:class-fw-extension-layout-builder.php


示例5: get_frontend_data

 public function get_frontend_data($post_id)
 {
     $selected = fw_get_db_post_option($post_id, 'slider/selected');
     $population_method = fw_get_db_post_option($post_id, 'slider/' . $selected . '/population-method');
     $population_method_instance = $this->get_child('population-method-' . $population_method);
     if ($population_method_instance) {
         return $population_method_instance->get_frontend_data($post_id);
     } else {
         return array();
     }
 }
开发者ID:Archrom,项目名称:wordpress_remaf,代码行数:11,代码来源:class-fw-extension-population-method.php


示例6: get_frontend_data

 public function get_frontend_data($post_id)
 {
     $meta = fw_get_db_post_option($post_id);
     $post_status = get_post_status($post_id);
     $collector = array();
     if ('publish' === $post_status and isset($meta['populated'])) {
         $slider_name = $meta['slider']['selected'];
         $population_method = $meta['slider'][$slider_name]['population-method'];
         $collector = array('slides' => array(), 'settings' => array('title' => $meta['title'], 'slider_type' => $slider_name, 'population_method' => $population_method, 'post_id' => $post_id, 'extra' => isset($meta['custom-settings']) ? $meta['custom-settings'] : array()));
         foreach ($meta['custom-slides'] as $slide) {
             array_push($collector['slides'], array('title' => !empty($slide['title']) ? $slide['title'] : '', 'multimedia_type' => $slide['multimedia']['selected'], 'src' => $slide['multimedia']['selected'] === 'video' ? $slide['multimedia'][$slide['multimedia']['selected']]['src'] : $slide['multimedia'][$slide['multimedia']['selected']]['src']['url'], 'attachment_id' => $slide['multimedia']['selected'] === 'image' ? $slide['multimedia'][$slide['multimedia']['selected']]['src']['attachment_id'] : '', 'desc' => !empty($slide['desc']) ? $slide['desc'] : '', 'extra' => isset($slide['extra-options']) ? $slide['extra-options'] : array()));
         }
     }
     return $collector;
 }
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:15,代码来源:class-fw-extension-population-method-custom.php


示例7: get_frontend_data

 public function get_frontend_data($post_id)
 {
     $collector = array();
     $meta = fw_get_db_post_option($post_id);
     $post_status = get_post_status($post_id);
     if ('publish' === $post_status and isset($meta['populated'])) {
         $slider_name = $meta['slider']['selected'];
         $population_method = $meta['slider'][$slider_name]['population-method'];
         $posts_id = $meta['post_types'][$meta['post_types']['selected']]['posts_id'];
         $collector = array('slides' => array(), 'settings' => array('title' => $meta['title'], 'slider_type' => $slider_name, 'population_method' => $population_method, 'post_id' => $post_id, 'extra' => array()));
         $posts = get_posts(array('post_in' => $posts_id));
         foreach ($posts as $post) {
             setup_postdata($post);
             array_push($collector['slides'], array('title' => get_the_title(), 'src' => wp_get_attachment_url(get_post_thumbnail_id($post->ID)), 'desc' => get_the_excerpt(), 'extra' => array('post_id' => $post->ID)));
         }
         wp_reset_postdata();
     }
     return $collector;
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:19,代码来源:class-fw-extension-population-method-posts.php


示例8: starry_header

/**
 * STARRY HEADER
 * @internal
 */
function starry_header()
{
    if (!is_front_page()) {
        if (is_singular('portfolio')) {
            $projecttopfeatured = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'projecttopfeatured') : '';
        }
        if (is_singular('post')) {
            $posttopfeatured = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'posttopfeatured') : '';
        }
        echo '<!-- HEADER SLIDER -->';
        echo '<div class="flexslider" id="header-slider">';
        echo '<ul class="slides">';
        // IF HAS FEATURED IMAGE
        if (has_post_thumbnail() && is_page()) {
            $image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'single-post-thumbnail');
            echo '<li><img src="' . esc_url($image[0]) . '" alt="SLider Image"></li>';
        } elseif (is_singular('portfolio') && !empty($projecttopfeatured)) {
            echo '<li><img src="' . $projecttopfeatured['url'] . '" alt="SLider Image"></li>';
        } elseif (is_singular('post') && !empty($posttopfeatured)) {
            echo '<li><img src="' . $posttopfeatured['url'] . '" alt="SLider Image"></li>';
        } else {
            // GET DEFAULT ONE
            $defaultimage = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('defaultimage') : '';
            if (!empty($defaultimage)) {
                echo '<li><img src="' . esc_url($defaultimage['url']) . '" alt="SLider Image"></li>';
            } else {
                echo '<li><img src="' . get_template_directory_uri() . '/images/dummy/bg1.jpg" alt="SLider Image"></li>';
            }
        }
        echo '</ul>';
        echo '</div>';
        // IF IT IS THE HOME PAGE, THERE IS 3 DIFFERENT CHOICES
    } else {
        $homerevslider = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('homerevslider') : '';
        if ($homerevslider != true) {
            $homeheader_type = function_exists('fw_get_db_settings_option') ? fw_get_db_settings_option('homeheader_content') : '';
            // IF YOU CHOOSE SINGLE IMAGE
            if ($homeheader_type['gadget'] == "header_single") {
                echo '<!-- HEADER SLIDER -->';
                echo '<div class="flexslider" id="header-slider">';
                echo '<ul class="slides">';
                if (!empty($homeheader_type['header_single']['homesingleimage']['url'])) {
                    echo '<li><img src="' . esc_url($homeheader_type['header_single']['homesingleimage']['url']) . '" alt="SLider Image"></li>';
                } else {
                    echo '<li><img src="' . get_template_directory_uri() . '/images/dummy/bg1.jpg" alt="SLider Image"></li>';
                }
                echo '</ul>';
                echo '</div>';
            } elseif ($homeheader_type['gadget'] == "header_slider") {
                if ($homeheader_type['header_slider']['homeslidercontrol'] == true) {
                    echo '<!-- SLIDER NAVIGATION -->';
                    echo '<div class="navigation-slider-container">';
                    echo '<a href="#" id="sliderPrev"><i class="fa fa-arrow-left"></i></a>';
                    echo '<a href="#" id="sliderNext"><i class="fa fa-arrow-right"></i></a>';
                    echo '</div>';
                }
                echo '<!-- HEADER SLIDER -->';
                echo '<div class="flexslider" id="header-slider">';
                echo '<ul class="slides">';
                foreach ($homeheader_type['header_slider']['homesliderimages'] as $value_slider) {
                    echo '<li><img src="' . esc_url($value_slider['url']) . '" alt="slider image"></li>';
                }
                echo '</ul>';
                echo '</div>';
            } elseif ($homeheader_type['gadget'] == "header_video") {
                echo '<div id="header-video" ';
                echo 'data-vide-bg="';
                if (!empty($homeheader_type['header_video']['header_video_mp4']['url'])) {
                    // REMOVE THE EXTENSIO
                    echo 'mp4: ' . esc_url($homeheader_type['header_video']['header_video_mp4']['url']) . ', ';
                }
                if (!empty($homeheader_type['header_video']['header_video_ogv']['url'])) {
                    echo 'ogv: ' . esc_url($homeheader_type['header_video']['header_video_ogv']['url']) . ', ';
                }
                if (!empty($homeheader_type['header_video']['header_video_webm']['url'])) {
                    echo 'webm: ' . esc_url($homeheader_type['header_video']['header_video_webm']['url']) . ', ';
                } elseif (!empty($homeheader_type['header_video']['header_video_webm_link'])) {
                    echo 'webm: ' . esc_url($homeheader_type['header_video']['header_video_webm_link']) . ', ';
                }
                if (!empty($homeheader_type['header_video']['header_video_poster']['url'])) {
                    echo 'poster: ' . esc_url($homeheader_type['header_video']['header_video_poster']['url']) . '" ';
                }
                echo 'data-vide-options="posterType: jpg, loop: true, muted: true, position: 50% 50%">';
                echo '</div>';
            } else {
                echo '<!-- HEADER SLIDER -->';
                echo '<div class="flexslider" id="header-slider">';
                echo '<ul class="slides">';
                echo '<li><img src="' . get_template_directory_uri() . '/images/dummy/bg1.jpg" alt="SLider Image"></li>';
                echo '</ul>';
                echo '</div>';
            }
            // IF YOU CHOOSE THE REVOLUTION SLIDER
        } else {
            echo '<!-- HEADER SLIDER -->';
            echo '<div id="header-slider">';
//.........这里部分代码省略.........
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:101,代码来源:hooks.php


示例9: render_slider

 public function render_slider($post_id, $dimensions, $extra_data = array())
 {
     $slider_name = fw_get_db_post_option($post_id, $this->get_name() . '/selected');
     if (!is_null($slider_name)) {
         return $this->get_child($slider_name)->render_slider($post_id, $dimensions, $extra_data);
     }
 }
开发者ID:kvsemenoff,项目名称:proetis,代码行数:7,代码来源:class-fw-extension-slider.php


示例10: _action_calendar_export

 /**
  * @intenral
  */
 public function _action_calendar_export()
 {
     global $post;
     if (empty($post) or $post->post_type !== $this->post_type_name) {
         return;
     }
     if (FW_Request::GET('calendar')) {
         $calendar = FW_Request::GET('calendar');
         $row_id = FW_Request::GET('row_id');
         $offset = FW_Request::GET('offset');
         $options = fw_get_db_post_option($post->ID, $this->get_event_option_id());
         if (!is_array(fw_akg('event_children/' . $row_id, $options)) or !preg_match('/^\\d+$/', $row_id)) {
             wp_redirect(site_url() . '?error=404');
         }
         if (!preg_match('/^(\\-|\\d)\\d+$/', $offset)) {
             $offset = 0;
         }
         switch ($calendar) {
             case 'google':
                 wp_redirect($this->get_google_uri($post, $options, $row_id, $offset));
                 break;
             default:
                 $this->get_ics_headers($post);
                 echo $this->get_ics_content($post, $options, $row_id, $offset);
                 die;
         }
     }
 }
开发者ID:northpen,项目名称:project_11,代码行数:31,代码来源:class-fw-extension-events.php


示例11: get_content_slider

function get_content_slider()
{
    $slider = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'tf_page_slider/tf_switch') : '';
    if ($slider === 'yes') {
        ?>
	<div class='page_slider'><?php 
        $value = fw_get_db_post_option(get_the_ID(), 'tf_page_slider/' . $slider);
        $slider_id = $value['tf_slider_content'];
        echo fw_ext('slider')->render_slider($slider_id, array('width' => 300, 'height' => 200));
        ?>
</div>
<?php 
    }
}
开发者ID:HilderH,项目名称:emprendamos,代码行数:14,代码来源:functions.php


示例12: get_header

<?php

/**
 * The Template for displaying all single posts
 */
get_header();
$header_image = defined('FW') ? fw_get_db_post_option($post->ID, 'header_post_image', fw_get_db_settings_option('header_post_image')) : '';
$header_color = defined('FW') ? fw_get_db_post_option($post->ID, 'header_post_color', fw_get_db_settings_option('header_post_color')) : '';
$header_pattern = defined('FW') ? fw_get_db_post_option($post->ID, 'header_post_pattern', fw_get_db_settings_option('header_post_pattern')) : '';
$header_title = defined('FW') ? esc_html(fw_get_db_post_option($post->ID, 'header_post_title', fw_get_db_settings_option('header_post_title'))) : '';
//show header image
fw_show_header($header_image, $header_color, $header_pattern, $header_title);
?>


<?php 
$sidebar_position = function_exists('fw_ext_sidebars_get_current_position') ? fw_ext_sidebars_get_current_position() : 'right';
?>
<section id="content" class="cols-a <?php 
echo $sidebar_position === 'left' ? 'news-e-left' : '';
?>
 <?php 
echo $sidebar_position == null || $sidebar_position == 'full' ? 'news-e-full' : '';
?>
">
    <div class="news-a">
        <?php 
while (have_posts()) {
    the_post();
    get_template_part('content', 'single');
    // If comments are open, load up the comment template.
开发者ID:setcomunicacao,项目名称:setdigital,代码行数:31,代码来源:single.php


示例13: get_populated_sliders

 public function get_populated_sliders()
 {
     $posts = get_posts(array('post_type' => $this->post_type, 'numberposts' => -1));
     foreach ($posts as $key => $post) {
         $meta = fw_get_db_post_option($post->ID);
         if (!isset($meta['populated'])) {
             unset($posts[$key]);
         }
     }
     return $posts;
 }
开发者ID:AdsonCicilioti,项目名称:Unyson,代码行数:11,代码来源:class-fw-extension-slider.php


示例14: while

    while (have_posts()) {
        the_post();
        if ($h > 0 && !is_float($h / 4)) {
            print $html_end_slider;
        }
        if (!is_float($h / 4)) {
            print $html_begin_slider;
        }
        print '<div class="col-md-3 team-single">';
        $image_id = get_post_thumbnail_id();
        $image_attributes_team = wp_get_attachment_image_src($image_id, 'full');
        print '<img src="' . esc_url($image_attributes_team[0]) . '" alt="' . get_the_title() . '" class="animate-me bounceIn">';
        print '<h3 class="center">' . get_the_title() . '</h3>';
        print the_excerpt();
        print '<ul class="social-list">';
        $teamoptions = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'teamsocial') : '';
        foreach ($teamoptions as $valueteam) {
            print '<li><a href="' . esc_url($valueteam['teamsociallink']) . '"><i class="' . $valueteam['teamsocialicon'] . '"></i></a></li>';
        }
        print '</ul>';
        print '</div>';
        $h++;
    }
}
if ($h > 0) {
    echo $html_end_slider;
}
wp_reset_query();
?>
	</div>
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:30,代码来源:view.php


示例15: while

$wp_query = $custom_query;
$item_string = "";
/** The Loop **/
if ($custom_query->have_posts()) {
    $i = 1;
    while ($custom_query->have_posts()) {
        $custom_query->the_post();
        /** optional post divider **/
        if ($i != 1 && $show_divider == "Yes") {
            $item_string .= '<div class="fw-row blog-row"><div class="fw-col-md-12 full-width"><div class="post-divider"></div></div></div>';
        }
        $hidden_thumb = "";
        /** post options **/
        if (function_exists('fw_get_db_settings_option')) {
            $fullsize = fw_get_db_post_option(get_the_ID(), 'opt_fullsize');
            $subtitle = fw_get_db_post_option(get_the_ID(), 'opt_subtitle');
        } else {
            $fullsize = "No";
        }
        /**  Start Full width post **/
        if ($fullsize == "Yes" || $layout == "full-width") {
            include locate_template('archive-templates/full-width.php');
        } else {
            if ($layout == "image-left-50") {
                include locate_template('archive-templates/left-50.php');
            } else {
                if ($layout == "image-left-33") {
                    include locate_template('archive-templates/left-33.php');
                } else {
                    if ($layout == "image-right-50") {
                        include locate_template('archive-templates/right-50.php');
开发者ID:TheSaladFace,项目名称:Naked,代码行数:31,代码来源:view.php


示例16: the_ID

								<div class="active tab-pane bounceInRight" id="skill-<?php 
                the_ID();
                ?>
">
							<?php 
            } else {
                ?>
								<div class="tab-pane bounceInRight" id="skill-<?php 
                the_ID();
                ?>
">
							<?php 
            }
            ?>
								<?php 
            $theicon = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'skillicon') : '';
            ?>
								<h2><i class="<?php 
            echo $theicon;
            ?>
"></i> <?php 
            the_title();
            ?>
</h2>
					  			<?php 
            the_content();
            ?>
							</div>
						<?php 
        }
        ?>
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:31,代码来源:skills.php


示例17: prepare_slider_version_v4

        /**
         * @Slick Slider v4
         * @return {HTML}
         * */
        public function prepare_slider_version_v4($id = '')
        {
            $margin_top = fw_get_db_post_option($id, 'margin_top', true);
            $margin_bottom = fw_get_db_post_option($id, 'margin_bottom', true);
            $pagination = fw_get_db_post_option($id, 'pagination', true);
            $auto = fw_get_db_post_option($id, 'auto', true);
            $slider_speed = fw_get_db_post_option($id, 'slider_speed', true);
            $slider_type = fw_get_db_post_option($id, 'slider_type', true);
            $flag = fw_unique_increment();
            law_firm_enqueue_slick_library();
            //fw_print($slider_type);
            $autoPlay = 'true';
            if (isset($auto) && $auto == 'disable') {
                $autoPlay = 'false';
            }
            $navigation = 'true';
            if (isset($pagination) && $pagination == 'disable') {
                $navigation = 'false';
            }
            $css = array();
            if (isset($margin_top) && !empty($margin_top)) {
                $css[] = 'margin-top:' . $margin_top . 'px;';
            }
            if (isset($margin_bottom) && !empty($margin_bottom)) {
                $css[] = 'margin-bottom:' . $margin_bottom . 'px;';
            }
            if (isset($slider_type['slider_v4']['slides']) && is_array($slider_type['slider_v4']['slides']) && !empty($slider_type['slider_v4']['slides'])) {
                $slides = $slider_type['slider_v4']['slides'];
                ?>
            <div class="system-slider" style="<?php 
                echo implode(' ', $css);
                ?>
">
             	<div class="fadeslider-home" id="main-slider-<?php 
                echo esc_js($flag);
                ?>
">
				 <?php 
                foreach ($slides as $key => $slide) {
                    $button_link = $slide['button_link'];
                    $button_link_title = $slide['button_link_title'];
                    $slider_title = $slide['slider_title'];
                    $slider_description = $slide['slider_description'];
                    $slider_subheading = $slide['slider_subheading'];
                    if (isset($slide['slider_bg_image']['url']) && !empty($slide['slider_bg_image']['url'])) {
                        ?>
    
                            <div style="background-image: url(<?php 
                        echo esc_url($slide['slider_bg_image']['url']);
                        ?>
);">
                                <?php 
                        if (!empty($slider_title) || !empty($slider_subheading) || !empty($slider_description) || !empty($button_link_title)) {
                            ?>
                                    <div class="slide-inner">
                                        <div class="container">
                                            <div class="row">
                                                <div class="col-xs-12 col-xs-offset-0 col-sm-10 col-sm-offset-1 col-lg-8 col-lg-offset-2">
                                                    <?php 
                            if (!empty($slider_title)) {
                                ?>
                                                        <h1 class="slidetop"><?php 
                                echo esc_attr($slider_title);
                                ?>
</h1>
                                                    <?php 
                            }
                            ?>
                                                    <?php 
                            if (!empty($slider_subheading)) {
                                ?>
                                                        <h2 class="slidebottom"><?php 
                                echo esc_attr($slider_subheading);
                                ?>
</h2>
                                                    <?php 
                            }
                            ?>
                                                    <?php 
                            if (!empty($slider_description)) {
                                ?>
                                                        <p class="slidebottom"><i style="text-transform: lowercase;"><?php 
                                echo esc_attr($slider_description);
                                ?>
</i></p>
                                                    <?php 
                            }
                            ?>
                                                    <?php 
                            if (isset($button_link_title) && !empty($button_link_title)) {
                                ?>
                                                		<div class="shortcode-buttons add2 slidebottom">
                                                        	<a href="<?php 
                                echo esc_url($button_link);
                                ?>
" class="btn btn-default"><?php 
//.........这里部分代码省略.........
开发者ID:ansfazi,项目名称:xaraar_core,代码行数:101,代码来源:class-slider.php


示例18: render_slider

 public function render_slider($post_id, $dimensions, $extra_data = array())
 {
     $slider_name = fw_get_db_post_option($post_id, $this->get_name() . '/selected');
     $static = empty($extra_data['static']) || $extra_data['static'] == 'yes' ? true : false;
     if (!is_null($this->get_child($slider_name))) {
         $extra_data['static'] = apply_filters('fw_slider_enqueue_static_files', $static, $slider_name, $post_id);
         return $this->get_child($slider_name)->render_slider($post_id, $dimensions, $extra_data);
     }
 }
开发者ID:puriwp,项目名称:theme-slider,代码行数:9,代码来源:class-fw-extension-slider.php


示例19: _action_save_post

 /**
  * @param int  $post_id
  * @param WP_Post $post
  */
 public function _action_save_post($post_id, $post)
 {
     if (!fw_is_real_post_save($post_id)) {
         return;
     }
     $options_values = array_merge((array) fw_get_db_post_option($post_id), fw_get_options_values_from_input(fw()->theme->get_post_options($post->post_type)));
     fw_set_db_post_option($post_id, null, $options_values);
     // find options that requested to be saved in separate meta
     foreach (fw_extract_only_options(fw()->theme->get_post_options($post->post_type)) as $option_id => $option) {
         if (isset($option['save-to-separate-meta']) && $option['save-to-separate-meta']) {
             // think of a better key name
             fw_update_post_meta($post_id, 'fw_option_' . $option_id, $options_values[$option_id]);
         }
     }
     do_action('fw_save_post_options', $post_id, $post, $options_values);
 }
开发者ID:halkibsi,项目名称:Unyson,代码行数:20,代码来源:backend.php


示例20: query_posts

    query_posts(array('skills-category' => $atts['category'], 'post_type' => 'skills', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => $skillsorder));
} else {
    query_posts(array('post_type' => 'skills', 'posts_per_page' => -1, 'orderby' => 'date', 'order' => $skillsorder));
}
$h = 0;
if (have_posts()) {
    while (have_posts()) {
        the_post();
        if ($h > 0 && !is_float($h / 3)) {
            print $html_end_row;
        }
        if (!is_float($h / 3)) {
            print $html_begin_row;
        }
        $theicon = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'skillicon') : '';
        $skillmessage = function_exists('fw_get_db_post_option') ? fw_get_db_post_option(get_the_ID(), 'skillmessage') : '';
        echo '<td class="skill animate-me zoomIn">';
        echo '<h4><i class="' . $theicon . '"></i>' . get_the_title() . '</h4>';
        echo '<p>' . esc_html($skillmessage) . '</p>';
        echo '</td>';
        $h++;
    }
}
if ($h > 0) {
    echo $html_end_row;
}
?>
			<?php 
wp_reset_query();
?>
		</table>
开发者ID:alireza--noori,项目名称:initial-portfolio-website-test-,代码行数:31,代码来源:view.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fw_get_db_settings_option函数代码示例发布时间:2022-05-15
下一篇:
PHP fw_fix_path函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap