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


PHP get_theme_mod函数代码示例

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


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

示例1: currencies

 /**
  * Currency switcher
  *
  * @access public
  * @return void|bool|string
  */
 public static function currencies($atts)
 {
     $atts = shortcode_atts(array(), $atts, 'realia_currencies');
     if (!current_theme_supports('realia-currencies')) {
         return;
     }
     $currencies = get_theme_mod('realia_currencies');
     if ($currencies == false) {
         $currencies = array(array('symbol' => '$', 'code' => 'USD', 'show_after' => false, 'money_decimals' => 2, 'money_dec_point' => '.', 'money_thousands_separator' => ','));
     } elseif (!is_array($currencies)) {
         return false;
     }
     array_splice($currencies, get_theme_mod('realia_currencies_other', 0) + 1);
     $result = '';
     if (!empty($currencies) && is_array($currencies)) {
         ksort($currencies);
         $currency_code = Realia_Currencies::get_current_currency_code();
         $result = '';
         ob_start();
         include Realia_Template_Loader::locate('misc/currencies');
         $result = ob_get_contents();
         ob_end_clean();
     }
     return $result;
 }
开发者ID:jhonrsalcedo,项目名称:sitio,代码行数:31,代码来源:class-realia-shortcodes.php

示例2: stormbringer_addthis

function stormbringer_addthis()
{
    $addthis_id = get_theme_mod('addthis_id');
    if ($addthis_id) {
        wp_enqueue_script('addthis', '//s7.addthis.com/js/300/addthis_widget.js#pubid=' . $addthis_id, array(), null, true);
    }
}
开发者ID:nicomollet,项目名称:stormbringer,代码行数:7,代码来源:addthis.php

示例3: educator_theme_fonts_url

 /**
  * Get fonts URL.
  *
  * @return string
  */
 function educator_theme_fonts_url()
 {
     $fonts = array();
     $fonts[] = get_theme_mod('headings_font', 'Open Sans');
     $fonts[] = get_theme_mod('body_font', 'Open Sans');
     $font_families = array();
     $available_fonts = apply_filters('ib_theme_get_fonts', array());
     foreach ($fonts as $font_name) {
         if (isset($font_families[$font_name])) {
             continue;
         }
         if (isset($available_fonts[$font_name])) {
             $font = $available_fonts[$font_name];
             $font_families[$font_name] = urlencode($font_name);
             if (!empty($font['font_styles'])) {
                 $font_families[$font_name] .= ':' . $font['font_styles'];
             }
         }
     }
     if (empty($font_families)) {
         return false;
     }
     $query_args = array(array('family' => implode('|', $font_families)));
     $charater_sets = get_theme_mod('charater_sets', 'latin,latin-ext');
     if (!empty($charater_sets)) {
         $query_args['subset'] = educator_sanitize_character_sets($charater_sets);
     }
     return add_query_arg($query_args, '//fonts.googleapis.com/css');
 }
开发者ID:Bonus3,项目名称:ib-educator,代码行数:34,代码来源:theme-fonts.php

示例4: zorkish_customize_register

