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


PHP fusion_get_option函数代码示例

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


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

示例1: set_portfolio_single_width

 /**
  * Set portfolio width and assign a class to the content div
  */
 public function set_portfolio_single_width($classes)
 {
     if (is_singular('avada_portfolio')) {
         if (fusion_get_option('portfolio_featured_image_width', 'width', Avada::c_pageID()) == 'half') {
             $portfolio_width = 'half';
         } else {
             $portfolio_width = 'full';
         }
         if (!Avada()->settings->get('portfolio_featured_images') && $portfolio_width == 'half') {
             $portfolio_width = 'full';
         }
         $classes[] = 'portfolio-' . $portfolio_width;
     }
     return $classes;
 }
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:18,代码来源:class-avada-portfolio.php

示例2: fusion_get_post_content

 /**
  * Return the post content, either excerpted or in full length
  * @param  string	$page_id		The id of the current page or post
  * @param  string 	$excerpt		Can be either 'blog' (for main blog page), 'portfolio' (for portfolio page template) or 'yes' (for shortcodes)
  * @param  integer	$excerpt_length Length of the excerpts
  * @param  boolean	$strip_html		Can be used by shortcodes for a custom strip html setting
  *
  * @return string Post content
  **/
 function fusion_get_post_content($page_id = '', $excerpt = 'blog', $excerpt_length = 55, $strip_html = FALSE)
 {
     $content_excerpted = FALSE;
     // Main blog page
     if ($excerpt == 'blog') {
         // Check if the content should be excerpted
         if (strtolower(fusion_get_theme_option('content_length')) == 'excerpt') {
             $content_excerpted = TRUE;
             // Get the excerpt length
             $excerpt_length = fusion_get_theme_option('excerpt_length_blog');
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Portfolio page templates
     } elseif ($excerpt == 'portfolio') {
         // Check if the content should be excerpted
         if (fusion_get_option('portfolio_content_length', 'portfolio_content_length', $page_id) == 'excerpt') {
             $content_excerpted = TRUE;
             // Determine the correct excerpt length
             if (fusion_get_page_option('portfolio_excerpt', $page_id)) {
                 $excerpt_length = fusion_get_page_option('portfolio_excerpt', $page_id);
             } else {
                 $excerpt_length = fusion_get_theme_option('excerpt_length_portfolio');
             }
         } else {
             if (!$page_id && fusion_get_theme_option('portfolio_content_length') == 'Excerpt') {
                 $content_excerpted = TRUE;
                 $excerpt_length = fusion_get_theme_option('excerpt_length_portfolio');
             }
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('portfolio_strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Shortcodes
     } elseif ($excerpt == 'yes') {
         $content_excerpted = TRUE;
     }
     // Sermon specific additional content
     if ('wpfc_sermon' == get_post_type(get_the_ID())) {
         $sermon_content = '';
         $sermon_content .= avada_get_sermon_content(true);
         return $sermon_content;
     }
     // Return excerpted content
     if ($content_excerpted) {
         $stripped_content = fusion_get_post_content_excerpt($excerpt_length, $strip_html);
         return $stripped_content;
         // Return full content
     } else {
         ob_start();
         the_content();
         return ob_get_clean();
     }
 }
开发者ID:agiper,项目名称:wordpress,代码行数:66,代码来源:fusion-functions.php

示例3: avada_page_title_bar

    /**
     * Render the HTML markup of the page title bar
     * @param  string $title 				Main title; page/post title or custom title set by user
     * @param  string $subtitle 			Subtitle as custom user setting
     * @param  string $secondary_content 	HTML markup of the secondary content; breadcrumbs or search field
     *
     * @return void 						Content is directly echoed
     **/
    function avada_page_title_bar($title, $subtitle, $secondary_content)
    {
        $post_id = get_queried_object_id();
        // Check for the secondary content
        $content_type = 'none';
        if (false !== strpos($secondary_content, 'searchform')) {
            $content_type = 'search';
        } elseif ($secondary_content != '') {
            $content_type = 'breadcrumbs';
        }
        // Check the position of page title
        if (metadata_exists('post', $post_id, 'pyre_page_title_text_alignment') && 'default' != get_post_meta(get_queried_object_id(), 'pyre_page_title_text_alignment', true)) {
            $alignment = get_post_meta($post_id, 'pyre_page_title_text_alignment', true);
        } elseif (Avada()->settings->get('page_title_alignment')) {
            $alignment = Avada()->settings->get('page_title_alignment');
        }
        /**
         * Render the page title bar
         */
        ?>
		<div class="fusion-page-title-bar fusion-page-title-bar-<?php 
        echo $content_type;
        ?>
 fusion-page-title-bar-<?php 
        echo $alignment;
        ?>
">
			<div class="fusion-page-title-row">
				<div class="fusion-page-title-wrapper">
					<div class="fusion-page-title-captions">
						<?php 
        if ($title) {
            ?>
							<?php 
            // Add entry-title for rich snippets
            ?>
							<?php 
            $entry_title_class = !Avada()->settings->get('disable_date_rich_snippet_pages') ? ' class="entry-title"' : '';
            ?>
							<h1<?php 
            echo $entry_title_class;
            ?>
><?php 
            echo $title;
            ?>
</h1>

							<?php 
            if ($subtitle) {
                ?>
								<h3><?php 
                echo $subtitle;
                ?>
</h3>
							<?php 
            }
            ?>
						<?php 
        }
        ?>

						<?php 
        if ('center' == $alignment) {
            // Render secondary content on center layout
            ?>
							<?php 
            if ('none' != fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id)) {
                ?>
								<div class="fusion-page-title-secondary"><?php 
                echo $secondary_content;
                ?>
</div>
							<?php 
            }
            ?>
						<?php 
        }
        ?>
					</div>

					<?php 
        if ('center' != $alignment) {
            // Render secondary content on left/right layout
            ?>
						<?php 
            if ('none' != fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id)) {
                ?>
							<div class="fusion-page-title-secondary"><?php 
                echo $secondary_content;
                ?>
</div>
						<?php 
//.........这里部分代码省略.........
开发者ID:Aldebaran10,项目名称:avada,代码行数:101,代码来源:avada-functions.php

示例4: and

    }
    ?>
	<?php 
}
?>
}

<?php 
if (($smof_data['header_bg_color']['opacity'] < 1 && !get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) || get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) != '' && get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) < 1) && !is_search() && !is_404() && !is_author() && (!is_archive() || class_exists('Woocommerce') && is_shop())) {
    ?>
	@media only screen and (min-width: 800px){
		.fusion-header, .fusion-secondary-header {border-top:none;}
		.fusion-header-v1 .fusion-header, .fusion-secondary-main-menu {border:none;}

		<?php 
    if (fusion_get_option('layout', 'page_bg_layout', $c_pageID) == 'boxed') {
        ?>
		<?php 
        if ($site_width_percent) {
            ?>
		.fusion-header-wrapper{position: absolute;width:<?php 
            echo $smof_data['site_width'];
            ?>
;z-index: 10000;}
		<?php 
        } else {
            ?>
		.fusion-header-wrapper{position: absolute;width: <?php 
            echo $site_width + 60;
            ?>
px;z-index: 10000;}
开发者ID:mathewdenis,项目名称:avada,代码行数:31,代码来源:dynamic_css.php

示例5: avada_dynamic_css_array


//.........这里部分代码省略.........
        $header_bg_color_rgb = fusion_hex2rgb(Avada()->settings->get('menu_h45_bg_color'));
        if (Avada()->settings->get('menu_h45_bg_color')) {
            $css['global']['.fusion-secondary-main-menu']['background-color'] = Avada_Sanitize::color(Avada()->settings->get('menu_h45_bg_color'), Avada()->settings->get_default('menu_h45_bg_color'));
            if (!is_archive() || function_exists('is_shop') && is_shop()) {
                $css['global']['.fusion-secondary-main-menu']['background-color'] = Avada_Sanitize::color('rgba(' . $header_bg_color_rgb[0] . ',' . $header_bg_color_rgb[1] . ',' . $header_bg_color_rgb[2] . ',' . $header_bg_opacity . ')');
            }
        }
    }
    $elements = array('.fusion-header', '#side-header');
    if (get_post_meta($c_pageID, 'pyre_header_bg', true)) {
        $css['global'][avada_implode($elements)]['background-image'] = 'url("' . Avada_Sanitize::css_asset_url(get_post_meta($c_pageID, 'pyre_header_bg', true)) . '")';
        if (in_array(get_post_meta($c_pageID, 'pyre_header_bg_repeat', true), array('repeat-y', 'no-repeat'))) {
            $css['global'][avada_implode($elements)]['background-position'] = 'center center';
        }
        $css['global'][avada_implode($elements)]['background-repeat'] = get_post_meta($c_pageID, 'pyre_header_bg_repeat', true);
        if ('yes' == get_post_meta($c_pageID, 'pyre_header_bg_full', true)) {
            if ('Top' == Avada()->settings->get('header_position')) {
                $css['global'][avada_implode($elements)]['background-attachment'] = 'fixed';
            }
            $css['global'][avada_implode($elements)]['background-position'] = 'center center';
            $css['global'][avada_implode($elements)]['background-size'] = 'cover';
        }
        if (Avada()->settings->get('header_bg_parallax') && 'Top' == Avada()->settings->get('header_position')) {
            $css['global'][avada_implode($elements)]['background-attachment'] = 'fixed';
            $css['global'][avada_implode($elements)]['background-position'] = 'top center';
        }
    }
    if ((1 > Avada()->settings->get('header_bg_color', 'opacity') && !get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) || '' != get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) && 1 > get_post_meta($c_pageID, 'pyre_header_bg_opacity', true)) && !is_search() && !is_404() && !is_author() && (!is_archive() || class_exists('WooCommerce') && is_shop())) {
        $media_query = '@media only screen and (min-width: 800px)';
        $elements = array('.fusion-header', '.fusion-secondary-header');
        $css['global'][avada_implode($elements)]['border-top'] = 'none';
        $elements = array('.fusion-header-v1 .fusion-header', '.fusion-secondary-main-menu');
        $css['global'][avada_implode($elements)]['border'] = 'none';
        if ('boxed' == fusion_get_option('layout', 'page_bg_layout', $c_pageID)) {
            $css['global']['.fusion-header-wrapper']['position'] = 'absolute';
            $css['global']['.fusion-header-wrapper']['z-index'] = '10000';
            if ($site_width_percent) {
                $css['global']['.fusion-header-wrapper']['width'] = $site_width_with_units;
            } else {
                $css['global']['.fusion-header-wrapper']['width'] = $site_width + 60 . 'px';
            }
        } else {
            $css['global']['.fusion-header-wrapper']['position'] = 'absolute';
            $css['global']['.fusion-header-wrapper']['left'] = '0';
            $css['global']['.fusion-header-wrapper']['right'] = '0';
            $css['global']['.fusion-header-wrapper']['z-index'] = '10000';
        }
    }
    /**
     * If the header opacity is < 1, then do not display the header background image.
     */
    if ('' != get_post_meta($c_pageID, 'pyre_header_bg_opacity', true)) {
        $header_bg_opacity = get_post_meta($c_pageID, 'pyre_header_bg_opacity', true);
    } elseif (Avada()->settings->get('header_bg_color')) {
        $header_bg_opacity = Avada()->settings->get('header_bg_color', 'opacity');
    } else {
        $header_bg_opacity = 1;
    }
    if (1 > $header_bg_opacity) {
        $elements = array('.fusion-header', '#side-header');
        $css['global'][avada_implode($elements)]['background-image'] = '';
    }
    if ('no' == get_post_meta($c_pageID, 'pyre_avada_rev_styles', true) || !Avada()->settings->get('avada_rev_styles') && 'yes' != get_post_meta($c_pageID, 'pyre_avada_rev_styles', true)) {
        $css['global']['.rev_slider_wrapper']['position'] = 'relative';
        if (class_exists('RevSliderFront')) {
            if ('1' == Avada()->settings->get('header_bg_color', 'opacity') && !get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) || get_post_meta($c_pageID, 'pyre_header_bg_opacity', true) && 1 == get_post_meta($c_pageID, 'pyre_header_bg_opacity', true)) {
开发者ID:rvelezc,项目名称:drpelaezgo.com,代码行数:67,代码来源:dynamic_css.php

示例6: str_replace

     */
    $current_page_template = str_replace('.php', '', get_page_template_slug($current_page_id));
    ?>

	<?php 
    /**
     * Get the number of columns
     */
    $current_page_columns = avada_get_portfolio_columns($current_page_template);
    ?>

	<?php 
    /**
     * Get the boxed/unboxed setting for text layouts
     */
    $current_page_text_layout = strpos($current_page_template, 'text') ? fusion_get_option('portfolio_text_layout', 'portfolio_text_layout', $current_page_id) : 'unboxed';
    ?>

<?php 
}
?>

<?php 
/**
 * Check if we have paged content
 */
if (is_front_page()) {
    $paged = get_query_var('page') ? get_query_var('page') : 1;
} else {
    $paged = get_query_var('paged') ? get_query_var('paged') : 1;
}
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:31,代码来源:portfolio-layout.php

示例7: avada_dynamic_css_array

/**
 * Format of the $css array:
 * $css['media-query']['element']['property'] = value
 *
 * If no media query is required then set it to 'global'
 *
 * If we want to add multiple values for the same property then we have to make it an array like this:
 * $css[media-query][element]['property'][] = value1
 * $css[media-query][element]['property'][] = value2
 *
 * Multiple values defined as an array above will be parsed separately.
 */
function avada_dynamic_css_array()
{
    global $wp_version;
    $c_pageID = Avada::c_pageID();
    $isiPad = (bool) strpos($_SERVER['HTTP_USER_AGENT'], 'iPad');
    $css = array();
    /**
     * An array of all the elements that will be targeted from the body typography settings
     */
    $body_typography_elements = apply_filters('avada_body_typography_elements', avada_get_body_typography_elements());
    /**
     * An array of all the elements that will be targeted from the nav typography settings
     */
    $nav_typography_elements = array('.side-nav li a', '.fusion-main-menu > ul > li > a');
    $nav_typography_elements = avada_implode($nav_typography_elements);
    /**
     * An array of all the elements that will be targeter from the h1_typography settings
     */
    $h1_typography_elements = apply_filters('avada_h1_typography_elements', avada_get_h1_typography_elements());
    /**
     * An array of all the elements that will be targeter from the h2_typography settings
     */
    $h2_typography_elements = apply_filters('avada_h2_typography_elements', avada_get_h2_typography_elements());
    /**
     * An array of all the elements that will be targeter from the h3_typography settings
     */
    $h3_typography_elements = apply_filters('avada_h3_typography_elements', avada_get_h3_typography_elements());
    /**
     * An array of all the elements that will be targeter from the h4_typography settings
     */
    $h4_typography_elements = apply_filters('avada_h4_typography_elements', avada_get_h4_typography_elements());
    /**
     * An array of all the elements that will be targeter from the h5_typography settings
     */
    $h5_typography_elements = apply_filters('avada_h5_typography_elements', avada_get_h5_typography_elements());
    /**
     * An array of all the elements that will be targeter from the h6_typography settings
     */
    $h6_typography_elements = apply_filters('avada_h6_typography_elements', avada_get_h6_typography_elements());
    /**
     * An array of all the elements that will be targeter from the button_typography settings
     */
    $button_typography_elements = apply_filters('avada_button_typography_elements', avada_get_button_typography_elements());
    $footer_headings_typography_elements = array('.fusion-footer-widget-area h3', '.fusion-footer-widget-area .widget-title', '#slidingbar-area h3', '#slidingbar-area .widget-title');
    $footer_headings_typography_elements = avada_implode($footer_headings_typography_elements);
    // Set the correct paddings and negative margins for the "100% Width Left/Right Padding" option
    $hundredplr_padding = Avada_Sanitize::size(fusion_get_option('hundredp_padding', 'hundredp_padding', $c_pageID));
    $hundredplr_padding_value = Avada_Sanitize::number($hundredplr_padding);
    $hundredplr_padding_unit = Avada_Sanitize::get_unit($hundredplr_padding);
    $hundredplr_padding_negative_margin = '-' . $hundredplr_padding_value . $hundredplr_padding_unit;
    if ($hundredplr_padding_unit == '%') {
        $fullwidth_max_width = 100 - 2 * $hundredplr_padding_value;
        $hundredplr_padding_negative_margin = '-' . $hundredplr_padding_value / $fullwidth_max_width * 100 . $hundredplr_padding_unit;
    }
    $link_color_elements = array('body a', 'body a:before', 'body a:after', '.single-navigation a[rel="prev"]:before', '.single-navigation a[rel="next"]:after', '.project-content .project-info .project-info-box a', '.fusion-content-widget-area .widget li a', '.fusion-content-widget-area .widget .recentcomments', '.fusion-content-widget-area .widget_categories li', '#main .post h2 a', '.about-author .title a', '.shop_attributes tr th', '.fusion-rollover a', '.fusion-load-more-button');
    if (class_exists('bbPress')) {
        $link_color_elements[] = '.bbp-forum-header a.bbp-forum-permalink';
        $link_color_elements[] = '.bbp-topic-header a.bbp-topic-permalink';
        $link_color_elements[] = '.bbp-reply-header a.bbp-reply-permalink';
    }
    if (class_exists('WooCommerce')) {
        $link_color_elements[] = '.fusion-woo-featured-products-slider .price .amount';
        //$link_color_elements[] = '.my_account_orders thead tr th';
        //$link_color_elements[] = '.shop_table thead tr th';
        //$link_color_elements[] = '.cart_totals table th';
        //$link_color_elements[] = '.checkout .shop_table tfoot th';
        //$link_color_elements[] = '.checkout .payment_methods label';
        //$link_color_elements[] = '#final-order-details .mini-order-details th';
        $link_color_elements[] = '#main .product .product_title';
        $link_color_elements[] = '.shop_table.order_details tr th';
        $link_color_elements[] = '.widget_layered_nav li.chosen a';
        $link_color_elements[] = '.widget_layered_nav li.chosen a:before';
        $link_color_elements[] = '.widget_layered_nav_filters li.chosen a';
        $link_color_elements[] = '.widget_layered_nav_filters li.chosen a:before';
    }
    if (class_exists('Tribe__Events__Main')) {
        $link_color_elements[] = '#tribe-events-content .tribe-events-sub-nav li a';
        $link_color_elements[] = '.event-is-recurring';
    }
    $link_color_elements = avada_implode($link_color_elements);
    // Is the site width a percent value?
    $site_width_percent = false !== strpos(Avada()->settings->get('site_width'), '%') ? true : false;
    $theme_info = wp_get_theme();
    if ($theme_info->parent_theme) {
        $template_dir = basename(get_template_directory());
        $theme_info = wp_get_theme($template_dir);
    }
    $css['global']['.' . $theme_info->get('Name') . "_" . str_replace('.', '', $theme_info->get('Version'))]['color'] = 'green';
//.........这里部分代码省略.........
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:101,代码来源:dynamic_css.php

示例8: avada_get_page_title_bar_contents

 function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE)
 {
     if ($get_secondary_content) {
         ob_start();
         if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
             if ('Breadcrumbs' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('breadcrumbs', 'default', '')) || 'breadcrumbs' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
                 fusion_breadcrumbs();
             } elseif ('Search Box' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('searchbar', 'default', '')) || 'searchbar' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
                 get_search_form();
             }
         }
         $secondary_content = ob_get_contents();
         ob_get_clean();
     } else {
         $secondary_content = '';
     }
     $title = '';
     $subtitle = '';
     if ('' != get_post_meta($post_id, 'pyre_page_title_custom_text', true)) {
         $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
     }
     if ('' != get_post_meta($post_id, 'pyre_page_title_custom_subheader', true)) {
         $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
     }
     if ('' == get_post_meta($post_id, 'pyre_page_title_text', true) || 'default' == get_post_meta($post_id, 'pyre_page_title_text', true)) {
         $page_title_text = Avada()->settings->get('page_title_bar_text');
     } else {
         $page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true);
     }
     if (!$title) {
         $title = get_the_title();
         if (is_home()) {
             $title = Avada()->settings->get('blog_title');
         }
         if (is_search()) {
             $title = sprintf(__('Search results for: %s', 'Avada'), get_search_query());
         }
         if (is_404()) {
             $title = __('Error 404 Page', 'Avada');
         }
         if (class_exists('Tribe__Events__Main') && (tribe_is_event() && !is_single() && !is_home() || is_events_archive() || is_events_archive() && is_404())) {
             $title = tribe_get_events_title();
         }
         if (is_archive() && !is_bbpress() && !is_search()) {
             if (is_day()) {
                 $title = sprintf(__('Daily Archives: %s', 'Avada'), '<span>' . get_the_date() . '</span>');
             } else {
                 if (is_month()) {
                     $title = sprintf(__('Monthly Archives: %s', 'Avada'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>');
                 } elseif (is_year()) {
                     $title = sprintf(__('Yearly Archives: %s', 'Avada'), '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>');
                 } elseif (is_author()) {
                     $curauth = get_user_by('id', get_query_var('author'));
                     $title = $curauth->nickname;
                 } elseif (is_post_type_archive()) {
                     $title = post_type_archive_title('', false);
                     $sermon_settings = get_option('wpfc_options');
                     if (is_array($sermon_settings)) {
                         $title = $sermon_settings['archive_title'];
                     }
                 } else {
                     $title = single_cat_title('', false);
                 }
             }
         }
         if (class_exists('WooCommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
             if (!is_product()) {
                 $title = woocommerce_page_title(false);
             }
         }
     }
     if (!$subtitle && is_home()) {
         $subtitle = Avada()->settings->get('blog_subtitle');
     }
     if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
         if ('no' == $page_title_text && ('yes' == get_post_meta($post_id, 'pyre_page_title', true) || 'yes_without_bar' == get_post_meta($post_id, 'pyre_page_title', true) || 'hide' != Avada()->settings->get('page_title_bar') && 'no' != get_post_meta($post_id, 'pyre_page_title', true))) {
             $title = '';
             $subtitle = '';
         }
     } else {
         if ('hide' != Avada()->settings->get('page_title_bar') && 'no' == $page_title_text) {
             $title = '';
             $subtitle = '';
         }
     }
     return array($title, $subtitle, $secondary_content);
 }
开发者ID:rvelezc,项目名称:drpelaezgo.com,代码行数:87,代码来源:custom_functions.php

示例9: attr

 function attr()
 {
     global $smof_data;
     if (strpos($smof_data['site_width'], '%') === false && strpos($smof_data['site_width'], 'px') === false) {
         $smof_data['site_width'] = $smof_data['site_width'] . 'px';
     }
     $site_width = (int) $smof_data['site_width'];
     $site_width_percent = false;
     if (strpos($smof_data['site_width'], '%') !== false) {
         $site_width_percent = true;
     }
     $int_left_padding = (int) self::$args['padding_left'];
     $int_right_padding = (int) self::$args['padding_right'];
     $object_id = get_queried_object_id();
     $c_pageID = FusionCore_Plugin::c_pageID();
     $width_100 = false;
     $page_template = '';
     if (function_exists('is_woocommerce')) {
         if (is_woocommerce()) {
             $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID);
             $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : '';
         }
     }
     if (is_page_template('100-width.php') || is_page_template('blank.php') || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) && 'avada_portfolio' == get_post_type($c_pageID)) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true) || '100-width.php' == $page_template) {
         $width_100 = true;
     }
     $attr['class'] = 'fusion-fullwidth fullwidth-box fusion-fullwidth-' . $this->fwc_counter . ' ';
     $attr['style'] = '';
     $attr['class'] .= sprintf(' fusion-parallax-%s', self::$args['background_parallax']);
     if (self::$args['hundred_percent'] == 'yes') {
         $attr['class'] .= ' hundred-percent-fullwidth';
         if ((int) self::$args['padding_left'] > 0 || (int) self::$args['padding_right'] > 0) {
             $attr['class'] .= ' fusion-nonzero-padding';
         }
     } else {
         $attr['class'] .= ' nonhundred-percent-fullwidth';
     }
     if (self::$bg_type == 'video') {
         $attr['class'] .= ' video-background';
     } else {
         if (self::$bg_type == 'faded') {
             $attr['class'] .= ' faded-background';
         }
     }
     if (self::$args['equal_height_columns'] == 'yes') {
         $attr['class'] .= ' fusion-equal-height-columns';
     }
     if (self::$args['border_color']) {
         $attr['style'] .= sprintf('border-color:%s;', self::$args['border_color']);
     }
     if (self::$args['border_size']) {
         $attr['style'] .= sprintf('border-bottom-width: %s;border-top-width: %s;', self::$args['border_size'], self::$args['border_size']);
     }
     if (self::$args['border_style']) {
         $attr['style'] .= sprintf('border-bottom-style: %s;border-top-style: %s;', self::$args['border_style'], self::$args['border_style']);
     }
     if (self::$args['padding_bottom']) {
         $attr['style'] .= sprintf('padding-bottom:%s;', self::$args['padding_bottom']);
     }
     if (self::$args['padding_top']) {
         $attr['style'] .= sprintf('padding-top:%s;', self::$args['padding_top']);
     }
     if (self::$args['padding_left']) {
         $attr['style'] .= sprintf('padding-left:%s;', self::$args['padding_left']);
     }
     if (self::$args['padding_right']) {
         $attr['style'] .= sprintf('padding-right:%s;', self::$args['padding_right']);
     }
     if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_left'] > 0 && $width_100 == true) {
         $attr['style'] .= sprintf('padding-left:%s !important;', self::$args['padding_left']);
     }
     if (self::$args['hundred_percent'] == 'no' && (int) self::$args['padding_right'] > 0 && $width_100 == true) {
         $attr['style'] .= sprintf('padding-right:%s !important;', self::$args['padding_right']);
     }
     if (self::$args['id']) {
         $attr['id'] = self::$args['id'];
     }
     if (self::$args['class']) {
         $attr['class'] .= ' ' . self::$args['class'];
     }
     if (self::$args['background_image'] && self::$args['background_parallax'] == 'fixed') {
         $attr['style'] .= 'background-attachment:fixed;';
     }
     if (self::$args['background_parallax'] == "none" || self::$args['background_parallax'] == "fixed") {
         if (self::$args['background_color']) {
             $attr['style'] .= sprintf('background-color:%s;', self::$args['background_color']);
         }
         if (self::$args['background_image'] && self::$args['background_position']) {
             $attr['style'] .= sprintf('background-position:%s;', self::$args['background_position']);
         }
         if (self::$args['background_image'] && self::$args['background_repeat']) {
             $attr['style'] .= sprintf('background-repeat:%s;', self::$args['background_repeat']);
         }
         if (self::$args['background_image'] && self::$args['background_repeat'] == 'no-repeat') {
             $attr['style'] .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;';
             // IE 8 background-size: cover filter
             if (self::$args['background_image']) {
                 $attr['style'] .= sprintf('-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'%s\', sizingMethod=\'scale\')";', self::$args['background_image']);
             }
         }
//.........这里部分代码省略.........
开发者ID:kevinaxu,项目名称:99boulders,代码行数:101,代码来源:class-fullwidth.php

示例10: avada_get_portfolio_excerpt_length

/**
 * Returns the excerpt length for portfolio posts.
 *
 * @since 4.0.0
 *
 * @param  string	$page_id		The id of the current page or post
 *
 * @return string/boolean The excerpt length for the post; false if full content should be shown
 **/
function avada_get_portfolio_excerpt_length($page_id = '')
{
    $excerpt_length = false;
    if (fusion_get_option('portfolio_content_length', 'portfolio_content_length', $page_id) == 'excerpt') {
        // Determine the correct excerpt length
        if (fusion_get_page_option('portfolio_excerpt', $page_id)) {
            $excerpt_length = fusion_get_page_option('portfolio_excerpt', $page_id);
        } else {
            $excerpt_length = Avada()->settings->get('excerpt_length_portfolio');
        }
    } else {
        if (!$page_id && Avada()->settings->get('portfolio_content_length') == 'Excerpt') {
            $excerpt_length = Avada()->settings->get('excerpt_length_portfolio');
        }
    }
    return $excerpt_length;
}
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:26,代码来源:fusion-functions.php

示例11: get_post_meta

            echo $link_target;
            ?>
><?php 
            echo get_post_meta($post->ID, 'pyre_project_url_text', true);
            ?>
</a></span>
							</div>
						<?php 
        }
        ?>

						<?php 
        if (get_post_meta($post->ID, 'pyre_copy_url', true) && get_post_meta($post->ID, 'pyre_copy_url_text', true)) {
            ?>
							<?php 
            $link_target = in_array(fusion_get_option('portfolio_link_icon_target', 'link_icon_target', $post->ID), array('1', 1, 'yes')) ? ' target="_blank"' : '';
            ?>
							<div class="project-info-box">
								<h4><?php 
            esc_html_e('Copyright:', 'Avada');
            ?>
</h4>
								<span><a href="<?php 
            echo get_post_meta($post->ID, 'pyre_copy_url', true);
            ?>
"<?php 
            echo $link_target;
            ?>
><?php 
            echo get_post_meta($post->ID, 'pyre_copy_url_text', true);
            ?>
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:31,代码来源:single-avada_portfolio.php

示例12: avada_page_title_bar

 /**
  * Render the HTML markup of the page title bar
  * @param  string $title 				Main title; page/post title or custom title set by user
  * @param  string $subtitle 			Subtitle as custom user setting
  * @param  string $secondary_content 	HTML markup of the secondary content; breadcrumbs or search field
  *
  * @return void 						Content is directly echoed
  **/
 function avada_page_title_bar($title, $subtitle, $secondary_content)
 {
     global $smof_data;
     $post_id = get_queried_object_id();
     // Check for the secondary content
     $content_type = 'none';
     if (strpos($secondary_content, 'searchform') !== FALSE) {
         $content_type = 'search';
     } elseif ($secondary_content != '') {
         $content_type = 'breadcrumbs';
     }
     // Check the position of page title
     if (metadata_exists('post', $post_id, 'pyre_page_title_text_alignment') && get_post_meta(get_queried_object_id(), 'pyre_page_title_text_alignment', TRUE) != 'default') {
         $alignment = get_post_meta($post_id, 'pyre_page_title_text_alignment', TRUE);
     } elseif ($smof_data['page_title_alignment']) {
         $alignment = $smof_data['page_title_alignment'];
     }
     // Render the page title bar
     echo sprintf('<div class="fusion-page-title-bar fusion-page-title-bar-%s fusion-page-title-bar-%s">', $content_type, $alignment);
     echo '<div class="fusion-page-title-row">';
     echo '<div class="fusion-page-title-wrapper">';
     echo '<div class="fusion-page-title-captions">';
     if ($title) {
         // Add entry-title for rich snippets
         $entry_title_class = '';
         if (!$smof_data['disable_date_rich_snippet_pages']) {
             $entry_title_class = ' class="entry-title"';
         }
         echo sprintf('<h1%s>%s</h1>', $entry_title_class, $title);
         if ($subtitle) {
             echo sprintf('<h3>%s</h3>', $subtitle);
         }
     }
     // Render secondary content on center layout
     if ($alignment == 'center') {
         if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
             echo '<div class="fusion-page-title-secondary">';
             echo $secondary_content;
             echo '</div>';
         }
     }
     echo '</div>';
     // Render secondary content on left/right layout
     if ($alignment != 'center') {
         if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
             echo '<div class="fusion-page-title-secondary">';
             echo $secondary_content;
             echo '</div>';
         }
     }
     echo '</div>';
     echo '</div>';
     echo '</div>';
 }
