本文整理汇总了PHP中sf_theme_supports函数的典型用法代码示例。如果您正苦于以下问题:PHP sf_theme_supports函数的具体用法?PHP sf_theme_supports怎么用?PHP sf_theme_supports使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sf_theme_supports函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: get_template_directory_uri
/css/iconfont.css" rel="stylesheet" type="text/css"/>
<?php
}
?>
<?php
if (sf_theme_supports('icon-mind-font')) {
?>
<link href="<?php
echo get_template_directory_uri();
?>
/css/iconmind.css" rel="stylesheet" type="text/css"/>
<?php
}
?>
<?php
if (sf_theme_supports('gizmo-icon-font')) {
?>
<link href="<?php
echo get_template_directory_uri();
?>
/css/ss-gizmo.css" rel="stylesheet" type="text/css"/>
<?php
}
?>
<link href="<?php
echo get_template_directory_uri();
?>
/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php
echo $fontello_icons_path;
开发者ID:arobbins,项目名称:spellestate,代码行数:31,代码来源:sf-interface.php
示例2: sf_page_heading
//.........这里部分代码省略.........
$show_page_title = $default_show_page_heading;
}
if ($page_title == "") {
$page_title = get_the_title();
}
if ($page_title_height == "") {
$page_title_height = apply_filters('sf_shop_fancy_page_height', 300);
}
// Fancy heading image
if (($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") && $fancy_title_image_url == "") {
foreach ($fancy_title_image as $detail_image) {
if (isset($detail_image['url'])) {
$fancy_title_image_url = $detail_image['url'];
break;
}
}
if (!$fancy_title_image) {
$fancy_title_image = get_post_thumbnail_id();
$fancy_title_image_url = wp_get_attachment_url($fancy_title_image, 'full');
}
}
// Page Title Hidden
if (!$show_page_title) {
$page_heading_el_class = "page-heading-hidden";
}
// Breadcrumb in heading
if ($breadcrumb_in_heading) {
$page_heading_el_class .= " page-heading-breadcrumbs";
}
if ($page_title_style == "fancy-tabbed") {
$page_title_text_align = "left";
}
// Return if product & inner heading
if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && ($page_title_style == "standard" || $page_title_style == "")) {
return;
}
// Dont' allow fancy-tabbed on product pages
if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") {
$page_title_style = "fancy";
}
if ($page_title_style == "fancy" && sf_theme_opts_name() == "sf_atelier_options" && !(function_exists('is_product') && is_product())) {
$extra_styles = 'height: ' . $page_title_height . 'px;';
}
if (isset($sf_options['minimal_checkout'])) {
if (function_exists('is_checkout') && is_checkout()) {
global $woocommerce;
if ($sf_options['minimal_checkout']) {
?>
<div class="minimal-checkout-return container"><a href="<?php
echo esc_url($woocommerce->cart->get_cart_url());
?>
"><?php
_e("Return to cart", "swiftframework");
?>
</a></div>
<?php
}
}
}
if (!is_home()) {
?>
<?php
if ($page_title_style == "fancy" || $page_title_style == "fancy-tabbed") {
?>
开发者ID:Infernosaint,项目名称:WPSetupTest2,代码行数:67,代码来源:sf-page-heading.php
示例3: content
//.........这里部分代码省略.........
if ($custom_excerpt != "") {
$member_bio = sf_custom_excerpt($custom_excerpt, 1000);
} else {
$member_bio = apply_filters('the_content', get_the_content(''));
}
}
$member_email = sf_get_post_meta($postID, 'sf_team_member_email', true);
$member_phone = sf_get_post_meta($postID, 'sf_team_member_phone_number', true);
$member_twitter = sf_get_post_meta($postID, 'sf_team_member_twitter', true);
$member_facebook = sf_get_post_meta($postID, 'sf_team_member_facebook', true);
$member_linkedin = sf_get_post_meta($postID, 'sf_team_member_linkedin', true);
$member_google_plus = sf_get_post_meta($postID, 'sf_team_member_google_plus', true);
$member_skype = sf_get_post_meta($postID, 'sf_team_member_skype', true);
$member_instagram = sf_get_post_meta($postID, 'sf_team_member_instagram', true);
$member_dribbble = sf_get_post_meta($postID, 'sf_team_member_dribbble', true);
$view_profile_text = __("View Profile", 'swift-framework-plugin');
$thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
$item_icon = apply_filters('sf_team_hover_icon', "fa-pencil");
$item_svg_icon = apply_filters('sf_team_hover_svg_icon', "");
$thumb_img_url = "";
foreach ($thumb_image as $detail_image) {
$thumb_image_id = $detail_image['ID'];
$thumb_img_url = $detail_image['url'];
break;
}
if (!$thumb_image) {
$thumb_image = get_post_thumbnail_id();
$thumb_image_id = $thumb_image;
$thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
}
$image = sf_aq_resize($thumb_img_url, $image_width, $image_height, true, false);
// Output
$items .= '<div itemscope data-id="id-' . $count . '" class="clearfix team-member ' . $item_class . '">';
if (sf_theme_supports('minimal-team-hover')) {
$items .= '<div class="team-member-item-wrap">';
}
$items .= '<figure class="animated-overlay">';
if (sf_theme_supports('minimal-team-hover') && $display_type != "gallery") {
$items .= '<a class="team-member-link ' . $team_member_link_class . '" href="' . get_permalink() . '" data-id="' . $postID . '"></a>';
}
if ($display_type == "gallery") {
$items .= '<a class="team-gallery-mobile-link" href="' . get_permalink() . '" class="' . $team_member_link_class . '" data-id="' . $postID . '"></a>';
}
if ($image) {
$items .= '<img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $member_name . '" />';
}
$items .= '<figcaption class="team-' . $display_type . '">';
if (sf_theme_supports('minimal-team-hover') && $display_type != "gallery") {
$items .= '<div class="thumb-info thumb-info-alt">';
if ($item_svg_icon != "") {
$items .= $item_svg_icon;
} else {
$items .= '<i class="' . $item_icon . '"></i>';
}
$items .= '</div>';
} else {
$items .= '<div class="thumb-info">';
if ($display_type == "gallery") {
if ($profile_link == "yes") {
$items .= '<h4 class="team-member-name"><a href="' . get_permalink() . '" class="' . $team_member_link_class . '" data-id="' . $postID . '">' . $member_name . '</a></h4>';
} else {
$items .= '<h4 class="team-member-name">' . $member_name . '</h4>';
}
$items .= '<h5 class="team-member-position">' . $member_position . '</h5>';
$items .= '<div class="name-divide"></div>';
}
开发者ID:arobbins,项目名称:spellestate,代码行数:67,代码来源:team.php
示例4: sf_nextprev_navigation
function sf_nextprev_navigation()
{
global $sf_options;
// Pagiantion style
$pagination_style = "standard";
if (isset($sf_options['pagination_style'])) {
$pagination_style = $sf_options['pagination_style'];
}
// Portfolio category navigation
$enable_category_navigation = $sf_options['enable_category_navigation'];
if (!(is_singular('post') || is_singular('portfolio') || is_singular('product')) || $pagination_style != "fs-arrow" || !sf_theme_supports('fullscreen-pagination')) {
return;
}
$taxonomy = "category";
if (is_singular('portfolio')) {
$taxonomy = "portfolio-category";
} else {
if (is_singular('product')) {
$taxonomy = "product_cat";
}
}
// Get next/prev post
$prev_post = get_next_post($enable_category_navigation, '', $taxonomy);
$next_post = get_previous_post($enable_category_navigation, '', $taxonomy);
$sf_prev_icon = apply_filters('sf_prev_icon', '<i class="ss-navigateleft"></i>');
$sf_next_icon = apply_filters('sf_next_icon', '<i class="ss-navigateright"></i>');
if (!empty($prev_post)) {
$postID = $prev_post->ID;
$prev_permalink = get_permalink($postID);
$item_subtitle = sf_get_post_meta($postID, 'sf_portfolio_subtitle', true);
$use_thumb_content = sf_get_post_meta($postID, 'sf_thumbnail_content_main_detail', true);
$image = $media_image_url = $image_id = "";
if ($use_thumb_content) {
$media_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full', $postID);
} else {
$media_image = rwmb_meta('sf_detail_image', 'type=image&size=full', $postID);
}
foreach ($media_image as $detail_image) {
$image_id = $detail_image['ID'];
$media_image_url = $detail_image['url'];
break;
}
if (!$media_image) {
$media_image = get_post_thumbnail_id($postID);
$image_id = $media_image;
$media_image_url = wp_get_attachment_url($media_image, 'full');
}
$detail_image = sf_aq_resize($media_image_url, 80, 80, true, false);
$image_alt = sf_get_post_meta($image_id, '_wp_attachment_image_alt', true);
if ($detail_image) {
$image = '<img itemprop="image" src="' . $detail_image[0] . '" width="' . $detail_image[1] . '" height="' . $detail_image[2] . '" alt="' . $image_alt . '" />';
}
?>
<?php
if ($image != "") {
?>
<div id="prev-article-pagination" class="window-arrow-nav prev-item has-img">
<?php
} else {
?>
<div id="prev-article-pagination" class="window-arrow-nav prev-item">
<?php
}
?>
<a href="<?php
echo esc_url($prev_permalink);
?>
">
<div class="nav-transition">
<div class="overlay-wrap">
<?php
echo esc_html($sf_prev_icon);
?>
<?php
if ($image != "") {
?>
<figure class="pagination-article-image">
<?php
echo esc_html($image);
?>
</figure>
<?php
}
?>
</div>
</div>
<?php
if ($item_subtitle != "") {
?>
<div class="pagination-article-details has-subtitle">
<h5><?php
echo esc_attr($prev_post->post_title);
?>
</h5>
<p><?php
echo esc_attr($item_subtitle);
?>
//.........这里部分代码省略.........
开发者ID:shimion,项目名称:wishlistshimion,代码行数:101,代码来源:sf-theme-functions.php
示例5: start_el
//.........这里部分代码省略.........
<p class="field-custom description description-wide">
<label
for="edit-menu-loggedoutvis-<?php
echo esc_attr($item_id);
?>
"><?php
_e('Visible only when logged out', 'swiftframework');
?>
<input type="checkbox" id="edit-menu-loggedoutvis-<?php
echo esc_attr($item_id);
?>
"
class="edit-menu-item-custom" id="menu-loggedoutvis[<?php
echo esc_attr($item_id);
?>
]"
name="menu-loggedoutvis[<?php
echo esc_attr($item_id);
?>
]"
value="1" <?php
echo checked(!empty($item->loggedoutvis), 1, false);
?>
/>
</label>
</p>
<?php
if ($depth == 0) {
?>
<?php
if (sf_theme_supports('menu-new-badge')) {
?>
<p class="field-custom description description-wide">
<label
for="edit-menu-newbadge-<?php
echo esc_attr($item_id);
?>
"><?php
_e('New Badge', 'swiftframework');
?>
<input type="checkbox" id="edit-menu-newbadge-<?php
echo esc_attr($item_id);
?>
"
class="edit-menu-item-custom" id="menu-newbadge[<?php
echo esc_attr($item_id);
?>
]"
name="menu-newbadge[<?php
echo esc_attr($item_id);
?>
]"
value="1" <?php
echo checked(!empty($item->newbadge), 1, false);
?>
/>
</label>
</p>
<?php
}
?>
开发者ID:shimion,项目名称:wishlistshimion,代码行数:67,代码来源:edit_custom_walker.php
示例6: sf_mobile_header
function sf_mobile_header()
{
global $woocommerce, $sf_options;
$mobile_header_layout = $sf_options['mobile_header_layout'];
$mobile_top_text = __($sf_options['mobile_top_text'], 'swiftframework');
$mobile_menu_icon = apply_filters('sf_mobile_menu_icon', '<span class="menu-bars"></span>');
$mobile_cart_icon = apply_filters('sf_mobile_cart_icon', '<i class="ss-cart"></i>');
$mobile_show_cart = $sf_options['mobile_show_cart'];
$mobile_header_class = "";
$mobile_header_output = "";
if (sf_theme_supports('hamburger-css')) {
$mobile_menu_type = "slideout";
$hamburger_class = 'hamburger--3dx';
if (isset($sf_options['mobile_menu_type'])) {
$mobile_menu_type = $sf_options['mobile_menu_type'];
}
if ($mobile_menu_type == "overlay") {
$hamburger_class = 'hamburger--3dy';
}
$mobile_menu_link = '<button class="hamburger mobile-menu-link ' . $hamburger_class . '" type="button">
<span class="hamburger-box">
<span class="hamburger-inner"></span>
</span>
</button>';
} else {
$mobile_menu_link = '<a href="#" class="mobile-menu-link menu-bars-link">' . $mobile_menu_icon . '</a>';
}
$mobile_cart_link = '<a href="#" class="mobile-cart-link">' . $mobile_cart_icon . '</a>';
if (sf_theme_opts_name() == "sf_atelier_options" || sf_theme_opts_name() == "sf_uplift_options") {
$mobile_cart_link = '<nav class="std-menu float-alt-menu">' . "\n";
$mobile_cart_link .= '<ul class="menu">' . "\n";
$mobile_cart_link .= sf_get_cart();
$mobile_cart_link .= '</ul>' . "\n";
$mobile_cart_link .= '</nav>' . "\n";
}
if ($mobile_top_text != "") {
$mobile_header_output .= '<div id="mobile-top-text">' . do_shortcode($mobile_top_text) . '</div>';
}
$mobile_header_output .= '<header id="mobile-header" class="mobile-' . $mobile_header_layout . ' clearfix">' . "\n";
if ($mobile_header_layout == "right-logo") {
$mobile_header_output .= '<div class="mobile-header-opts">';
$mobile_header_output .= $mobile_menu_link . "\n";
if ($mobile_show_cart && $woocommerce != "") {
$mobile_header_output .= $mobile_cart_link . "\n";
}
$mobile_header_output .= '</div>';
$mobile_header_output .= sf_logo('logo-right', 'mobile-logo');
} else {
if ($mobile_header_layout == "center-logo") {
$mobile_header_output .= '<div class="mobile-header-opts opts-left">';
$mobile_header_output .= $mobile_menu_link . "\n";
$mobile_header_output .= '</div>';
$mobile_header_output .= sf_logo('logo-center', 'mobile-logo');
$mobile_header_output .= '<div class="mobile-header-opts opts-right">';
if ($mobile_show_cart && $woocommerce != "") {
$mobile_header_output .= $mobile_cart_link . "\n";
}
$mobile_header_output .= '</div>';
} else {
if ($mobile_header_layout == "center-logo-alt") {
$mobile_header_output .= '<div class="mobile-header-opts opts-left">';
if ($mobile_show_cart && $woocommerce != "") {
$mobile_header_output .= $mobile_cart_link . "\n";
}
$mobile_header_output .= '</div>';
$mobile_header_output .= sf_logo('logo-center', 'mobile-logo');
$mobile_header_output .= '<div class="mobile-header-opts opts-right">';
$mobile_header_output .= $mobile_menu_link . "\n";
$mobile_header_output .= '</div>';
} else {
$mobile_header_output .= sf_logo('logo-left', 'mobile-logo');
$mobile_header_output .= '<div class="mobile-header-opts">';
$mobile_header_output .= $mobile_menu_link . "\n";
if ($mobile_show_cart && $woocommerce != "") {
$mobile_header_output .= $mobile_cart_link . "\n";
}
$mobile_header_output .= '</div>';
}
}
}
$mobile_header_output .= '</header>' . "\n";
echo $mobile_header_output;
}
开发者ID:arobbins,项目名称:spellestate,代码行数:83,代码来源:sf-header.php
示例7: sf_page_classes
//.........这里部分代码省略.........
$page_class .= "page-transitions page-transition-" . $page_transition . " ";
if ($page_transition == "loading-bar") {
$page_class .= "loading-bar-transition ";
}
}
// Page Style
if ($page_design_style != "") {
$page_class .= $page_design_style . ' ';
}
// Header Shadow
if ($enable_header_shadow) {
$page_class .= "header-shadow ";
}
// Product Shadow
if ($product_image_shadows) {
$page_class .= "product-shadows ";
}
// Page Header Type
if ($page_header_type != "") {
$page_class .= 'header-' . $page_header_type . ' ';
}
// Page Header Logo
if ($page_header_alt_logo) {
$page_class .= 'logo-alt-version ';
}
if (is_singular('post') && $post) {
$post_header_type = sf_get_post_meta($post->ID, 'sf_page_header_type', true);
$fw_media_display = sf_get_post_meta($post->ID, 'sf_fw_media_display', true);
$page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
if ($page_title_style == "fancy" || $fw_media_display == "fw-media-title" || $fw_media_display == "fw-media") {
$page_class .= 'header-' . $post_header_type . ' ';
}
}
if (function_exists('is_product') && is_product()) {
$product_layout = sf_get_post_meta($post->ID, 'sf_product_layout', true);
$page_class .= 'product-' . $product_layout . ' ';
}
// Layout
if (isset($_GET['layout'])) {
$page_layout = $_GET['layout'];
}
$page_class .= "layout-" . $page_layout . " ";
// Article Swipe
if ($enable_articleswipe) {
$page_class .= 'article-swipe ';
}
if ($home_preloader && (is_home() || is_front_page()) && !is_paged()) {
$page_class .= 'sf-preloader ';
}
if ($enable_newsletter_sub_bar && (is_home() || is_front_page()) && !is_paged() || $enable_newsletter_sub_bar_page) {
$page_class .= 'has-newsletter-bar ';
}
// Page Heading
if ($post && is_singular()) {
$show_page_title = sf_get_post_meta($post->ID, 'sf_page_title', true);
$remove_breadcrumbs = sf_get_post_meta($post->ID, 'sf_no_breadcrumbs', true);
$page_title_style = sf_get_post_meta($post->ID, 'sf_page_title_style', true);
if (function_exists('is_product') && is_product() && sf_theme_supports('product-inner-heading') && $page_title_style == "fancy-tabbed") {
$page_title_style = "fancy";
}
if ($show_page_title) {
$page_class .= 'page-heading-' . $page_title_style . ' ';
}
}
$shop_page = false;
if (function_exists('is_shop') && is_shop() || function_exists('is_product_category') && is_product_category()) {
$shop_page = true;
}
if ($shop_page) {
$show_page_title = $sf_options['woo_show_page_heading'];
$page_title_style = $sf_options['woo_page_heading_style'];
if ($show_page_title) {
$page_class .= 'page-heading-' . $page_title_style . ' ';
}
}
if (sf_woocommerce_activated()) {
if (isset($sf_options['shop_icon_style'])) {
$shop_icon_style = $sf_options['shop_icon_style'];
}
$page_class .= 'shop-icon-' . $shop_icon_style . ' ';
if (isset($sf_options['minimal_checkout'])) {
if ($sf_options['minimal_checkout']) {
$page_class .= 'minimal-checkout ';
}
}
}
if ($sf_options['disable_mobile_animations']) {
$page_class .= "disable-mobile-animations ";
}
$global_filters = false;
if (isset($sf_options['enable_woo_global_filters'])) {
$global_filters = $sf_options['enable_woo_global_filters'];
if ($global_filters) {
$page_class .= 'woo-global-filters-enabled ';
}
}
// Return array of classes
$class_array = array("page-layout" => $page_layout, "page" => $page_class, "header-layout" => $header_layout, "header-wrap" => $header_wrap_class, "logo" => $logo_class, "search-type" => $header_search_type);
return $class_array;
}
开发者ID:brycefrees,项目名称:DivisionWest,代码行数:101,代码来源:sf-head.php
示例8: sf_portfolio_thumbnail
//.........这里部分代码省略.........
}
foreach ($thumb_image as $detail_image) {
$thumb_image_id = $detail_image['ID'];
$thumb_img_url = $detail_image['url'];
break;
}
if (!$thumb_image) {
$thumb_image = get_post_thumbnail_id();
$thumb_image_id = $thumb_image;
$thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
}
$thumb_lightbox_img_url = wp_get_attachment_url($thumb_lightbox_image, 'full');
$image_alt = esc_attr(sf_get_post_meta($thumb_image_id, '_wp_attachment_image_alt', true));
$item_title = get_the_title();
$item_subtitle = sf_get_post_meta($post->ID, 'sf_portfolio_subtitle', true);
$permalink = get_permalink();
$item_link = sf_portfolio_item_link();
$custom_excerpt = sf_get_post_meta($post->ID, 'sf_custom_excerpt', true);
$post_excerpt = '';
if ($custom_excerpt != '') {
$post_excerpt = sf_custom_excerpt($custom_excerpt, $excerpt_length);
} else {
$post_excerpt = sf_excerpt($excerpt_length);
}
if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "multi-size-masonry") {
$portfolio_thumb .= '<figure class="animated-overlay overlay-style">' . "\n";
} else {
$portfolio_thumb .= '<figure class="animated-overlay overlay-alt">' . "\n";
}
if ($thumb_type == "video") {
$video = sf_video_embed($thumb_video, $thumb_width, $video_height);
$portfolio_thumb .= '<div class="video-thumb">' . $video . '</div>';
} else {
if ($thumb_type == "slider") {
$portfolio_thumb .= '<div class="flexslider thumb-slider"><ul class="slides">' . "\n";
foreach ($thumb_gallery as $image) {
$portfolio_thumb .= "<li><a " . $item_link['config'] . "><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a></li>" . "\n";
}
$portfolio_thumb .= '</ul></div>' . "\n";
} else {
if ($thumb_type == "image" && $thumb_img_url == "") {
$thumb_img_url = "default";
}
$image = sf_aq_resize($thumb_img_url, $thumb_width, $thumb_height, true, false);
if ($image) {
$portfolio_thumb .= '<a ' . $item_link['config'] . '></a>';
if ($display_type == "multi-size-masonry") {
$portfolio_thumb .= '<div class="multi-masonry-img-wrap"><img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" /></div>' . "\n";
} else {
$portfolio_thumb .= '<div class="img-wrap"><img itemprop="image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $image_alt . '" /></div>' . "\n";
}
$portfolio_thumb .= '<div class="figcaption-wrap"></div>';
if ($item_subtitle != "" && $hover_show_excerpt == "no" && ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "multi-size-masonry")) {
$portfolio_thumb .= '<figcaption ' . $port_hover_style . '><div class="thumb-info">';
} else {
if ($display_type == "standard" || $display_type == "masonry") {
$portfolio_thumb .= '<figcaption ' . $port_hover_style . '><div class="thumb-info thumb-info-alt">';
} else {
if ($hover_show_excerpt == "yes" && ($display_type == "gallery" || $display_type == "masonry-gallery")) {
$portfolio_thumb .= '<figcaption ' . $port_hover_style . '><div class="thumb-info thumb-info-excerpt">';
} else {
$portfolio_thumb .= '<figcaption ' . $port_hover_style . '><div class="thumb-info">';
}
}
}
if ($display_type == "gallery" || $display_type == "masonry-gallery" || $display_type == "multi-size-masonry") {
if ($hover_show_excerpt == "yes") {
$portfolio_thumb .= '<h4 itemprop="name headline" ' . $port_hover_text_style . '>' . $item_title . '</h4>';
if ($post_excerpt != "") {
$portfolio_thumb .= '<div class="name-divide"></div>';
$portfolio_thumb .= '<div itemprop="description" ' . $port_hover_text_style . '>' . $post_excerpt . '</div>';
}
} else {
if (sf_theme_supports('alt-gallery-hover')) {
if ($item_link['svg_icon'] != "") {
$portfolio_thumb .= $item_link['svg_icon'];
} else {
$portfolio_thumb .= '<i class="' . $item_link['icon'] . '"></i>';
}
}
$portfolio_thumb .= '<h4 itemprop="name headline" ' . $port_hover_text_style . '>' . $item_title . '</h4>';
if ($item_subtitle != "") {
$portfolio_thumb .= '<div class="name-divide"></div>';
$portfolio_thumb .= '<h5 itemprop="name alternativeHeadline" ' . $port_hover_text_style . '>' . $item_subtitle . '</h5>';
}
}
} else {
if ($item_link['svg_icon'] != "") {
$portfolio_thumb .= $item_link['svg_icon'];
} else {
$portfolio_thumb .= '<i class="' . $item_link['icon'] . '"></i>';
}
}
$portfolio_thumb .= '</div></figcaption>';
}
}
}
$portfolio_thumb .= '</figure>' . "\n";
return $portfolio_thumb;
}
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:sf-portfolio.php
示例9: sf_mega_menu_add_custom_fields
/**
* Add custom fields to edit menu page
*
* @access public
* @since 1.0
* @return void
*/
function sf_mega_menu_add_custom_fields($item_id, $item, $depth, $args)
{
$built_in_mega = true;
if (sf_theme_supports('max-mega-menu')) {
$built_in_mega = false;
}
$button_colours = array('accent' => __('Accent', 'swiftframework'), 'black' => __('Black', 'swiftframework'), 'white' => __('White', 'swiftframework'), 'blue' => __('Blue', 'swiftframework'), 'grey' => __('Grey', 'swiftframework'), 'lightgrey' => __('Light Grey', 'swiftframework'), 'orange' => __('Orange', 'swiftframework'), 'green' => __('Green', 'swiftframework'), 'pink' => __('Pink', 'swiftframework'), 'gold' => __('Gold', 'swiftframework'), 'purple' => __('Purple', 'swiftframework'), 'midnight' => __('Midnight', 'swiftframework'), 'transparent-light' => __('Transparent - Light', 'swiftframework'), 'transparent-dark' => __('Transparent - Dark', 'swiftframework'));
$button_types = array("standard" => __("Standard", "swiftframework"), "bordered" => __("Bordered", "swiftframework"), "rounded" => __("Rounded", "swiftframework"), "rounded-bordered" => __("Rounded Bordered", "swiftframework"));
$button_colours = apply_filters('sf_menu_button_colours', $button_colours);
$button_types = apply_filters('sf_menu_button_types', $button_types);
?>
<div class="sf-menu-options">
<?php
if ($depth == 0) {
?>
<h4>Mega Menu Options</h4>
<?php
if ($built_in_mega) {
?>
<p class="field-custom description description-wide">
<label
for="edit-menu-megamenu-<?php
echo esc_attr($item_id);
?>
"><?php
_e('Enable Mega Menu', 'swiftframework');
?>
<input type="checkbox" id="edit-menu-megamenu-<?php
echo esc_attr($item_id);
?>
"
class="edit-menu-item-custom" id="menu-megamenu[<?php
echo esc_attr($item_id);
?>
]"
name="menu-megamenu[<?php
echo esc_attr($item_id);
?>
]"
value="1" <?php
echo checked(!empty($item->megamenu), 1, false);
?>
/>
</label>
</p>
<p class="field-custom description description-wide">
<label
for="edit-menu-megamenucols-<?php
echo esc_attr($item_id);
?>
"><?php
_e('Mega Menu Columns', 'swiftframework');
?>
</label>
<select class="fat" id="edit-menu-megamenucols-<?php
echo esc_attr($item_id);
?>
"
name="menu-megamenucols[<?php
echo esc_attr($item_id);
?>
]">
<?php
for ($i = 1; $i <= 6; $i++) {
if ($i == $item->megamenucols) {
echo '<option selected="selected">' . $i . '</option>';
} else {
echo '<option>' . $i . '</option>';
}
}
?>
</select>
</p>
<p class="field-custom description description-wide">
<label
for="edit-menu-is-naturalwidth-<?php
echo esc_attr($item_id);
?>
"><?php
_e('Natural Width Mega Menu', 'swiftframework');
?>
<input type="checkbox" id="edit-menu-is-naturalwidth-<?php
echo esc_attr($item_id);
?>
"
class="edit-menu-item-custom" id="menu-is-naturalwidth[<?php
echo esc_attr($item_id);
?>
]"
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:sf-megamenu.php
示例10: content
protected function content($atts, $content = null)
{
global $sf_options;
$title = $category = $wrap_class = $title_class = $item_class = $width = $el_class = $output = $filter = $items = $el_position = '';
extract(shortcode_atts(array('title' => '', "item_count" => '5', "category" => 'all', 'pagination' => 'no', 'el_position' => '', 'width' => '1/1', 'el_class' => ''), $atts));
$pagination_view_icon = apply_filters('sf_pagination_view_icon', '<i class="sf-icon-quickview"></i>');
// TYPE CHECK
$alt_display = false;
if (sf_theme_supports('spb-port-showcase-alt')) {
$alt_display = true;
}
// CATEGORY SLUG MODIFICATION
if ($category == "All") {
$category = "all";
}
if ($category == "all") {
$category = '';
}
$category_slug = str_replace('_', '-', $category);
global $post, $wp_query;
$categories = explode(",", $category_slug);
$translated_categories = '';
foreach ($categories as $key => $category_slug) {
$category_id_by_slug = get_term_by('slug', $category_slug, 'portfolio-category');
if (isset($category_id_by_slug->term_id)) {
$translated_slug_id = apply_filters('wpml_object_id', $category_id_by_slug->term_id, 'custom taxonomy', true);
$translated_slug = get_term_by('id', $translated_slug_id, 'portfolio-category');
$translated_categories = $translated_categories . ($key < count($categories) - 1 ? $translated_slug->slug . ',' : $translated_slug->slug);
}
}
$portfolio_args = array('post_type' => 'portfolio', 'post_status' => 'publish', 'portfolio-category' => $translated_categories, 'posts_per_page' => $item_count, 'no_found_rows' => 1);
$portfolio_items = new WP_Query($portfolio_args);
// OUTPUT
if ($alt_display == "yes") {
if ($pagination == "yes") {
$wrap_class = "has-pagination ";
}
$title_class = "center-title";
global $sf_carouselID;
if ($sf_carouselID == "") {
$sf_carouselID = 1;
} else {
$sf_carouselID++;
}
$items .= '<div class="port-carousel carousel-wrap">';
$items .= spb_carousel_arrows(true);
$items .= '<div id="carousel-' . $sf_carouselID . '" class="portfolio-showcase carousel-items staged-carousel gutters clearfix" data-columns="5" data-auto="false" data-pagination="' . $pagination . '">';
} else {
$items .= '<div class="portfolio-showcase-wrap"><ul class="portfolio-showcase-items clearfix" data-columns="' . $item_count . '">';
}
while ($portfolio_items->have_posts()) {
$portfolio_items->the_post();
if ($alt_display) {
$items .= '<div itemscope class="clearfix carousel-item portfolio-item gallery-item">';
$items .= sf_portfolio_thumbnail("gallery", "", "1/1", '3', "no", 0, "yes", "yes");
$items .= '</div>';
} else {
$thumb_img_url = "";
$item_title = get_the_title();
$item_subtitle = sf_get_post_meta($post->ID, 'sf_portfolio_subtitle', true);
$thumb_image = rwmb_meta('sf_thumbnail_image', 'type=image&size=full');
foreach ($thumb_image as $detail_image) {
$thumb_img_url = $detail_image['url'];
break;
}
if (!$thumb_image || $thumb_img_url == "") {
$thumb_image = get_post_thumbnail_id();
$thumb_img_url = wp_get_attachment_url($thumb_image, 'full');
}
$item_title = get_the_title();
$permalink = get_permalink();
$item_link = sf_portfolio_item_link();
$items .= '<li itemscope class="clearfix portfolio-item deselected-item ' . $item_class . '">';
// THUMBNAIL MEDIA TYPE SETUP
$image_width = 700;
$image_height = 350;
if ($item_count == "5") {
$image_width = 500;
$image_height = 500;
}
if ($thumb_img_url == "") {
$thumb_img_url = "default";
}
$image = sf_aq_resize($thumb_img_url, $image_width, $image_height, true, false);
if ($image) {
$items .= '<a ' . $item_link['config'] . '>';
$items .= '<img itemprop="image" class="main-image" src="' . $image[0] . '" width="' . $image[1] . '" height="' . $image[2] . '" alt="' . $item_title . '" />';
$items .= '</a>';
}
if ($item_subtitle == "") {
$items .= '<div class="item-info">';
$items .= '<span class="item-title"><a href="' . $permalink . '">' . $item_title . '</a></span>';
$items .= '</div>';
} else {
$items .= '<div class="item-info has-subtitle">';
$items .= '<span class="item-title"><a href="' . $permalink . '">' . $item_title . '</a></span>';
$items .= '<span><a href="' . $permalink . '">' . $item_subtitle . '</a></span>';
$items .= '</div>';
}
$items .= '</li>';
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:spellestate,代码行数:101,代码来源:portfolio-showcase.php
示例11: sf_get_icons_list
function sf_get_icons_list($type = "", $format = "list")
{
// VARIABLES
$icon_list = $fontawesome = $gizmo_list = $nucleo_interface = $nucleo_general = "";
// FONT AWESOME
$fontawesome = array('f26e' => 'fa-500px', 'f042' => 'fa-adjust', 'f170' => 'fa-adn', 'f037' => 'fa-align-center', 'f039' => 'fa-align-justify', 'f036' => 'fa-align-left', 'f038' => 'fa-align-right', 'f270' => 'fa-amazon', 'f0f9' => 'fa-ambulance', 'f2a3' => 'fa-american-sign-language-interpreting', 'f13d' => 'fa-anchor', 'f17b' => 'fa-android', 'f209' => 'fa-angellist', 'f103' => 'fa-angle-double-down', 'f100' => 'fa-angle-double-left', 'f101' => 'fa-angle-double-right', 'f102' => 'fa-angle-double-up', 'f107' => 'fa-angle-down', 'f104' => 'fa-angle-left', 'f105' => 'fa-angle-right', 'f106' => 'fa-angle-up', 'f179' => 'fa-apple', 'f187' => 'fa-archive', 'f1fe' => 'fa-area-chart', 'f0ab' => 'fa-arrow-circle-down', 'f0a8' => 'fa-arrow-circle-left', 'f01a' => 'fa-arrow-circle-o-down', 'f190' => 'fa-arrow-circle-o-left', 'f18e' => 'fa-arrow-circle-o-right', 'f01b' => 'fa-arrow-circle-o-up', 'f0a9' => 'fa-arrow-circle-right', 'f0aa' => 'fa-arrow-circle-up', 'f063' => 'fa-arrow-down', 'f060' => 'fa-arrow-left', 'f061' => 'fa-arrow-right', 'f062' => 'fa-arrow-up', 'f047' => 'fa-arrows', 'f0b2' => 'fa-arrows-alt', 'f07e' => 'fa-arrows-h', 'f07d' => 'fa-arrows-v', 'f2a3' => 'fa-asl-interpreting', 'f2a2' => 'fa-assistive-listening-systems', 'f069' => 'fa-asterisk', 'f1fa' => 'fa-at', 'f29e' => 'fa-audio-description', 'f1b9' => 'fa-automobile', 'f04a' => 'fa-backward', 'f24e' => 'fa-balance-scale', 'f05e' => 'fa-ban', 'f19c' => 'fa-bank', 'f080' => 'fa-bar-chart', 'f080' => 'fa-bar-chart-o', 'f02a' => 'fa-barcode', 'f0c9' => 'fa-bars', 'f244' => 'fa-battery-0', 'f243' => 'fa-battery-1', 'f242' => 'fa-battery-2', 'f241' => 'fa-battery-3', 'f240' => 'fa-battery-4', 'f244' => 'fa-battery-empty', 'f240' => 'fa-battery-full', 'f242' => 'fa-battery-half', 'f243' => 'fa-battery-quarter', 'f241' => 'fa-battery-three-quarters', 'f236' => 'fa-bed', 'f0fc' => 'fa-beer', 'f1b4' => 'fa-behance', 'f1b5' => 'fa-behance-square', 'f0f3' => 'fa-bell', 'f0a2' => 'fa-bell-o', 'f1f6' => 'fa-bell-slash', 'f1f7' => 'fa-bell-slash-o', 'f206' => 'fa-bicycle', 'f1e5' => 'fa-binoculars', 'f1fd' => 'fa-birthday-cake', 'f171' => 'fa-bitbucket', 'f172' => 'fa-bitbucket-square', 'f15a' => 'fa-bitcoin', 'f27e' => 'fa-black-tie', 'f29d' => 'fa-blind', 'f293' => 'fa-bluetooth', 'f294' => 'fa-bluetooth-b', 'f032' => 'fa-bold', 'f0e7' => 'fa-bolt', 'f1e2' => 'fa-bomb', 'f02d' => 'fa-book', 'f02e' => 'fa-bookmark', 'f097' => 'fa-bookmark-o', 'f2a1' => 'fa-braille', 'f0b1' => 'fa-briefcase', 'f15a' => 'fa-btc', 'f188' => 'fa-bug', 'f1ad' => 'fa-building', 'f0f7' => 'fa-building-o', 'f0a1' => 'fa-bullhorn', 'f140' => 'fa-bullseye', 'f207' => 'fa-bus', 'f20d' => 'fa-buysellads', 'f1ba' => 'fa-cab', 'f1ec' => 'fa-calculator', 'f073' => 'fa-calendar', 'f274' => 'fa-calendar-check-o', 'f272' => 'fa-calendar-minus-o', 'f133' => 'fa-calendar-o', 'f271' => 'fa-calendar-plus-o', 'f273' => 'fa-calendar-times-o', 'f030' => 'fa-camera', 'f083' => 'fa-camera-retro', 'f1b9' => 'fa-car', 'f0d7' => 'fa-caret-down', 'f0d9' => 'fa-caret-left', 'f0da' => 'fa-caret-right', 'f150' => 'fa-caret-square-o-down', 'f191' => 'fa-caret-square-o-left', 'f152' => 'fa-caret-square-o-right', 'f151' => 'fa-caret-square-o-up', 'f0d8' => 'fa-caret-up', 'f218' => 'fa-cart-arrow-down', 'f217' => 'fa-cart-plus', 'f20a' => 'fa-cc', 'f1f3' => 'fa-cc-amex', 'f24c' => 'fa-cc-diners-club', 'f1f2' => 'fa-cc-discover', 'f24b' => 'fa-cc-jcb', 'f1f1' => 'fa-cc-mastercard', 'f1f4' => 'fa-cc-paypal', 'f1f5' => 'fa-cc-stripe', 'f1f0' => 'fa-cc-visa', 'f0a3' => 'fa-certificate', 'f0c1' => 'fa-chain', 'f127' => 'fa-chain-broken', 'f00c' => 'fa-check', 'f058' => 'fa-check-circle', 'f05d' => 'fa-check-circle-o', 'f14a' => 'fa-check-square', 'f046' => 'fa-check-square-o', 'f13a' => 'fa-chevron-circle-down', 'f137' => 'fa-chevron-circle-left', 'f138' => 'fa-chevron-circle-right', 'f139' => 'fa-chevron-circle-up', 'f078' => 'fa-chevron-down', 'f053' => 'fa-chevron-left', 'f054' => 'fa-chevron-right', 'f077' => 'fa-chevron-up', 'f1ae' => 'fa-child', 'f268' => 'fa-chrome', 'f111' => 'fa-circle', 'f10c' => 'fa-circle-o', 'f1ce' => 'fa-circle-o-notch', 'f1db' => 'fa-circle-thin', 'f0ea' => 'fa-clipboard', 'f017' => 'fa-clock-o', 'f24d' => 'fa-clone', 'f00d' => 'fa-close', 'f0c2' => 'fa-cloud', 'f0ed' => 'fa-cloud-download', 'f0ee' => 'fa-cloud-upload', 'f157' => 'fa-cny', 'f121' => 'fa-code', 'f126' => 'fa-code-fork', 'f1cb' => 'fa-codepen', 'f284' => 'fa-codiepie', 'f0f4' => 'fa-coffee', 'f013' => 'fa-cog', 'f085' => 'fa-cogs', 'f0db' => 'fa-columns', 'f075' => 'fa-comment', 'f0e5' => 'fa-comment-o', 'f27a' => 'fa-commenting', 'f27b' => 'fa-commenting-o', 'f086' => 'fa-comments', 'f0e6' => 'fa-comments-o', 'f14e' => 'fa-compass', 'f066' => 'fa-compress', 'f20e' => 'fa-connectdevelop', 'f26d' => 'fa-contao', 'f0c5' => 'fa-copy', 'f1f9' => 'fa-copyright', 'f25e' =>
|
请发表评论