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


PHP reactor_option函数代码示例

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


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

示例1: add_logo

function add_logo($wp_admin_bar)
{
    $isConsorci = stripos(reactor_option('cpCentre'), "barcelona") ? true : false;
    if ($isConsorci) {
        $args = array('id' => 'consorci', 'title' => '<img src="' . get_stylesheet_directory_uri() . '/custom-tac/imatges/logo_consorci.png">', 'href' => 'http://www.edubcn.cat/ca/', 'parent' => false);
    } else {
        $args = array('id' => 'gencat', 'title' => '<img src="' . get_stylesheet_directory_uri() . '/custom-tac/imatges/logo_gene.png">', 'href' => 'http://www.gencat.cat/ensenyament/', 'parent' => false);
    }
    $wp_admin_bar->add_menu($args);
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:10,代码来源:menu-logo.php

示例2: reactor_do_page_links

/**
 * Page links 
 * after the loop in page templates
 * 
 * @since 1.0.0
 */
function reactor_do_page_links()
{
    $pagination_type = reactor_option('page_links', 'numbered');
    if (is_page_template('page-templates/front-page.php') && current_theme_supports('reactor-page-links')) {
        $show_page_links = reactor_option('frontpage_page_links', 0);
        if ($show_page_links) {
            reactor_page_links(array('query' => 'frontpage_query', 'type' => $pagination_type));
        }
    } elseif (is_page_template('page-templates/news-page.php') && current_theme_supports('reactor-page-links')) {
        reactor_page_links(array('query' => 'newspage_query', 'type' => $pagination_type));
    } elseif (is_page_template('page-templates/portfolio.php') && current_theme_supports('reactor-page-links')) {
        $filter_type = reactor_option('portfolio_filter_type', 'jquery');
        //if ( 'jquery' != $filter_type ) {
        reactor_page_links(array('query' => 'portfolio_query', 'type' => $pagination_type));
        //}
    } elseif (current_theme_supports('reactor-page-links')) {
        reactor_page_links(array('type' => $pagination_type));
    }
}
开发者ID:aaronfrey,项目名称:PepperLillie-Cambridge,代码行数:25,代码来源:content-pages.php

示例3: reactor_do_breadcrumbs

    function reactor_do_breadcrumbs()
    {
        if (reactor_option('breadcrumbs', 1)) {
            ?>
			<div id="breadcrumbs">
				<div class="row">
					<div class="<?php 
            reactor_columns(12);
            ?>
">
						<?php 
            reactor_breadcrumbs();
            ?>
					</div><!-- .columns -->
				</div><!-- .row -->
			</div><!-- #breadcrumbs -->
	<?php 
        }
    }
开发者ID:aaronfrey,项目名称:PepperLillie-Cambridge,代码行数:19,代码来源:content-footer.php

示例4: add_dades_centre

function add_dades_centre($wp_admin_bar)
{
    $args = array('id' => 'direccioCentre', 'title' => reactor_option('direccioCentre', 'Direcció centre'), 'parent' => false);
    $wp_admin_bar->add_node($args);
    $args = array('id' => 'telCentre', 'title' => reactor_option('telCentre', '0000000'), 'parent' => false);
    $wp_admin_bar->add_node($args);
    $args = array('id' => 'titularitat', 'title' => 'Centre públic', 'href' => 'http://www10.gencat.net/pls/ense_ensenyam/p01.menu', 'parent' => false);
    $wp_admin_bar->add_node($args);
    /*
    $wp_admin_bar->add_node( $args );
    $args = array(
    	'id'     => 'emailCentre',     // id of the existing child node (New > Post)
    	'title'  => 'bustia@ies-sabadell.cat ', // alter the title of existing node
    	'parent' => false,          // set parent to false to make it a top level (parent) node
    );
    
    $wp_admin_bar->add_node( $args );
    */
}
开发者ID:pausaura,项目名称:agora_nodes,代码行数:19,代码来源:menu-dades-centre.php

示例5: get_portfolio_post

 function get_portfolio_post()
 {
     global $portfolio_query, $json_api;
     $term = get_term_by('ID', 'slug', get_query_var('term'), get_query_var('taxonomy'));
     /** @noinspection PhpParamsInspection */
     $order_by = reactor_option('portfolio_post_orderby', 'date');
     /** @noinspection PhpParamsInspection */
     $order = reactor_option('portfolio_post_order', 'DESC');
     /** @noinspection PhpParamsInspection */
     $number_posts = reactor_option('portfolio_number_posts', 20);
     $paged = get_query_var('paged') ? get_query_var('paged') : 1;
     if (is_tax('portfolio-tag')) {
         $args = array('post_type' => 'portfolio', 'orderby' => $order_by, 'order' => $order, 'portfolio-tag' => $term->name, 'posts_per_page' => $number_posts, 'paged' => $paged);
     } elseif (is_tax('portfolio-category')) {
         $args = array('post_type' => 'portfolio', 'orderby' => $order_by, 'order' => $order, 'portfolio-category' => $term->name, 'posts_per_page' => $number_posts, 'paged' => $paged);
     } else {
         $args = array('post_type' => 'portfolio', 'orderby' => $order_by, 'order' => $order, 'posts_per_page' => $number_posts, 'paged' => $paged, 'p' => $json_api->query->id, 'name' => $json_api->query->slug);
     }
     /*
      * todo thumbnails next and previous posts
      */
     $portfolio_query = new WP_Query($args);
     return array('posts' => $portfolio_query->posts);
 }
开发者ID:patlegris,项目名称:angularpresstheme,代码行数:24,代码来源:portfolio.php

示例6: update_option

<?php

/**
 * Template Name: News Page
 *
 * @package Reactor
 * @subpackge Page-Templates
 * @since 1.0.0
 */
update_option('current_page_template', 'news-page');
?>

<?php 
// get the options
$slider_category = reactor_option('newspage_slider_category', '');
?>

<?php 
get_header();
?>

	<div id="primary" class="site-content">

		<?php 
reactor_content_before();
?>

		<div id="content" role="main">
			<div class="row">

				<div class="<?php 
开发者ID:patlegris,项目名称:angularpresstheme,代码行数:31,代码来源:news-page.php

示例7: reactor_do_mobile_nav

/**
 * Mobile nav
 * in header.php
 * 
 * @since 1.0.0
 */
function reactor_do_mobile_nav()
{
    if (reactor_option('mobile_menu', 1) && has_nav_menu('main-menu')) {
        ?>
 
		<nav id="mobile-menu" class="show-for-small" role="navigation">
			<div class="section-container accordion" data-section="accordion" data-options="one_up:false">
				<?php 
        reactor_main_menu();
        ?>
			</div>
		</nav>
<?php 
    }
}
开发者ID:schneidan,项目名称:katchabird,代码行数:21,代码来源:content-header.php

示例8: reactor_side_menu

 function reactor_side_menu($nav_args = '')
 {
     global $post;
     // get the menu option from customizer
     $side_nav_type = reactor_option('side_nav_type', 'accordion');
     // set the menu containers
     $before = 'accordion' == $side_nav_type ? '<div class="section-container accordion" data-section="accordion">' : '<ul class="side-nav">';
     $after = 'accordion' == $side_nav_type ? '</div>' : '</ul>';
     // default args
     $defaults = array('show_home' => true, 'home_text' => __('&larr; Home', 'reactor'), 'before' => $before, 'after' => $after);
     $nav_args = apply_filters('reactor_side_menu', wp_parse_args($nav_args, $defaults));
     // set the menu depth and walker
     $depth = 'accordion' == $side_nav_type ? 2 : 1;
     $side_nav_walker = new Side_Menu_walker();
     $walker = 'side_nav' == $side_nav_type ? '' : $side_nav_walker;
     // wp_list_pages args
     $args = array('title_li' => '', 'depth' => $depth, 'sort_column' => 'menu_order', 'echo' => 0, 'walker' => $walker);
     // setup the page list based on ancestor id or post id
     if ($post->post_parent) {
         $ancestors = get_post_ancestors($post->ID);
         $root = count($ancestors) - 1;
         $args['child_of'] = $ancestors[$root];
     } else {
         $args['child_of'] = $post->ID;
     }
     // generate the page list
     $children = wp_list_pages($args);
     // add the home link if args is true and using side nav
     if ($nav_args['show_home'] == true && 'side_nav' == $side_nav_type) {
         $nav_args['before'] .= '<li><a href="' . get_home_url() . '">' . $nav_args['home_text'] . '</a></li><li class="divider"></li>';
     }
     // display the menu if there are subpages
     if ($children) {
         $output = $nav_args['before'] . $children . $nav_args['after'];
         echo $output;
     }
 }
开发者ID:terngkub,项目名称:reactor,代码行数:37,代码来源:menus.php

示例9: reactor_option

<?php

/**
 * Template Name: Front Page
 *
 * @package Reactor
 * @subpackge Page-Templates
 * @since 1.0.0
 */
?>

<?php 
// get the options
$slider_category = reactor_option('frontpage_slider_category', '');
?>

<?php 
get_header();
?>

	<div id="primary" class="site-content">
    
    	<?php 
reactor_content_before();
?>
  
        <div class="row">
          	<div class="<?php 
reactor_columns(12);
?>
">
开发者ID:terngkub,项目名称:reactor,代码行数:31,代码来源:front-page.php

示例10: reactor_do_footer_content

/**
 * Footer links and site info
 * in footer.php
 * 
 * @since 1.0.0
 */
function reactor_do_footer_content()
{
    ?>
	<div class="site-info">
		<div class="row">
        
			<div class="<?php 
    reactor_columns(6);
    ?>
">
			<?php 
    if (function_exists('reactor_footer_links')) {
        ?>
				<nav class="footer-links" role="navigation">
					<?php 
        reactor_footer_links();
        ?>
				</nav><!-- #footer-links -->
			<?php 
    }
    ?>
			</div><!--.columns -->
                    
			<div class="<?php 
    reactor_columns(6);
    ?>
">
				<div id="colophon">                      
					<?php 
    if (reactor_option('footer_siteinfo')) {
        echo reactor_option('footer_siteinfo');
    } else {
        ?>
					<span class="copyright">&copy; <?php 
        echo date_i18n('Y');
        ?>
 <?php 
        bloginfo('name');
        ?>
. All rights reserved.</span>
					<?php 
    }
    ?>
				</div><!-- #colophon -->
			</div><!-- .columns -->
            
		</div><!-- .row -->
	</div><!-- #site-info -->
<?php 
}
开发者ID:cakrans,项目名称:pfl,代码行数:56,代码来源:content-footer.php

示例11: reactor_do_footer_content

/**
 * Footer links and site info
 * in footer.php
 * 
 * @since 1.0.0
 */
function reactor_do_footer_content()
{
    ?>
	<div class="site-info">
		<div class="row">
        
			<div class="<?php 
    reactor_columns(6);
    ?>
">
			<?php 
    if (function_exists('reactor_footer_links')) {
        ?>
				
				<div id="colophon">                      
					<?php 
        if (reactor_option('footer_siteinfo')) {
            echo reactor_option('footer_siteinfo');
        } else {
            ?>
					<span class="copyright">&copy;<?php 
            echo date_i18n('Y');
            ?>
 <?php 
            bloginfo('name');
            ?>
 </span>
                        
					<?php 
        }
        ?>
				</div><!-- #colophon -->
			<?php 
    }
    ?>
			</div><!--.columns -->
                    
			<div class="<?php 
    reactor_columns(6);
    ?>
">
				<div id="credit"><span class="copyright">Website Designed & Developed by <a href="http://www.arsenalstudios.com" target="_blank">Arsenal Studios</a></span></div><!-- #credit -->
			</div><!-- .columns -->
            
		</div><!-- .row -->
	</div><!-- #site-info -->
<?php 
}
开发者ID:aaronfrey,项目名称:PepperLillie-Cambridge,代码行数:54,代码来源:content-footer_original.php

示例12: wp_head

<head>
    <?php 
include "style.php";
?>

    <link href='https://fonts.googleapis.com/css?family=Oswald:400,300' rel='stylesheet' type='text/css'>
    <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">

    <?php 
wp_head();
reactor_head();
?>

    <?php 
$favicon = reactor_option("favicon_image");
if (!$favicon) {
    $favicon = get_stylesheet_directory_uri() . "/favicon.ico";
}
?>
    <link rel="shortcut icon" href="<?php 
echo $favicon;
?>
"/>
</head>

<body <?php 
body_class();
?>
>
    <?php 
开发者ID:pausaura,项目名称:agora_nodes,代码行数:30,代码来源:header.php

示例13: widget

    public function widget($args, $instance)
    {
        // Saved widget options
        $title = $instance['title'];
        echo $args['before_widget'];
        if (!empty($title)) {
            echo '<h4 class="widget-title">' . $title . '</h4>';
        }
        $contacte = strstr(reactor_option('emailCentre'), '@') ? "mailto:" . reactor_option('emailCentre') : reactor_option('emailCentre');
        ?>
            <div class="targeta_id_centre row">
		<?php 
        if (reactor_option('logo_image')) {
            if (reactor_option('logo_inline')) {
                $class_logo = "logo_inline";
                $class_addr = "addr-centre";
                $amplada = "6";
            } else {
                $class_logo = "logo_clear";
                $class_addr = "logo_clear";
                $amplada = "12";
            }
            ?>
			<div class="<?php 
            reactor_columns(array($amplada, 12));
            echo " " . $class_logo;
            ?>
 hide-for-small"> 
				<img src="<?php 
            echo reactor_option('logo_image');
            ?>
">					
			</div> 
		<?php 
        } else {
            $amplada = "12";
            $class = "no_logo";
        }
        ?>
                
                <?php 
        list($postal_code, $locality) = explode(" ", reactor_option("cpCentre"), 1);
        ?>
            
		<div class="<?php 
        reactor_columns($amplada);
        echo " " . $class_addr;
        ?>
 ">
                    <div class="vcard">
                        <span id="tar-nomCentre"><?php 
        echo reactor_option('nomCanonicCentre');
        ?>
</span>
                        <div class="adr">
                            <span class="street-address"><?php 
        echo reactor_option('direccioCentre');
        ?>
</span><br>
                            <span class="postal-code"><?php 
        echo trim($postal_code);
        ?>
</span> 
                            <span class="locality"><?php 
        echo trim($locality);
        ?>
</span>  
                            <span  class="region" title="Catalunya">Catalunya</span>
                            <span  class="country-name">Espanya</span>
                            <div class="tel">
                                <span><?php 
        echo reactor_option('telCentre');
        ?>
</span>
                            </div>
                            <a id="tar-mapa" href="<?php 
        echo reactor_option('googleMaps');
        ?>
">mapa</a> 
                            <span class="pipe" >|</span> 
                            <a id="tar-contacte" href="<?php 
        echo $contacte;
        ?>
">contacte</a>
                            
                        </div>		 
                    </div>	
		 </div>		 
            </div>
  	<?php 
        echo $args['after_widget'];
    }
开发者ID:pausaura,项目名称:agora_nodes,代码行数:92,代码来源:giny-logo-centre.php

示例14: reactor_option

<?php

/**
 * The loop for displaying posts on the news page template
 *
 * @package Reactor
 * @subpackage loops
 * @since 1.0.0
 */
?>

<?php 
// the get options
$number_posts = reactor_option('newspage_number_posts', 10);
$post_columns = reactor_option('newspage_post_columns', 2);
?>

					<?php 
// start post the loop
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'post', 'posts_per_page' => $number_posts, 'paged' => $paged);
global $newspage_query;
$newspage_query = new WP_Query($args);
?>
                    
				    <?php 
if ($newspage_query->have_posts()) {
    ?>

                    	<?php 
    while ($newspage_query->have_posts()) {
开发者ID:terngkub,项目名称:reactor,代码行数:31,代码来源:loop-newspage.php

示例15: reactor_do_nav_single

/**
 * Single post nav 
 * in single.php
 * 
 * @since 1.0.0
 */
function reactor_do_nav_single()
{
    if (is_single()) {
        $exclude = reactor_option('frontpage_exclude_cat', 1) ? reactor_option('frontpage_post_category', '') : '';
        ?>
        <nav class="nav-single">
            <span class="nav-previous alignleft">
            <?php 
        previous_post_link('%link', '<span class="meta-nav">' . _x('&larr;', 'Previous post link', 'reactor') . '</span> %title', false, $exclude);
        ?>
            </span>
            <span class="nav-next alignright">
            <?php 
        next_post_link('%link', '%title <span class="meta-nav">' . _x('&rarr;', 'Next post link', 'reactor') . '</span>', false, $exclude);
        ?>
            </span>
        </nav><!-- .nav-single -->
<?php 
    }
}
开发者ID:aaronfrey,项目名称:PepperLillie-Cambridge,代码行数:26,代码来源:content-posts.php


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