예제 #1
0
 /**
  * Get Login Redirect Page URL
  *
  * @since ProGo 0.7.0
  * @param none
  * @uses pgb_get_login_page()
  * @uses get_permalink()
  * @return object or false
  */
 public static function pgb_get_redirect_page_url()
 {
     $redirect_page_id = pgb_get_option('login_redirect_page', get_option('page_on_front'));
     if (!$redirect_page_id) {
         return false;
     }
     return get_permalink($redirect_page_id);
 }
예제 #2
0
/**
 * Returns mobile logo only - non-responsive, always visible
 * @since ProGo 0.4
 * @return html
 */
function pgb_get_mobile_logo()
{
    $mobilelogo = pgb_get_option('logo_mobile');
    $title = get_bloginfo('name');
    $logo = sprintf(__('%s', 'pgb'), $title);
    if ($mobilelogo) {
        $logo = sprintf('<div class="mobilelogo show"><img src="%s" alt=""></div>', esc_attr($mobilelogo));
    }
    return $logo;
}
 static function problogger_masthead()
 {
     global $post;
     if (!$post) {
         return false;
     }
     $show = get_post_meta($post->ID, '_problogger_meta_masthead_show_key', true);
     if ('1' === $show) {
         return false;
     }
     if (!problogger_option('show_masthead', false)) {
         get_template_part('block', 'masthead');
         return false;
     }
     $the_post_id = problogger_option('masthead_post', false);
     if (!get_post_status($the_post_id)) {
         return false;
     }
     $the_post = get_post($the_post_id);
     $width = problogger_option('masthead_width', 'container');
     $the_content = apply_filters('the_content', $the_post->post_content);
     $breadcrumbs = pgb_get_option('show_breadcrumb') === '1' ? sprintf('<div id="breadcrumb-container">%s</div>', pgb_get_breadcrumbs()) : '';
     $output = $the_content;
     switch ($width) {
         case 'full':
             $output = sprintf('<header id="masthead" class="page-header problogger-header">%s%s</header>', $breadcrumbs, $the_content);
             break;
         case 'fullcontain':
             $output = sprintf('<header id="masthead" class="page-header problogger-header"><div class="container">%s%s</div></header>', $breadcrumbs, $the_content);
             break;
         case 'container':
         default:
             $output = sprintf('<header id="masthead" class="page-header problogger-header container">%s%s</header>', $breadcrumbs, $the_content);
             break;
     }
     return print $output;
 }
예제 #4
0
function pgb_body_classes($classes)
{
    $classes[] = 'pgb-theme-' . pgb_get_option('bootstrap_theme', 'default');
    return $classes;
}
예제 #5
0
 */
$show_footer_copyright = pgb_get_option('footer_show_copyright', false);
$default_copyright = 'Copyright &copy; ' . date('Y') . ' - ' . get_bloginfo('name');
if (!empty($show_footer_copyright) && '1' === $show_footer_copyright) {
    ?>
<footer id="colophon" class="site-footer" role="contentinfo">
	<?php 
    tha_footer_top();
    ?>
	<div class="container">
		<div class="row">
			<div class="col-xs-12 col-sm-12 col-md-8 pull-right text-right">
				<?php 
    wp_nav_menu(array('theme_location' => 'footer', 'container' => false, 'menu_class' => 'nav navbar-nav list-inline', 'fallback_cb' => '', 'depth' => 1, 'walker' => new wp_bootstrap_navwalker()));
    ?>
			</div>
			<div class="col-xs-12 col-sm-12 col-md-4 pull-left">
				<div class="site-copyright">
					<?php 
    echo pgb_get_option('footer_copyright_text', $default_copyright);
    ?>
				</div><!-- close .site-info -->
			</div>
		</div>
	</div><!-- close .container -->
	<?php 
    tha_footer_bottom();
    ?>
</footer><!-- close #colophon -->
<?php 
}
예제 #6
0
<?php

/**
 * Header Block - masthead
 *
 * This block renders below the Navbar and above site content
 *
 **/
?>
<header id="masthead" class="page-header" role="banner">
  <?php 
tha_header_top();
?>
    <?php 
