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


PHP x_get_option函数代码示例

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


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

示例1: x_shortcodes_enqueue_site_styles

function x_shortcodes_enqueue_site_styles()
{
    if (!function_exists('x_get_stack')) {
        //
        // X not active.
        //
        wp_enqueue_style('x-shortcodes', X_SHORTCODES_URL . '/css/site/style.css', NULL, X_SHORTCODES_VERSION, 'all');
    } else {
        //
        // Legacy styles.
        //
        if (defined('X_VERSION') && version_compare(X_VERSION, '3.2.2', '<')) {
            $stack = x_get_option('x_stack') ? x_get_option('x_stack') : 'integrity';
            $design = x_get_option('x_integrity_design') ? x_get_option('x_integrity_design') : 'light';
            if ($stack == 'integrity' && $design == 'light') {
                $ext = '-light';
            } elseif ($stack == 'integrity' && $design == 'dark') {
                $ext = '-dark';
            } else {
                $ext = '';
            }
            wp_enqueue_style('x-shortcodes', X_SHORTCODES_URL . '/css/' . $stack . $ext . '.css', NULL, X_SHORTCODES_VERSION, 'all');
        }
    }
}
开发者ID:aguidetta,项目名称:americanfence,代码行数:25,代码来源:styles.php

示例2: x_portfolio_init