开发者ID:mathewdenis,项目名称:avada,代码行数:62,代码来源:avada-functions.php

示例13: avada_render_related_posts

 /**
  * Render related posts carousel
  * @param  string $post_type         The post type to determine correct related posts and headings
  *
  * @return string                    HTML markup to display related posts
  **/
 function avada_render_related_posts($post_type = 'post')
 {
     $html = '';
     // Set the needed variables according to post type
     if ($post_type == 'post') {
         $theme_option_name = 'related_posts';
         $main_heading = esc_html__('Related Posts', 'Avada');
     } elseif ($post_type == 'avada_portfolio') {
         $theme_option_name = 'portfolio_related_posts';
         $main_heading = esc_html__('Related Projects', 'Avada');
     } elseif ($post_type == 'avada_faq') {
         $theme_option_name = 'faq_related_posts';
         $main_heading = esc_html__('Related Faqs', 'Avada');
     }
     // Check if related posts should be shown
     if (isset($theme_option_name) && ('yes' == fusion_get_option($theme_option_name, 'related_posts', get_the_ID()) || '1' == fusion_get_option($theme_option_name, 'related_posts', get_the_ID())) || 'faq_related_posts' == $theme_option_name) {
         $number_related_posts = Avada()->settings->get('number_related_posts');
         $number_related_posts = '0' == $number_related_posts ? '-1' : $number_related_posts;
         if ('post' == $post_type) {
             $related_posts = fusion_get_related_posts(get_the_ID(), $number_related_posts);
         } else {
             $related_posts = fusion_get_custom_posttype_related_posts(get_the_ID(), $number_related_posts, $post_type);
         }
         // If there are related posts, display them
         if (isset($related_posts) && $related_posts->have_posts()) {
             ob_start();
             include locate_template('templates/related-posts.php');
             $html .= ob_get_clean();
         }
     }
     return $html;
 }