if (pgb_get_option('show_breadcrumb') == '1') {
    pgb_block_breadcrumbs();
}
?>
    <div class="container">
      <div class="row">
        <?php 
pgb_block_page_title();
?>
      </div>
    </div><!-- .container -->
  <?php 
tha_header_bottom();
?>
</header><!-- #masthead -->
예제 #7
0
<?php

/**
* block-mainnav.php
*
* @return string
*/
$menuleftright = 'navbar-' . pgb_get_option('menu_align', 'left');
$fixed = pgb_get_option('nav_position', false);
$menustyle = '';
$datafix = '';
if ('fixed' === $fixed) {
    $menustyle = 'navbar-fixed-top';
    $datafix = 'data-spy="affix" data-offset-top="83"';
}
$navbar_width = pgb_get_option('navbar_width', 'container');
switch ($navbar_width) {
    case 'container-fluid':
        $menustyle = 'navbar-static-top';
        $navbar_width_inner = 'container';
        break;
    case 'full':
        $menustyle = 'navbar-static-top';
        $navbar_width_inner = 'container-fluid';
        break;
    case 'container':
    default:
        $menustyle = 'navbar-static-top';
        $navbar_width_inner = 'container-fluid';
        break;
}
예제 #8
0
<?php

/**
 * Footer Widget Area
 *
 */
$metabox_custom_page_footer = get_post_meta(get_the_ID(), 'metabox_page_footer_option', true);
$metabox_custom_page_footer_count = get_post_meta(get_the_ID(), 'custom_footer_layout', true);
$showFooter = pgb_get_option('footer_show', '1');
$footer_column = pgb_get_option('footer_columns', '3');
?>
<!-- Footer widget area -->
<div class="footerwidgetarea">
	<div class="container">
		<div class="row">
			<?php 