/**
Configure custom theme options.
@param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function zorkish_customize_register($wp_customize)
{
    // Improve display of title, description, and header text color during preview
    // https://developer.wordpress.org/themes/advanced-topics/customizer-api/#using-postmessage-for-improved-setting-previewing
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Add a custom Customizer section
    $wp_customize->add_section('custom_favicon', array('title' => __('Favicon'), 'description' => __('Set up your site\'s favicon.'), 'panel' => '', 'priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => ''));
    // Create a setting + control for the site favicons setup
    $wp_customize->add_setting('favicon_links', array('default' => ''));
    $wp_customize->add_control('favicon_links', array('type' => 'textarea', 'priority' => 10, 'section' => 'custom_favicon', 'label' => __('Favicon Links'), 'description' => __('Add your favicon links here.'), 'input_attrs' => array('class' => 'my-custom-class-for-js', 'style' => 'border: 1px solid #900', 'placeholder' => __('Add your favicon links here.'))));
    create_color_setting($wp_customize, 'header_color', 'Header Color', '#232323');
    create_color_setting($wp_customize, 'footer_color', 'Footer Color', '#232323');
    create_color_setting($wp_customize, 'header_byline_color', 'Byline Color', '#DDAE4F');
    // Remember whether Jetpack Site Logo is present
    $site_logo_active = function_exists('jetpack_the_site_logo');
    // Add a section for site logo customization. This is in additions
    // to whatever Jetpack might add (if installed).
    $wp_customize->add_section('zorkish_logo_section', array('title' => __($site_logo_active ? 'Inner Logo' : 'Site Logo', 'zorkish'), 'priority' => 30, 'description' => $site_logo_active ? 'Specify a logo to use on inner pages' : 'Upload a logo to replace the default site name and description in the header'));
    // If Jetpack isn't installed, display the custom logo uploader.
    // ALSO display it if we have a 'zorkish-logo' theme mod, to handle
    // the user adding a custom logo and later installing Jetpack.
    if (!$site_logo_active || get_theme_mod('zorkish-logo')) {
        $wp_customize->add_setting('zorkish_logo');
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_logo', array('label' => __('Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_logo')));
    }
    // Add a setting for the site's inner logo
    $wp_customize->add_setting('zorkish_inner_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_inner_logo', array('label' => __('Inner Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_inner_logo')));
}
开发者ID:tlongren,项目名称:zorkish,代码行数:35,代码来源:customizer.php

示例5: jaxlite_setting

 function jaxlite_setting($id)
 {
     $jaxlite_setting = get_theme_mod($id);
     if (isset($jaxlite_setting)) {
         return $jaxlite_setting;
     }
 }
开发者ID:Pushistic82,项目名称:final_theme_and_plugins,代码行数:7,代码来源:functions.php

示例6: colormag_render_header_image

    /**
     * Shows the small info text on top header part
     */
    function colormag_render_header_image()
    {
        $header_image = get_header_image();
        if (!empty($header_image)) {
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		<a href="<?php 
                echo esc_url(home_url('/'));
                ?>
" title="<?php 
                echo esc_attr(get_bloginfo('name', 'display'));
                ?>
" rel="home">
		<?php 
            }
            ?>
		<div class="header-image-wrap"><img src="http://thevrforums.com/images/banner.png" class="header-image" width="<?php 
            echo get_custom_header()->width;
            ?>
" height="<?php 
            echo get_custom_header()->height;
            ?>
" alt="<?php 
            echo esc_attr(get_bloginfo('name', 'display'));
            ?>
"></div>
	<?php 
            if (get_theme_mod('colormag_header_image_link', 0) == 1) {
                ?>
		</a>
		<?php 
            }
        }
    }
开发者ID:sammykumar,项目名称:TheVRForums,代码行数:37,代码来源:header-functions.php

示例7: vc_menu_func

function vc_menu_func($atts, $content)
{
    ob_start();
    ?>
	<nav class="navbar navbar-default" id="menunav">
				<div class="container">
					<div class="row">
						<ul class="nav navbar-nav pull-right margin-right-15">
							<li class="dropdown resv-dropdown" id="ibe-dropdown">
								<a class="resv-link dropdown-toggle" href="#back-to-reserve" id="ibe-dropdown-button"><?php 
    echo esc_html(get_theme_mod('booking_button_text', esc_attr__('Reservations', 'Property Theme')));
    ?>
								</a>
							</li>
						</ul>

						<?php 
    if (has_nav_menu('primary_navigation')) {
        wp_nav_menu(['theme_location' => 'primary_navigation', 'menu_class' => 'nav navbar-nav navbar-right']);
    }
    ?>
					</div>
				</div>
			</nav>
	<?php 
    $returnvariable = ob_get_clean();
    return $returnvariable;
}
开发者ID:ratheeshpkr,项目名称:snhotel,代码行数:28,代码来源:snhotel-vc_addons.php