开发者ID:pedrom40,项目名称:sazoo.org,代码行数:38,代码来源:avada-functions.php

示例14: get_post_custom_values

		<?php 
}
?>
		<?php 
$main_css = '';
$row_css = '';
$main_class = '';
$page_template = '';
if (function_exists('is_woocommerce') && is_woocommerce()) {
    $custom_fields = get_post_custom_values('_wp_page_template', $c_pageID);
    $page_template = is_array($custom_fields) && !empty($custom_fields) ? $custom_fields[0] : '';
}
if (get_post_type($c_pageID) == 'tribe_events' && tribe_get_option('tribeEventsTemplate', 'default') == '100-width.php') {
    $page_template = '100-width.php';
}
if (is_page_template('100-width.php') || is_page_template('blank.php') || '100-width.php' == $page_template || ('1' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('portfolio_width_100', 'portfolio_width_100', $c_pageID)) && 'avada_portfolio' == get_post_type($c_pageID) || ('1' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID) || 'yes' == fusion_get_option('blog_width_100', 'portfolio_width_100', $c_pageID)) && 'post' == get_post_type($c_pageID) || 'yes' == fusion_get_page_option('portfolio_width_100', $c_pageID) && ('post' != get_post_type($c_pageID) && 'avada_portfolio' != get_post_type($c_pageID)) || avada_is_portfolio_template() && 'yes' == get_post_meta($c_pageID, 'pyre_portfolio_width_100', true)) {
    $main_css = 'padding-left:0px;padding-right:0px;';
    if (Avada()->settings->get('hundredp_padding') && !get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) {
        $main_css = 'padding-left:' . Avada()->settings->get('hundredp_padding') . ';padding-right:' . Avada()->settings->get('hundredp_padding');
    }
    if (get_post_meta($c_pageID, 'pyre_hundredp_padding', true)) {
        $main_css = 'padding-left:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true) . ';padding-right:' . get_post_meta($c_pageID, 'pyre_hundredp_padding', true);
    }
    $row_css = 'max-width:100%;';
    $main_class = 'width-100';
}
do_action('avada_before_main_container');
?>
		<div id="main" class="clearfix <?php 