if (is_page()) {
    if ($metabox_custom_page_footer == "default" || !isset($metabox_custom_page_footer)) {
        if (!empty($showFooter) && '1' == $showFooter) {
            if (!empty($footer_column)) {
                if ($footer_column == 'default') {
                    ?>
										<div class="col-sm-4">
										<?php 
                    if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('footer-widget')) {
                        ?>
										<?php 
                    }
                    ?>
										</div>
										<?php 
예제 #9
0
					<span class="icon-bar"></span>
				</button>
				<!-- Your site title as branding in the menu --> 
				<a class="navbar-brand" href="<?php 
echo esc_url(home_url('/'));
?>
" title="<?php 
echo esc_attr(get_bloginfo('name', 'display'));
?>
" rel="home"><?php 
echo pgb_get_logo();
?>
</a>
			</div>
			<div class="collapse navbar-collapse navbar-responsive-collapse">
				<?php 
if (pgb_get_option('nav_search') == '1') {
    get_template_part('searchform', 'nav');
}
// Show search form
?>
				<?php 
// Main Menu
wp_nav_menu(array('theme_location' => 'primary', 'container' => false, 'menu_class' => 'nav navbar-nav ' . esc_attr($menuleftright), 'fallback_cb' => '', 'menu_id' => 'main-menu', 'walker' => new wp_bootstrap_navwalker()));
?>
			</div>
		</div>
	</div>
	<!-- .navbar --> 
</nav>
<!-- .site-navigation -->
예제 #10
0
    /**
     * Render Footer Widget columns
     *
     * @since ProGo 0.9.0
     * @param none
     * @return HTML
     */
    function pgb_footer_widget_columns()
    {
        $footer_columns = pgb_get_option('footer_widgets_columns', '4');
        $n = 12 / $footer_columns;
        $classes = array();
        // Build column width classes
        for ($i = 1; $i <= $footer_columns; $i++) {
            $class_xs = 'col-xs-12';
            $class_sm = 'col-sm-6';
            $class_md = 'col-md-' . $n;
            if (!($footer_columns % 2 == 0) && $i == 1) {
                $class_sm = 'col-sm-12';
                // For odd number of columns, we will set the first one full width
            }
            $classes[$i] = $class_xs . ' ' . $class_sm . ' ' . $class_md;
        }
        // Render the widget areas
        for ($i = 1; $i <= $footer_columns; $i++) {
            ?>
		<div class="<?php 
            echo $classes[$i];
            ?>
">
			<?php 
            $n = $i == 1 ? '' : '-' . $i;
            dynamic_sidebar('footer-widget' . $n);
            ?>
		</div>
	<?php 
        }
    }
예제 #11
0
 /**
  * Add LoginOut in Top Menu
  *
  * @since ProGo 0.7.0
  * @param $items nav menu items
  * @param $args nav menu args
  * @return string new menu item
  */
 public static function pgb_add_loginout_link($items, $args)
 {
     if (!pgb_get_option('login_link_nav_position')) {
         return $items;
     }
     $theme_locations = pgb_get_option('login_link_nav_position');
     $login_link = self::$login_url ? self::$login_url : wp_login_url();
     if (in_array($args->theme_location, $theme_locations)) {
         $link = false;
         if (is_user_logged_in()) {
             $link = '<a title="Log Out" href="' . wp_logout_url($login_link) . '">Log out</a>';
         } else {
             $link = '<a title="Login" href="' . $login_link . '">Login</a>';
         }
         $item = sprintf('<li id="menu-item-login-out" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-login-out">%s</li>', $link);
         $items .= $item;
     }
     return $items;
 }
예제 #12
0
<?php

/**
 * Footer Widget Area
 *
 */
$show_footer = pgb_get_option('footer_show_widgets', '1');
if (!empty($show_footer) && '1' == $show_footer) {
    ?>
<!-- Footer widget area -->
<div id="footerwidgets" class="footerwidgetarea">
	<div class="container">
		<div class="row">
			<?php 
    pgb_footer_widget_columns();
    ?>
		</div>
	</div>
</div>
<?php 
}
예제 #13
0
파일: page.php 프로젝트: nlk-sites/nectar7
<?php

/**
 * The template for displaying all pages.
 *
 * This is the template that displays all pages by default.
 *
 * @package pgb
 */
$template = false;
if (function_exists('pgb_get_option')) {
    $template = pgb_get_option('default_page_template', 'right');
}
if ('full' === $template) {
    locate_template('page-nosidebar.php', true);
} elseif ('left' === $template) {
    locate_template('page-sidebarleft.php', true);
} else {
    locate_template('page-sidebarright.php', true);
}
예제 #14
0
 /**
  * Check if page contains search
  *
  * @since ProGo 0.8.0
  * @param none
  * @return boolean If page includes search form return TRUE
  */
 function pgb_includes_search()
 {
     global $post, $wp_query;
     $includes_search = false;
     if (pgb_get_option('nav_search') == '1') {
         $includes_search = true;
     }
     if (function_exists('wp_get_sidebars_widgets')) {
         $sidebars_widgets = wp_get_sidebars_widgets();
         foreach ($sidebars_widgets as $sidebar_widget_array) {
             if (in_array('search-2', $sidebar_widget_array)) {
                 $includes_search = true;
             }
         }
     }
     return $includes_search;
 }
예제 #15
0
body_class();
?>
>

    <?php 
tha_body_top();
?>
    <?php 
tha_header_before();
?>
    <?php 
do_action('before');
?>

    <?php 
if (has_nav_menu('secondary') || '1' === pgb_get_option('nav_search')) {
    pgb_block_navbartop();
}
?>

    <?php 
pgb_block_navbar();
?>

    <?php 
pgb_block_masthead();
?>

    <?php 
tha_header_after();
?>
예제 #16
0
}
?>
<nav id="top-nav" class="navbar navbar-inverse site-navigation hidden-xs <?php 
echo $topmenustyle;
?>
 <?php 
echo $topnav_width;
?>
" <?php 
echo $datafix;
?>
 >
	<div  class="<?php 
echo $topnav_width_inner;
?>
 nav-contain" role="navigation">
		<div class="navbar-inner">
			<?php 
if ('1' === pgb_get_option('nav_search')) {
    get_template_part('searchform', 'nav');
}
// Show search form
?>
			<?php 
// Main Menu
wp_nav_menu(array('theme_location' => 'secondary', 'container' => false, 'menu_class' => 'nav navbar-nav navbar-right', 'fallback_cb' => '', 'menu_id' => 'top-menu', 'walker' => new wp_bootstrap_navwalker()));
?>
		</div>
	</div>
</nav>