function x_portfolio_init()
{
    $slug = sanitize_title(x_get_option('x_custom_portfolio_slug'));
    $menu_icon = floatval(get_bloginfo('version')) >= '3.8' ? 'dashicons-format-gallery' : NULL;
    //
    // Enable the custom post type.
    //
    $labels = array('name' => __('Portfolio', '__x__'), 'singular_name' => __('Portfolio Item', '__x__'), 'add_new' => __('Add New Item', '__x__'), 'add_new_item' => __('Add New Portfolio Item', '__x__'), 'edit_item' => __('Edit Portfolio Item', '__x__'), 'new_item' => __('Add New Portfolio Item', '__x__'), 'view_item' => __('View Item', '__x__'), 'search_items' => __('Search Portfolio', '__x__'), 'not_found' => __('No portfolio items found', '__x__'), 'not_found_in_trash' => __('No portfolio items found in trash', '__x__'));
    $args = array('labels' => $labels, 'public' => true, 'show_ui' => true, 'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'comments', 'author', 'custom-fields', 'revisions'), 'capability_type' => 'post', 'hierarchical' => false, 'rewrite' => array('slug' => $slug, 'with_front' => false), 'menu_position' => 5, 'menu_icon' => $menu_icon, 'has_archive' => true);
    $args = apply_filters('portfolioposttype_args', $args);
    register_post_type('x-portfolio', $args);
    //
    // Portfolio tags taxonomy.
    //
    $taxonomy_portfolio_tag_labels = array('name' => __('Portfolio Tags', '__x__'), 'singular_name' => __('Portfolio Tag', '__x__'), 'search_items' => __('Search Portfolio Tags', '__x__'), 'popular_items' => __('Popular Portfolio Tags', '__x__'), 'all_items' => __('All Portfolio Tags', '__x__'), 'parent_item' => __('Parent Portfolio Tag', '__x__'), 'parent_item_colon' => __('Parent Portfolio Tag:', '__x__'), 'edit_item' => __('Edit Portfolio Tag', '__x__'), 'update_item' => __('Update Portfolio Tag', '__x__'), 'add_new_item' => __('Add New Portfolio Tag', '__x__'), 'new_item_name' => __('New Portfolio Tag Name', '__x__'), 'separate_items_with_commas' => __('Separate portfolio tags with commas', '__x__'), 'add_or_remove_items' => __('Add or remove portfolio tags', '__x__'), 'choose_from_most_used' => __('Choose from the most used portfolio tags', '__x__'), 'menu_name' => __('Portfolio Tags', '__x__'));
    $taxonomy_portfolio_tag_args = array('labels' => $taxonomy_portfolio_tag_labels, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_tagcloud' => true, 'hierarchical' => false, 'rewrite' => array('slug' => $slug . '-tag', 'with_front' => false), 'show_admin_column' => true, 'query_var' => true);
    register_taxonomy('portfolio-tag', array('x-portfolio'), $taxonomy_portfolio_tag_args);
    //
    // Portfolio categories taxonomy.
    //
    $taxonomy_portfolio_category_labels = array('name' => __('Portfolio Categories', '__x__'), 'singular_name' => __('Portfolio Category', '__x__'), 'search_items' => __('Search Portfolio Categories', '__x__'), 'popular_items' => __('Popular Portfolio Categories', '__x__'), 'all_items' => __('All Portfolio Categories', '__x__'), 'parent_item' => __('Parent Portfolio Category', '__x__'), 'parent_item_colon' => __('Parent Portfolio Category:', '__x__'), 'edit_item' => __('Edit Portfolio Category', '__x__'), 'update_item' => __('Update Portfolio Category', '__x__'), 'add_new_item' => __('Add New Portfolio Category', '__x__'), 'new_item_name' => __('New Portfolio Category Name', '__x__'), 'separate_items_with_commas' => __('Separate portfolio categories with commas', '__x__'), 'add_or_remove_items' => __('Add or remove portfolio categories', '__x__'), 'choose_from_most_used' => __('Choose from the most used portfolio categories', '__x__'), 'menu_name' => __('Portfolio Categories', '__x__'));
    $taxonomy_portfolio_category_args = array('labels' => $taxonomy_portfolio_category_labels, 'public' => true, 'show_in_nav_menus' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_tagcloud' => true, 'hierarchical' => true, 'rewrite' => array('slug' => $slug . '-category', 'with_front' => false), 'query_var' => true);
    register_taxonomy('portfolio-category', array('x-portfolio'), $taxonomy_portfolio_category_args);
    //
    // Flush rewrite rules if portfolio slug is updated.
    //
    if (get_transient('x_portfolio_slug_before') != get_transient('x_portfolio_slug_after')) {
        flush_rewrite_rules(false);
        delete_transient('x_portfolio_slug_before');
        delete_transient('x_portfolio_slug_after');
    }
}
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:32,代码来源:custom-post-types.php

示例3: vint_portfolio_item_featured_content

function vint_portfolio_item_featured_content()
{
    if (x_get_option('x_portfolio_enable_cropped_thumbs', '') == '1') {
        vint_featured_portfolio('cropped');
    } else {
        vint_featured_portfolio();
    }
}
开发者ID:WatzekDigitalInitiatives,项目名称:wineblog,代码行数:8,代码来源:functions.php

示例4: x_get_content_layout

 function x_get_content_layout()
 {
     $content_layout = x_get_option('x_layout_content', 'content-sidebar');
     if ($content_layout != 'full-width') {
         if (is_home()) {
             $opt = x_get_option('x_blog_layout', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (is_singular('post')) {
             $meta = get_post_meta(get_the_ID(), '_x_post_layout', true);
             $layout = $meta == 'on' ? 'full-width' : $content_layout;
         } elseif (x_is_portfolio_item()) {
             $layout = 'full-width';
         } elseif (x_is_portfolio()) {
             $meta = get_post_meta(get_the_ID(), '_x_portfolio_layout', true);
             $layout = $meta == 'sidebar' ? $content_layout : $meta;
         } elseif (is_page_template('template-layout-content-sidebar.php')) {
             $layout = 'content-sidebar';
         } elseif (is_page_template('template-layout-sidebar-content.php')) {
             $layout = 'sidebar-content';
         } elseif (is_page_template('template-layout-full-width.php')) {
             $layout = 'full-width';
         } elseif (is_archive()) {
             if (x_is_shop() || x_is_product_category() || x_is_product_tag()) {
                 $opt = x_get_option('x_woocommerce_shop_layout_content', 'sidebar');
                 $layout = $opt == 'sidebar' ? $content_layout : $opt;
             } else {
                 $opt = x_get_option('x_archive_layout', 'sidebar');
                 $layout = $opt == 'sidebar' ? $content_layout : $opt;
             }
         } elseif (x_is_product()) {
             $layout = 'full-width';
         } elseif (x_is_bbpress()) {
             $opt = x_get_option('x_bbpress_layout_content', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (x_is_buddypress()) {
             $opt = x_get_option('x_buddypress_layout_content', 'sidebar');
             $layout = $opt == 'sidebar' ? $content_layout : $opt;
         } elseif (is_404()) {
             $layout = 'full-width';
         } else {
             $layout = $content_layout;
         }
     } else {
         $layout = $content_layout;
     }
     return $layout;
 }
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:47,代码来源:stack-data.php

示例5: x_site_icons

 function x_site_icons()
 {
     $icon_favicon = x_get_option('x_icon_favicon');
     $icon_touch = x_get_option('x_icon_touch');
     $icon_tile = x_get_option('x_icon_tile');
     $icon_tile_bg_color = x_get_option('x_icon_tile_bg_color');
     if ($icon_favicon != '') {
         echo '<link rel="shortcut icon" href="' . x_make_protocol_relative($icon_favicon) . '">';
     }
     if ($icon_touch != '') {
         echo '<link rel="apple-touch-icon-precomposed" href="' . x_make_protocol_relative($icon_touch) . '">';
     }
     if ($icon_tile != '') {
         echo '<meta name="msapplication-TileColor" content="' . $icon_tile_bg_color . '">';
         echo '<meta name="msapplication-TileImage" content="' . x_make_protocol_relative($icon_tile) . '">';
     }
 }
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:17,代码来源:meta.php

示例6: x_icon_comment_number

 function x_icon_comment_number()
 {
     if (comments_open()) {
         $title = apply_filters('x_entry_meta_comments_title', get_the_title());
         $link = apply_filters('x_entry_meta_comments_link', get_comments_link());
         $number = apply_filters('x_entry_meta_comments_number', get_comments_number());
         if ($number == 0) {
             $comments = '';
         } else {
             $comments = sprintf('<a href="%1$s" title="%2$s" class="meta-comments">%3$s</a>', esc_url($link), esc_attr(sprintf(__('Leave a comment on: &ldquo;%s&rdquo;', '__x__'), $title)), number_format_i18n($number));
         }
     } else {
         $comments = '';
     }
     $post_type = get_post_type();
     $post_type_post = $post_type == 'post';
     $no_post_meta = x_get_option('x_blog_enable_post_meta') == '';
     if ($post_type_post && $no_post_meta) {
         return;
     } else {
         echo $comments;
     }
 }
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:23,代码来源:icon.php

示例7: get_bloginfo

<?php

// =============================================================================
// VIEWS/GLOBAL/_BRAND.PHP
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================
$site_name = get_bloginfo('name');
$site_description = get_bloginfo('description');
$logo = x_make_protocol_relative(x_get_option('x_logo'));
$site_logo = '<img src="' . $logo . '" alt="' . $site_description . '">';
?>

<?php 
echo is_front_page() ? '<h1 class="visually-hidden">' . $site_name . '</h1>' : '';
?>

<a href="<?php 
echo home_url('/');
?>
" class="<?php 
x_brand_class();
?>
" title="<?php 
echo $site_description;
?>
">
  <?php 
echo $logo == '' ? $site_name : $site_logo;
?>
</a>
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:31,代码来源:_brand.php

示例8: WC

// -----------------------------------------------------------------------------
// @version 1.6.4
// =============================================================================
if (!defined('ABSPATH')) {
    exit;
    // Exit if accessed directly
}
global $product, $woocommerce, $woocommerce_loop;
$crosssells = WC()->cart->get_cross_sells();
if (sizeof($crosssells) == 0) {
    return;
}
$meta_query = WC()->query->get_meta_query();
$enable = x_get_option('x_woocommerce_cart_cross_sells_enable');
$count = x_get_option('x_woocommerce_cart_cross_sells_count');
$columns = x_get_option('x_woocommerce_cart_cross_sells_columns');
$args = array('post_type' => 'product', 'ignore_sticky_posts' => 1, 'no_found_rows' => 1, 'posts_per_page' => apply_filters('woocommerce_cross_sells_total', $count), 'orderby' => $orderby, 'post__in' => $crosssells, 'meta_query' => $meta_query);
$products = new WP_Query($args);
$woocommerce_loop['columns'] = apply_filters('woocommerce_cross_sells_columns', $columns);
if ($products->have_posts() && $enable == '1') {
    ?>

  <div class="cross-sells cols-<?php 
    echo $columns;
    ?>
">
    <h2><?php 
    _e('You May Be Interested In&hellip;', '__x__');
    ?>
</h2>
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:30,代码来源:cross-sells.php

示例9:

<?php

// =============================================================================
// VIEWS/INTEGRITY/_BREADCRUMBS.PHP
// -----------------------------------------------------------------------------
// Breadcrumb output for Integrity.
// =============================================================================
?>

<?php 
if (!is_front_page()) {
    ?>
  <?php 
    if (x_get_option('x_breadcrumb_display') == '1') {
        ?>

    <div class="x-breadcrumb-wrap">
      <div class="x-container max width">

        <?php 
        x_breadcrumbs();
        ?>

        <?php 
        if (is_single() || x_is_portfolio_item()) {
            ?>
          <?php 
            x_entry_navigation();
            ?>
        <?php 
        }
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:31,代码来源:_breadcrumbs.php

示例10: x_bbpress_navbar_menu

 function x_bbpress_navbar_menu($items, $args)
 {
     if (X_BBPRESS_IS_ACTIVE && x_get_option('x_bbpress_header_menu_enable', '') == '1') {
         $submenu_items = '';
         $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_search_url() . '" class="cf"><i class="x-icon-search" data-x-icon="&#xf002;"></i> <span>' . __('Forums Search', '__x__') . '</span></a></li>';
         if (is_user_logged_in()) {
             $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_favorites_permalink(get_current_user_id()) . '" class="cf"><i class="x-icon-star" data-x-icon="&#xf005;"></i> <span>' . __('Favorites', '__x__') . '</span></a></li>';
             $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_subscriptions_permalink(get_current_user_id()) . '" class="cf"><i class="x-icon-bookmark" data-x-icon="&#xf02e;"></i> <span>' . __('Subscriptions', '__x__') . '</span></a></li>';
         }
         if (!X_BUDDYPRESS_IS_ACTIVE || X_BUDDYPRESS_IS_ACTIVE && x_get_option('x_buddypress_header_menu_enable', '') == '') {
             if (!is_user_logged_in()) {
                 $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . wp_login_url() . '" class="cf"><i class="x-icon-sign-in" data-x-icon="&#xf090;"></i> <span>' . __('Log in', '__x__') . '</span></a></li>';
             } else {
                 $submenu_items .= '<li class="menu-item menu-item-bbpress-navigation"><a href="' . bbp_get_user_profile_url(get_current_user_id()) . '" class="cf"><i class="x-icon-cog" data-x-icon="&#xf013;"></i> <span>' . __('Profile', '__x__') . '</span></a></li>';
             }
         }
         if ($args->theme_location == 'primary') {
             $items .= '<li class="menu-item current-menu-parent menu-item-has-children x-menu-item x-menu-item-bbpress">' . '<a href="' . get_post_type_archive_link(bbp_get_forum_post_type()) . '" class="x-btn-navbar-bbpress">' . '<span><i class="x-icon-comment" data-x-icon="&#xf075;"></i><span class="x-hidden-desktop"> ' . __('Forums', '__x__') . '</span></span>' . '</a>' . '<ul class="sub-menu">' . $submenu_items . '</ul>' . '</li>';
         }
     }
     return $items;
 }
开发者ID:datracka,项目名称:datalook.io,代码行数:22,代码来源:bbpress.php

示例11:

    ?>
;
<?php 
}
?>
font-weight: <?php 
echo $x_headings_font_weight;
?>
;
<?php 
if (x_is_font_italic($x_headings_font_weight_and_style)) {
    ?>
  font-style: italic;
<?php 
}
if (x_get_option('x_headings_uppercase_enable', '') == 1) {
    ?>
  text-transform: uppercase;
<?php 
}
?>
}

<?php 
if ($x_custom_fonts == '1') {
    ?>

  .p-landmark-sub,
  .p-meta,
  input,
  button,
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:31,代码来源:integrity.php

示例12: x_get_option

// =============================================================================
// VIEWS/GLOBAL/_TOPBAR.PHP
// -----------------------------------------------------------------------------
// Includes topbar output.
// =============================================================================
?>

<?php 
if (x_get_option('x_topbar_display', '') == '1') {
    ?>

  <div class="x-topbar">
    <div class="x-topbar-inner x-container max width">
      <?php 
    if (x_get_option('x_topbar_content') != '') {
        ?>
      <p class="p-info"><?php 
        echo x_get_option('x_topbar_content');
        ?>
</p>
      <?php 
    }
    ?>
      <?php 
    x_social_global();
    ?>
    </div>
  </div>

<?php 
}
开发者ID:ju4nr3v0l,项目名称:juandavidmarulanda.com,代码行数:31,代码来源:_topbar.php

示例13: x_social_global

 function x_social_global()
 {
     $facebook = x_get_option('x_social_facebook');
     $twitter = x_get_option('x_social_twitter');
     $google_plus = x_get_option('x_social_googleplus');
     $linkedin = x_get_option('x_social_linkedin');
     $xing = x_get_option('x_social_xing');
     $foursquare = x_get_option('x_social_foursquare');
     $youtube = x_get_option('x_social_youtube');
     $vimeo = x_get_option('x_social_vimeo');
     $instagram = x_get_option('x_social_instagram');
     $pinterest = x_get_option('x_social_pinterest');
     $dribbble = x_get_option('x_social_dribbble');
     $flickr = x_get_option('x_social_flickr');
     $github = x_get_option('x_social_github');
     $behance = x_get_option('x_social_behance');
     $tumblr = x_get_option('x_social_tumblr');
     $whatsapp = x_get_option('x_social_whatsapp');
     $soundcloud = x_get_option('x_social_soundcloud');
     $rss = x_get_option('x_social_rss');
     $output = '<div class="x-social-global">';
     if ($facebook) {
         $output .= '<a href="' . $facebook . '" class="facebook" title="Facebook" target="_blank"><i class="x-icon-facebook-square" data-x-icon="&#xf082;" aria-hidden="true"></i></a>';
     }
     if ($twitter) {
         $output .= '<a href="' . $twitter . '" class="twitter" title="Twitter" target="_blank"><i class="x-icon-twitter-square" data-x-icon="&#xf081;" aria-hidden="true"></i></a>';
     }
     if ($google_plus) {
         $output .= '<a href="' . $google_plus . '" class="google-plus" title="Google+" target="_blank"><i class="x-icon-google-plus-square" data-x-icon="&#xf0d4;" aria-hidden="true"></i></a>';
     }
     if ($linkedin) {
         $output .= '<a href="' . $linkedin . '" class="linkedin" title="LinkedIn" target="_blank"><i class="x-icon-linkedin-square" data-x-icon="&#xf08c;" aria-hidden="true"></i></a>';
     }
     if ($xing) {
         $output .= '<a href="' . $xing . '" class="xing" title="XING" target="_blank"><i class="x-icon-xing-square" data-x-icon="&#xf169;" aria-hidden="true"></i></a>';
     }
     if ($foursquare) {
         $output .= '<a href="' . $foursquare . '" class="foursquare" title="Foursquare" target="_blank"><i class="x-icon-foursquare" data-x-icon="&#xf180;" aria-hidden="true"></i></a>';
     }
     if ($youtube) {
         $output .= '<a href="' . $youtube . '" class="youtube" title="YouTube" target="_blank"><i class="x-icon-youtube-square" data-x-icon="&#xf166;" aria-hidden="true"></i></a>';
     }
     if ($vimeo) {
         $output .= '<a href="' . $vimeo . '" class="vimeo" title="Vimeo" target="_blank"><i class="x-icon-vimeo-square" data-x-icon="&#xf194;" aria-hidden="true"></i></a>';
     }
     if ($instagram) {
         $output .= '<a href="' . $instagram . '" class="instagram" title="Instagram" target="_blank"><i class="x-icon-instagram" data-x-icon="&#xf16d;" aria-hidden="true"></i></a>';
     }
     if ($pinterest) {
         $output .= '<a href="' . $pinterest . '" class="pinterest" title="Pinterest" target="_blank"><i class="x-icon-pinterest-square" data-x-icon="&#xf0d3;" aria-hidden="true"></i></a>';
     }
     if ($dribbble) {
         $output .= '<a href="' . $dribbble . '" class="dribbble" title="Dribbble" target="_blank"><i class="x-icon-dribbble" data-x-icon="&#xf17d;" aria-hidden="true"></i></a>';
     }
     if ($flickr) {
         $output .= '<a href="' . $flickr . '" class="flickr" title="Flickr" target="_blank"><i class="x-icon-flickr" data-x-icon="&#xf16e;" aria-hidden="true"></i></a>';
     }
     if ($github) {
         $output .= '<a href="' . $github . '" class="github" title="GitHub" target="_blank"><i class="x-icon-github-square" data-x-icon="&#xf092;" aria-hidden="true"></i></a>';
     }
     if ($behance) {
         $output .= '<a href="' . $behance . '" class="behance" title="Behance" target="_blank"><i class="x-icon-behance-square" data-x-icon="&#xf1b5;" aria-hidden="true"></i></a>';
     }
     if ($tumblr) {
         $output .= '<a href="' . $tumblr . '" class="tumblr" title="Tumblr" target="_blank"><i class="x-icon-tumblr-square" data-x-icon="&#xf174;" aria-hidden="true"></i></a>';
     }
     if ($whatsapp) {
         $output .= '<a href="' . $whatsapp . '" class="tumblr" title="Whatsapp" target="_blank"><i class="x-icon-whatsapp" data-x-icon="&#xf232;" aria-hidden="true"></i></a>';
     }
     if ($soundcloud) {
         $output .= '<a href="' . $soundcloud . '" class="soundcloud" title="SoundCloud" target="_blank"><i class="x-icon-soundcloud" data-x-icon="&#xf1be;" aria-hidden="true"></i></a>';
     }
     if ($rss) {
         $output .= '<a href="' . $rss . '" class="rss" title="RSS" target="_blank"><i class="x-icon-rss-square" data-x-icon="&#xf143;" aria-hidden="true"></i></a>';
     }
     $output .= '</div>';
     echo $output;
 }
开发者ID:elinberg,项目名称:ericlinberg,代码行数:78,代码来源:social.php

示例14: x_get_option

<?php

// =============================================================================
// VIEWS/INTEGRITY/CONTENT-PORTFOLIO.PHP
// -----------------------------------------------------------------------------
// Portfolio post output for Integrity.
// =============================================================================
$archive_share = x_get_option('x_integrity_portfolio_archive_post_sharing_enable');
?>

<article id="post-<?php 
the_ID();
?>
" <?php 
post_class();
?>
>
  <div class="entry-featured">
    <?php 
x_portfolio_item_featured_content();
?>
  </div>
  <div class="entry-wrap cf">

    <?php 
if (x_is_portfolio_item()) {
    ?>

      <div class="entry-info">
        <header class="entry-header">
          <h1 class="entry-title entry-title-portfolio"><?php 
开发者ID:skywindzz,项目名称:blue_leopard,代码行数:31,代码来源:content-portfolio.php

示例15: x_portfolio_page_template_precedence

function x_portfolio_page_template_precedence($request)
{
    if (array_key_exists('post_type', $request) && 'x-portfolio' == $request['post_type']) {
        $page_slug = basename($_SERVER['REQUEST_URI']);
        if (get_page_by_path($page_slug) && x_get_option('x_custom_portfolio_slug') == $page_slug) {
            unset($request['post_type']);
            $request['pagename'] = $page_slug;
        }
    }
    return $request;
}
开发者ID:WatzekDigitalInitiatives,项目名称:wineblog,代码行数:11,代码来源:portfolio.php


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