echo $main_class;
?>
开发者ID:sdxlgc,项目名称:net-wp_sdgcxl-htdocs,代码行数:31,代码来源:header.php

示例15: fusion_get_post_content

 /**
  * Return the post content, either excerpted or in full length
  * @param  string	$page_id		The id of the current page or post
  * @param  string 	$excerpt		Can be either 'blog' (for main blog page), 'portfolio' (for portfolio page template) or 'yes' (for shortcodes)
  * @param  integer	$excerpt_length Length of the excerpts
  * @param  boolean	$strip_html		Can be used by shortcodes for a custom strip html setting
  *
  * @return string Post content
  **/
 function fusion_get_post_content($page_id = '', $excerpt = 'blog', $excerpt_length = 55, $strip_html = FALSE)
 {
     global $smof_data;
     $content_excerpted = FALSE;
     // Main blog page
     if ($excerpt == 'blog') {
         // Check if the content should be excerpted
         if (strtolower(fusion_get_theme_option('content_length')) == 'excerpt') {
             $content_excerpted = TRUE;
             // Get the excerpt length
             $excerpt_length = fusion_get_theme_option('excerpt_length_blog');
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Portfolio page templates
     } elseif ($excerpt == 'portfolio') {
         // Check if the content should be excerpted
         if (fusion_get_option('portfolio_content_length', 'portfolio_content_length', $page_id) == 'excerpt') {
             $content_excerpted = TRUE;
             // Determine the correct excerpt length
             if (fusion_get_page_option('portfolio_excerpt', $page_id)) {
                 $excerpt_length = fusion_get_page_option('portfolio_excerpt', $page_id);
             } else {
                 $excerpt_length = fusion_get_theme_option('excerpt_length_portfolio');
             }
         }
         // Check if HTML should be stripped from contant
         if (fusion_get_theme_option('portfolio_strip_html_excerpt')) {
             $strip_html = TRUE;
         }
         // Shortcodes
     } elseif ($excerpt == 'yes') {
         $content_excerpted = TRUE;
     }
     // Return excerpted content
     if ($content_excerpted) {
         $stripped_content = fusion_get_post_content_excerpt($excerpt_length, $strip_html);
         return $stripped_content;
         // Return full content
     } else {
         ob_start();
         the_content();
         return ob_get_clean();
     }
 }
开发者ID:mathewdenis,项目名称:avada,代码行数:56,代码来源:fusion-functions.php


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