示例8: start_el

 function start_el(&$output, $item, $depth, $args)
 {
     global $wp_query;
     $indent = $depth ? str_repeat("\t", $depth) : '';
     $class_names = $value = '';
     $classes = empty($item->classes) ? array() : (array) $item->classes;
     if ($item->menu_order == 1) {
         $classes[] = 'firstmenuitem';
     }
     if ($item->ID == get_theme_mod('lastmenuitem')) {
         $classes[] = 'lastmenuitem';
     }
     $class_names = join(' ', apply_filters('nav_menu_css_class', array_filter($classes), $item));
     $class_names = ' class="' . esc_attr($class_names) . '"';
     $output .= $indent . '<li id="menu-item-' . $item->ID . '"' . $value . $class_names . '>';
     $attributes = !empty($item->attr_title) ? ' title="' . esc_attr($item->attr_title) . '"' : '';
     $attributes .= !empty($item->target) ? ' target="' . esc_attr($item->target) . '"' : '';
     $attributes .= !empty($item->xfn) ? ' rel="' . esc_attr($item->xfn) . '"' : '';
     $attributes .= !empty($item->url) ? ' href="' . esc_attr($item->url) . '"' : '';
     $prepend = ' ';
     $append = ' ';
     //$prepend = '';
     // $append = '';
     $description = !empty($item->description) ? '<span>' . esc_attr($item->description) . '</span>' : '';
     if ($depth != 0) {
         $description = $append = $prepend = "";
     }
     $item_output = $args->before;
     $item_output .= '<a' . $attributes . '>';
     $item_output .= $args->link_before . $prepend . apply_filters('the_title', $item->title, $item->ID) . $append;
     $item_output .= $description . $args->link_after;
     $item_output .= '</a>';
     $item_output .= $args->after;
     $output .= apply_filters('walker_nav_menu_start_el', $item_output, $item, $depth, $args);
 }
开发者ID:m-godefroid76,项目名称:devrestofactory,代码行数:35,代码来源:menu-walker.php

示例9: check_directory_fields

    function check_directory_fields()
    {
        if (get_theme_mod('custom-submission', true) || get_option('jmfe_listify_directory_fields_notice')) {
            return false;
        }
        ?>
		<script type="text/javascript">
			jQuery( document ).ready( function ( $ ) {
				$('.jmfe-listify-dfd.notice.is-dismissible' ).on('click', '.notice-dismiss', function(e){
					$.post( ajaxurl, {
						'action': 'jmfe_listify_dfd',
						'nonce' : '<?php 
        echo wp_create_nonce("jmfe-listify-dfd");
        ?>
',
					}, function () {} );
				});
			} );
		</script>
		<div class="jmfe-listify-dfd notice is-dismissible update-nag">
            <?php 
        echo sprintf(__('When using <em>WP Job Manager Field Editor</em> with the <em>Listify</em> theme it is <strong>strongly</strong> recommended that you use/check/enable the <a href="%s" target="_blank">Directory Submission Fields</a>', 'wp-job-manager-field-editor'), 'http://listify.astoundify.com/article/238-enable-job-manager-submission-fields');
        ?>
        </div>
		<?php 
    }
开发者ID:Atlas-Solutions-Group,项目名称:mn-wp-job-manager-field-editor,代码行数:26,代码来源:listify.php

示例10: bg_photo_frame_js_params

function bg_photo_frame_js_params()
{
    $image_order = get_theme_mod("image_order", "in_order");
    $theme_color = get_theme_mod('theme_color', 'light');
    $image_opacity = get_theme_mod("image_opacity", "70") / 100;
    $contents_opacity = get_theme_mod("contents_opacity", "70") / 100;
    echo "\n";
    echo '<script type="text/javascript">//<![CDATA[';
    //Color
    echo "\n";
    echo "var themeColor = '" . $theme_color . "';";
    //Opacity
    echo "\n";
    echo "var imageOpacity = " . $image_opacity . ";";
    echo "\n";
    echo "var contentsOpacity = " . $contents_opacity . ";";
    //Order
    echo "\n";
    if ($image_order == 'in_order') {
        echo "var shuffle = false;";
    } else {
        echo "var shuffle = true;";
    }
    echo "//]]></script>";
    echo "\n";
}
开发者ID:kassy000,项目名称:wp-theme-bg-photo-frame,代码行数:26,代码来源:bg-photo-frame-functions.php

示例11: toivo_lite_add_custom_background_class

/**
 * Add custom-background body class before it's saved.
 *
 * @since  1.0.0
 * @return array
 */
function toivo_lite_add_custom_background_class($classes)
{
    if (!get_theme_mod('background_color')) {
        $classes[] = 'custom-background';
    }
    return $classes;
}
开发者ID:KateKupka,项目名称:darwin,代码行数:13,代码来源:custom-background.php

示例12: scripts

 /**
  * Add our custom stylesheets and scripts
  */
 function scripts()
 {
     $options = get_option('maera_admin_options', array());
     $active_shell = isset($options['shell']) ? $options['shell'] : 'core';
     // Remove the default EDD styles
     wp_dequeue_style('edd-styles');
     // If EDD-Software-Specs is installed, remove its styles
     if (class_exists('EDD_Software_Specs')) {
         wp_dequeue_style('edd-software-specs');
         wp_deregister_style('edd-software-specs');
     }
     // Add our custom styles
     wp_register_style('maera-edd', trailingslashit(get_template_directory_uri()) . 'assets/css/edd/style.css');
     wp_enqueue_style('maera-edd');
     if ('isotope' == get_theme_mod('filter_mode', 'isotope') && (is_archive('download') || is_tax('download_tag') || is_tax('download_category'))) {
         // Register && Enqueue Isotope
         wp_register_script('maera_isotope', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.min.js', false, null, true);
         wp_enqueue_script('maera_isotope');
         // Register && Enqueue Isotope-Sloppy-Masonry
         wp_register_script('maera_isotope_sloppy_masonry', trailingslashit(get_template_directory_uri()) . 'assets/vendor/jquery.isotope.sloppy-masonry.min.js', false, null, true);
         wp_enqueue_script('maera_isotope_sloppy_masonry');
         wp_enqueue_script('edd_script', trailingslashit(get_template_directory_uri()) . 'assets/js/edd-scripts.js', false, null, true);
         // wp_localize_script( 'maera_foundation_script', 'maera_foundation_script_vars', array(
         //
         //     )
         // );
     }
 }
开发者ID:wpmu,项目名称:maera,代码行数:31,代码来源:class-maera-edd-scripts.php

示例13: __construct

 function __construct()
 {
     global $exclusive_special_id_for_db;
     add_action('customize_preview_init', array($this, 'web_bussines_customize_preview_js'));
     $this->colorcontrol = "Color Control";
     $this->shortcolorcontrol = $exclusive_special_id_for_db . "cc";
     $value_of_std[0] = get_theme_mod($this->shortcolorcontrol . "_menu_elem_back_color", '#000066');
     $value_of_std[1] = get_theme_mod($this->shortcolorcontrol . "_content_back_color", '#FFFFFF');
     $value_of_std[2] = get_theme_mod($this->shortcolorcontrol . "_sideb_background_color", '#bfd1e5');
     $value_of_std[3] = get_theme_mod($this->shortcolorcontrol . "_footer_back_color", '#bfd1e5');
     $value_of_std[4] = get_theme_mod($this->shortcolorcontrol . "_home_top_posts_color", '#ECECEC');
     $value_of_std[5] = get_theme_mod($this->shortcolorcontrol . "_top_posts_color", '#333399');
     $value_of_std[6] = get_theme_mod($this->shortcolorcontrol . "_text_headers_color", '#333399');
     $value_of_std[7] = get_theme_mod($this->shortcolorcontrol . "_primary_text_color", '#1f1f1f');
     $value_of_std[8] = get_theme_mod($this->shortcolorcontrol . "_footer_text_color", '#1f1f1f');
     $value_of_std[9] = get_theme_mod($this->shortcolorcontrol . "_primary_links_color", '#000000');
     $value_of_std[10] = get_theme_mod($this->shortcolorcontrol . "_primary_links_hover_color", '#000000');
     $value_of_std[11] = get_theme_mod($this->shortcolorcontrol . "_menu_links_color", '#FFFFFF');
     $value_of_std[12] = get_theme_mod($this->shortcolorcontrol . "_menu_links_hover_color", '#FFFFFF');
     $value_of_std[13] = get_theme_mod($this->shortcolorcontrol . "_menu_color", '#000066');
     $value_of_std[14] = get_theme_mod($this->shortcolorcontrol . "_selected_menu_color", '#000066');
     $value_of_std[15] = get_theme_mod($this->shortcolorcontrol . "_color_scheme", '#E0E0E0');
     $value_of_std[16] = get_theme_mod($this->shortcolorcontrol . "_logo_text_color", '#ffffff');
     $value_of_std[17] = get_theme_mod($this->shortcolorcontrol . "_logo_text_color_for_phone", '#000000');
     $this->options_colorcontrol = array("menu_elem_back_color" => array("name" => __("Menu Element Backround Color", "wd_exclusive"), "desc" => "", "var_name" => 'menu_elem_back_color', "id" => $this->shortcolorcontrol . "_menu_elem_back_color", "type" => "picker", "std" => $value_of_std[0]), "sideb_background_color" => array("name" => __("Sidebar Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'sideb_background_color', "id" => $this->shortcolorcontrol . "_sideb_background_color", "type" => "picker", "std" => $value_of_std[2]), "footer_back_color" => array("name" => __("Footer Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'footer_back_color', "id" => $this->shortcolorcontrol . "_footer_back_color", "type" => "picker", "std" => $value_of_std[3]), "home_top_posts_color" => array("name" => __("Featured Post Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'home_top_posts_color', "id" => $this->shortcolorcontrol . "_home_top_posts_color", "type" => "picker", "std" => $value_of_std[4]), "top_posts_color" => array("name" => __("Top Posts Background Color", "wd_exclusive"), "desc" => "", "var_name" => 'top_posts_color', "id" => $this->shortcolorcontrol . "_top_posts_color", "type" => "picker", "std" => $value_of_std[5]), "text_headers_color" => array("name" => __("Header Text(&lt;h1&gt; etc) Color", "wd_exclusive"), "desc" => "", "var_name" => 'text_headers_color', "id" => $this->shortcolorcontrol . "_text_headers_color", "type" => "picker", "std" => $value_of_std[6]), "primary_text_color" => array("name" => __("Primary Text Corlor", "wd_exclusive"), "desc" => "", "var_name" => 'primary_text_color', "id" => $this->shortcolorcontrol . "_primary_text_color", "type" => "picker", "std" => $value_of_std[7]), "footer_text_color" => array("name" => __("Footer Text Color", "wd_exclusive"), "desc" => "", "var_name" => 'footer_text_color', "id" => $this->shortcolorcontrol . "_footer_text_color", "type" => "picker", "std" => $value_of_std[8]), "primary_links_color" => array("name" => __("Primary Links", "wd_exclusive"), "desc" => "", "var_name" => 'primary_links_color', "id" => $this->shortcolorcontrol . "_primary_links_color", "type" => "picker", "std" => $value_of_std[9]), "primary_links_hover_color" => array("name" => __("Primary Links Hover", "wd_exclusive"), "desc" => "", "var_name" => 'primary_links_hover_color', "id" => $this->shortcolorcontrol . "_primary_links_hover_color", "type" => "picker", "std" => $value_of_std[10]), "menu_links_color" => array("name" => __("Menu Links", "wd_exclusive"), "desc" => "", "var_name" => 'menu_links_color', "id" => $this->shortcolorcontrol . "_menu_links_color", "type" => "picker", "std" => $value_of_std[11]), "menu_links_hover_color" => array("name" => __("Menu Links Hover", "wd_exclusive"), "desc" => "", "var_name" => 'menu_links_hover_color', "id" => $this->shortcolorcontrol . "_menu_links_hover_color", "type" => "picker", "std" => $value_of_std[12]), "menu_color" => array("name" => __("Hover Menu Item", "wd_exclusive"), "desc" => "", "var_name" => 'menu_color', "id" => $this->shortcolorcontrol . "_menu_color", "type" => "picker", "std" => $value_of_std[13]), "selected_menu_color" => array("name" => __("Selected Menu Item", "wd_exclusive"), "desc" => "", "var_name" => 'selected_menu_color', "id" => $this->shortcolorcontrol . "_selected_menu_color", "type" => "picker", "std" => $value_of_std[14]), "color_scheme" => array("name" => " ", "var_name" => 'color_scheme', "id" => $this->shortcolorcontrol . "_color_scheme", "type" => "", "std" => $value_of_std[15]), "logo_text_color" => array("name" => __("Logo Text Color ", "wd_exclusive"), "desc" => "", "var_name" => 'logo_text_color', "id" => $this->shortcolorcontrol . "_logo_text_color", "type" => "picker", "std" => $value_of_std[16]), "logo_text_color_for_phone" => array("name" => __("Logo Text Color For Phone", "wd_exclusive"), "desc" => "", "var_name" => 'logo_text_color_for_phone', "id" => $this->shortcolorcontrol . "_logo_text_color_for_phone", "type" => "picker", "std" => $value_of_std[17]));
 }
开发者ID:scarykay,项目名称:bsf,代码行数:26,代码来源:color_control.php

示例14: ce_map_shortcode

function ce_map_shortcode($atts)
{
    $address = 'New York';
    if (is_page_template("page-post-ad.php") && !isset($_GET['id']) && is_user_logged_in()) {
        global $user_ID;
        $address = get_user_meta($user_ID, 'et_address', true);
    }
    $default = array('w' => '100%', 'h' => '300px', 'lat' => '', 'lng' => '', 'zoom' => 20, 'address' => $address, 'is_single' => 0);
    $atts = wp_parse_args($atts, $default);
    extract($atts);
    $mininfy = get_theme_mod('ce_minify', 0);
    // if(!$mininfy) {
    wp_enqueue_script('ce-map-shorcode');
    wp_localize_script('ce-map-shorcode', 'map_short_code', $atts);
    // }
    // if (!is_page_template('page-post-ad.php')) {
    //     wp_enqueue_script('gmap');
    //     wp_enqueue_script('marker_cluster', plugin_dir_url(__FILE__) . '/js/marker-cluster.js', array(
    //         'gmap'
    //     ) , '1.0');
    //     wp_enqueue_style('map-style', plugin_dir_url(__FILE__) . '/css/map-front.css', true, CE_MAP_VER);
    // }
    $html = '<div id="map-shortcode" class="map-shortcode" style="width : ' . $w . '; heigth: ' . $h . '; margin-top:0px;">';
    $html .= '</div>';
    return $html;
}
开发者ID:linniepinski,项目名称:perssistant,代码行数:26,代码来源:shortcode.php

示例15: oceanic_post_nav

    /**
     * Display navigation to next/previous post when applicable.
     */
    function oceanic_post_nav()
    {
        // Don't print empty markup if there's nowhere to navigate.
        $previous = is_attachment() ? get_post(get_post()->post_parent) : get_adjacent_post(false, '', true);
        $next = get_adjacent_post(false, '', false);
        if (!$next && !$previous) {
            return;
        }
        ?>
	<nav class="navigation post-navigation" role="navigation">
		<h1 class="screen-reader-text"><?php 
        _e('Post navigation', 'oceanic');
        ?>
</h1>
		<div class="nav-links">
			<?php 
        $slider_cats = get_theme_mod('oceanic-slider-cats', false);
        $slider_cat_ids = array();
        if ($slider_cats) {
            $slider_cats = explode(',', esc_html($slider_cats));
            for ($i = 0; $i < count($slider_cats); ++$i) {
                $cat_id = get_cat_ID($slider_cats[$i]);
                if ($cat_id > 0) {
                    $slider_cat_ids[$i] = $cat_id;
                }
            }
        }
        previous_post_link('<div class="nav-previous">%link</div>', _x('<span class="meta-nav">&larr;</span>&nbsp;%title', 'Previous post link', 'oceanic'), false, $slider_cat_ids);
        next_post_link('<div class="nav-next">%link</div>', _x('%title&nbsp;<span class="meta-nav">&rarr;</span>', 'Next post link', 'oceanic'), false, $slider_cat_ids);
        ?>
		</div><!-- .nav-links -->
	</nav><!-- .navigation -->
	<?php 
    }
开发者ID:neetudave,项目名称:heartfulness-uk,代码行数:37,代码来源:template-tags.php


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