/**
 * Pagination for Archives
 * Either "older/newer" or numbered navigation to view pages of posts
 * Displayed on the default front page template with a loop of posts, 
 * and of course on all archive pages after the loop
 * 
 * @since 1.0.0
 */
function inti_do_archive_pagination()
{
    $pagination_type = get_inti_option('pagination', 'inti_general_options');
    if (is_page_template('page-templates/front-page.php') && current_theme_supports('inti-pagination')) {
        $show_page_links = get_inti_option('frontpage_page_links', 0);
        if ($show_page_links) {
            inti_filter_archive_pagination(array('query' => 'frontpage_query', 'type' => $pagination_type));
        }
    } elseif (current_theme_supports('inti-pagination')) {
        inti_filter_archive_pagination(array('type' => $pagination_type));
    }
}
Esempio n. 2
0
 function inti_get_layout($meta)
 {
     // set a default layout
     $layout = get_inti_option('site_layout', 'inti_customizer_options', '2c-l');
     // check to see if $meta was provided, if it wasn't, the page in question will be an archive
     if ($meta == "") {
         $meta = "default";
     }
     // this is a single post - compare selected layouts and establish which has priority
     if (is_single()) {
         // get customizer option for default post layout, if none, use site layout default
         $layout = get_inti_option('post_layout', 'inti_customizer_options', $layout);
         // check if the metabox option has been set to override - if it isn't still on default, it has been changed, use that
         if ($meta != "default") {
             $layout = $meta;
         }
     }
     // this is a static page - compare selected layouts and establish which has priority
     if (is_page()) {
         // get customizer option for default page layout, if none, use site layout default
         $layout = get_inti_option('page_layout', 'inti_customizer_options', $layout);
         // check if the metabox option has been set to override - if it isn't still on default, it has been changed, use that
         if ($meta != "default") {
             $layout = $meta;
         }
     }
     // this is a archive - compare selected layouts and establish which has priority
     if (is_archive() || is_home() || is_search()) {
         // get customizer option for default archive layout, if none, use site layout default
         $layout = get_inti_option('archive_layout', 'inti_customizer_options', $layout);
     }
     // this is the frontpage - use site default or metabox value only
     if (is_front_page()) {
         if ($meta != "default") {
             $layout = $meta;
         }
     }
     // return final layout
     return $layout;
 }
/**
 * Breadcrumbs at the bottom
 * Add breadcrumb links after the main content block
 * 
 * @since 1.0.1
 * @version 1.2.4
 */
function inti_do_content_after_breadcrumbs()
{
    if (current_theme_supports('inti-breadcrumbs')) {
        if (get_inti_option('breadcrumbs', 'inti_general_options') == "bottom" || get_inti_option('breadcrumbs', 'inti_general_options') == "topbottom") {
            if (is_front_page() && get_inti_option('frontpage_breadcrumbs', 'inti_general_options') == '1') {
                // do nothing, no breadcrumbs on front page
            } else {
                ?>

				<div class="breadcrumbs bottom">
					<div class="row">
						<div class="columns">
							<?php 
                echo inti_get_breadcrumbs();
                ?>
						</div><!-- .columns -->
					</div><!-- .row -->
				</div><!-- .breadcrumbs -->
<?php 
            }
        }
    }
}
Esempio n. 4
0
/**
 * Create an array of fonts to be enqueued
 *
 * @since 1.0.0
 */
function inti_do_typography_google_fonts()
{
    $all_google_fonts = array_keys(inti_get_typography_google_fonts());
    // Get the font face for each option and put it in an array
    $title_font = get_inti_option('title_font', 'inti_customizer_options', "'Helvetica Neue', Helvetica, Arial, sans-serif");
    $paragraph_font = get_inti_option('paragraph_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h1_font = get_inti_option('h1_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h2_font = get_inti_option('h2_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h3_font = get_inti_option('h3_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h4_font = get_inti_option('h4_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h5_font = get_inti_option('h5_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $h6_font = get_inti_option('h6_font', 'inti_customizer_options', "'Open Sans', sans-serif");
    $selected_fonts = array($title_font, $paragraph_font, $h1_font, $h2_font, $h3_font, $h4_font, $h5_font, $h6_font);
    // Remove any duplicates in the list
    $selected_fonts = array_unique($selected_fonts);
    // Check each of the unique fonts against the defined Google fonts
    // If it is a Google font, go ahead and call the function to enqueue it
    foreach ($selected_fonts as $font) {
        if (in_array($font, $all_google_fonts)) {
            inti_do_typography_enqueue_google_font($font);
        }
    }
}
Esempio n. 5
0
/**
 * Post/Page footer comments link 
 * Gets a link to the post and page footers with a link that shows the number
 * of comments and takes the user to the #respond area when clicked
 * 
 * @since 1.0.7
 */
function inti_get_post_page_footer_comments_link()
{
    $system = get_inti_option('commenting_system', 'inti_commenting_options');
    ob_start();
    if (comments_open()) {
        switch ($system) {
            case 'wordpress':
                ?>
				<div class="comments-link">
					<i class="fi fi-comments" title="Comments"></i>
					<?php 
                comments_popup_link('<span class="leave-comment">' . __('Leave a comment', 'inti') . '</span>', __('1 Comment', 'inti'), __('% Comments', 'inti'));
                ?>
				</div><!-- .comments-link -->
				<?php 
                break;
            case 'disqus':
                ?>
				<div class="comments-link">
					<i class="fi fi-comments" title="Comments"></i>
					<a href="<?php 
                the_permalink();
                ?>
#disqus_thread"></a>
				</div><!-- .comments-link -->
				<?php 
                break;
            case 'facebook':
                ?>
				<div class="comments-link">
					<i class="fi fi-comments" title="Comments"></i>
					<fb:comments-count href="<?php 
                the_permalink();
                ?>
"></fb:comments-count>
				</div><!-- .comments-link -->
				<?php 
                break;
            case 'google':
                ?>
				<div class="comments-link">
					<i class="fi fi-comments" title="Comments"></i>
					<span class="leave-comment"><div class="g-commentcount" data-href="<?php 
                the_permalink();
                ?>
"></div></span>
				</div><!-- .comments-link -->
				<?php 
                break;
        }
    }
    $comments_link = ob_get_clean();
    return $comments_link;
}
/**
 * Add main menu before or after site banner
 * add or remove .row to control max width
 * 
 * @since 1.0.4
 */
function child_do_main_dropdown_menu()
{
    //adds the main menu
    if (has_nav_menu('dropdown-menu')) {
        ?>
		<nav class="top-bar" id="top-bar-menu">
			<div class="row">

			<?php 
        /**
         * Add logo or site title to the navigation bar, in addition or instead of having the site banner
         */
        $mobilebanner = get_inti_option('show_nav_logo_title', 'inti_customizer_options', 'none');
        if ($mobilebanner != 'none') {
            ?>
				<div class="top-bar-left float-left hide-for-mlarge mobile-banner">
					<ul class="menu">
						<li class="menu-text site-logo">
							<?php 
            if (get_inti_option('nav_logo_image', 'inti_customizer_options')) {
                ?>
								<?php 
                inti_do_srcset_image(get_inti_option('nav_logo_image', 'inti_customizer_options'), esc_attr(get_bloginfo('name', 'display') . ' logo'));
                ?>
							<?php 
            }
            ?>
						</li>
						<li class="menu-text site-title"><?php 
            bloginfo('name');
            ?>
</li>
					</ul>
				</div>
			<?php 
        }
        ?>
				<div class="top-bar-left show-for-mlarge main-dropdown-menu">
					<?php 
        echo inti_get_dropdown_menu();
        ?>
				</div>
				<div class="top-bar-right show-for-mlarge">
					<?php 
        $showsocial = get_inti_option('nav_social', 'inti_headernav_options');
        if ($showsocial) {
            echo inti_get_dropdown_social_links();
        }
        ?>
				</div>
				<div class="top-bar-right float-right hide-for-mlarge">
					<ul class="menu">
						<li class="menu-text off-canvas-button"><a data-toggle="inti-off-canvas-menu">
							<div class="hamburger">
								<span></span>
								<span></span>
								<span></span>
							</div>
						</a></li>
					</ul>
				</div>
			</div>
		</nav>
	<?php 
    }
}
/**
 * Footer social media
 * Adds linked icons to various social media profiles set in theme options
 * 
 * @since 1.0.5
 */
function child_do_footer_social()
{
    if (get_inti_option('footer_social', 'inti_footer_options')) {
        ?>
		<div class="footer-social">
			<div class="row">
				<div class="large-12 columns">
					<?php 
        echo inti_get_footer_social_links();
        ?>
				</div><!-- .columns -->
				
			</div><!-- .row -->
		</div><!-- .footer-social -->
<?php 
    }
}
/**
 * Footer Custom JS
 * Add custom JS from theme options into the page footer
 * 
 * @since 1.0.0
 */
function inti_do_footer_js()
{
    $customjs = stripslashes(get_inti_option('footer_js', 'inti_footer_options'));
    if ($customjs) {
        ?>
		<!-- Custom JS -->
		<script>
			<?php 
        echo $customjs;
        ?>
		</script>
		<!-- End Custom JS -->
<?php 
    }
}
				<?php 
inti_hook_site_banner_site_logo_before();
?>
				<?php 
if (get_inti_option('logo_image', 'inti_customizer_options')) {
    ?>
				<div class="site-logo">
					<a href="<?php 
    echo esc_url(home_url('/'));
    ?>
" title="<?php 
    echo esc_attr(get_bloginfo('name', 'display'));
    ?>
" rel="home">
						<?php 
    inti_do_srcset_image(get_inti_option('logo_image', 'inti_customizer_options'), esc_attr(get_bloginfo('name', 'display') . ' logo'));
    ?>
					</a>
				</div><!-- .site-logo -->
				<?php 
    inti_hook_site_banner_site_logo_after();
    ?>
				<?php 
    inti_hook_site_banner_title_area_before();
    ?>
				<?php 
}
// end of logo
?>
				<div class="title-area">
					<h1 class="site-title"><a href="<?php 
Esempio n. 10
0
/**
 * Add Customizer generated CSS to header
 *
 * @since 1.0.0
 */
function inti_customizer_css()
{
    do_action('inti_customizer_css');
    $output = '';
    if (0 == get_inti_option('show_title', 'inti_customizer_options', 1)) {
        $output .= "\n" . '.site-banner .title-area { display: none; }';
    }
    if ('none' == get_inti_option('show_nav_logo_title', 'inti_customizer_options', 1)) {
        $output .= "\n" . '.top-bar .site-logo, .top-bar .site-title { display: none; }';
    } elseif ('image' == get_inti_option('show_nav_logo_title', 'inti_customizer_options', 1)) {
        $output .= "\n" . '.top-bar .site-title { display: none; }';
    } else {
        $output .= "\n" . '.top-bar .site-logo { display: none; }';
    }
    if ("'Helvetica Neue', Helvetica, Arial, sans-serif" != get_inti_option('title_font', 'inti_customizer_options', "'Helvetica Neue', Helvetica, Arial, sans-serif")) {
        $output .= "\n" . '.entry-title { font-family: ' . get_inti_option('title_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('title_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-title { color: ' . get_inti_option('title_color', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('link_color', 'inti_customizer_options')) {
        $output .= "\n" . 'a { color: ' . get_inti_option('link_color', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('link_hover_color', 'inti_customizer_options')) {
        $output .= "\n" . 'a:hover { color: ' . get_inti_option('link_hover_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('paragraph_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content, .entry-summary { font-family: ' . get_inti_option('paragraph_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('paragraph_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content p, .entry-content li, .entry-summary p, .entry-summary li { font-size: ' . get_inti_option('paragraph_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('paragraph_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content, .entry-summary { color: ' . get_inti_option('paragraph_color', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('content_link_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content a, .entry-summary a { color: ' . get_inti_option('content_link_color', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('content_link_hover_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content a:hover, .entry-summary a:hover { color: ' . get_inti_option('content_link_hover_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h1_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h1, .entry-summary h1 { font-family: ' . get_inti_option('h1_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h1_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h1, .entry-summary h1 { font-size: ' . get_inti_option('h1_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h1_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h1, .entry-summary h1 { color: ' . get_inti_option('h1_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h2_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h2, .entry-summary h2 { font-family: ' . get_inti_option('h2_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h2_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h2, .entry-summary h2 { font-size: ' . get_inti_option('h2_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h2_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h2, .entry-summary h2 { color: ' . get_inti_option('h2_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h3_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h3, .entry-summary h3 { font-family: ' . get_inti_option('h3_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h3_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h3, .entry-summary h3 { font-size: ' . get_inti_option('h3_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h3_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h3, .entry-summary h3 { color: ' . get_inti_option('h3_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h4_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h4, .entry-summary h4 { font-family: ' . get_inti_option('h4_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h4_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h4, .entry-summary h4 { font-size: ' . get_inti_option('h4_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h4_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h4, .entry-summary h4 { color: ' . get_inti_option('h4_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h5_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h5, .entry-summary h5 { font-family: ' . get_inti_option('inti_customizer_options', 'h5_font') . '; }';
    }
    if (get_inti_option('h5_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h5, .entry-summary h5 { font-size: ' . get_inti_option('h5_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h5_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h5, .entry-summary h5 { color: ' . get_inti_option('h5_color', 'inti_customizer_options') . '; }';
    }
    if ("'Open Sans', sans-serif" != get_inti_option('h6_font', 'inti_customizer_options', "'Open Sans', sans-serif")) {
        $output .= "\n" . '.entry-content h6, .entry-summary h6 { font-family: ' . get_inti_option('h6_font', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h6_size', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h6, .entry-summary h6 { font-size: ' . get_inti_option('h6_size', 'inti_customizer_options') . '; }';
    }
    if (get_inti_option('h6_color', 'inti_customizer_options')) {
        $output .= "\n" . '.entry-content h6, .entry-summary h6 { color: ' . get_inti_option('h6_color', 'inti_customizer_options') . '; }';
    }
    echo $output ? '<style type="text/css">' . apply_filters('inti_customizer_css', $output) . "\n" . '</style>' . "\n" : '';
}
/**
 * Comments area
 * Adds a comment area to the end of posts and pages
 * 
 * @since 1.0.0
 */
function inti_do_post_page_comments()
{
    $system = get_inti_option('commenting_system', 'inti_commenting_options');
    if (comments_open() || '0' != get_comments_number()) {
        switch ($system) {
            case 'wordpress':
                comments_template('', true);
                break;
            case 'disqus':
                $lang = get_inti_option('fbcomments_lang', 'inti_commenting_options');
                ?>
				<section id="comments">
					<div id="disqus_thread"></div>
					<script type="text/javascript">
						/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
						var disqus_shortname = '<?php 
                echo get_inti_option('disqus_shortname', 'inti_commenting_options');
                ?>
';
						var disqus_config = function () {
							this.page.identifier = 'post-<?php 
                the_ID();
                ?>
';
						};
	
						(function() {
							var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
							dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
							(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
						})();
						
						(function () {
							var s = document.createElement('script'); s.async = true;
							s.type = 'text/javascript';
							s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
							this.page.identifier = '/december-2010/the-best-day-of-my-life/';
							(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
						}());
					</script>
					<noscript>Please enable JavaScript to view the <a href="//disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
				</section><!-- #comments -->
				<?php 
                break;
            case 'facebook':
                $lang = get_inti_option('fbcomments_lang', 'inti_commenting_options');
                $appid = get_inti_option('fbcomments_appid', 'inti_commenting_options');
                $amount = get_inti_option('fbcomments_amount', 'inti_commenting_options');
                $width = get_inti_option('fbcomments_width', 'inti_commenting_options');
                $scheme = get_inti_option('fbcomments_colorscheme', 'inti_commenting_options');
                ?>
				<section id="comments">
					<div id="fb-root"></div>
					<script>(function(d, s, id) {
					  var js, fjs = d.getElementsByTagName(s)[0];
					  if (d.getElementById(id)) return;
					  js = d.createElement(s); js.id = id;
					  js.src = "//connect.facebook.net/<?php 
                echo $lang;
                ?>
/sdk.js#xfbml=1&appId=<?php 
                echo $appid;
                ?>
&version=v2.3";
					  fjs.parentNode.insertBefore(js, fjs);
					}(document, 'script', 'facebook-jssdk'));</script>
					<fb:comments href="<?php 
                the_permalink();
                ?>
" num_posts="<?php 
                echo $amount;
                ?>
" width="<?php 
                echo $width;
                ?>
" colorscheme="<?php 
                echo $scheme;
                ?>
"></fb:comments>
				</section><!-- #comments -->
				<?php 
                break;
            case 'google':
                ?>
				<section id="comments">
					<script src="https://apis.google.com/js/plusone.js">
					</script>
					<div class="g-comments"
						data-href = window.location
						data-width = "650"
						data-first_party_property = "BLOGGER"
						data-view_type = "FILTERED_POSTMOD">
					</div>
				</section><!-- #comments -->
				<?php 
                break;
        }
    }
}
Esempio n. 12
0
 function inti_get_sticky_sidebars($meta)
 {
     // set a default state
     $sticky = get_inti_option('sticky_sidebars', 'inti_customizer_options', 'static');
     // check to see if $meta was provided, if it wasn't, the page in question will be an archive
     if ($meta == "") {
         $meta = "default";
     }
     // compare selected states and establish which has priority
     // get customizer option for default sidebar stickiness, if none is set, use site state default
     $sticky = get_inti_option('sticky_sidebars', 'inti_customizer_options', $sticky);
     // check if the metabox option has been set to override - if it isn't still on default, it has been changed, use that
     if ($meta != "default") {
         $sticky = $meta;
     }
     // this is the frontpage - we might not let the sidebars stick, but we do here by default
     if (is_front_page()) {
         if ($meta != "default") {
             $sticky = $meta;
         }
     }
     // return final sticky
     return $sticky;
 }
/**
 * Display blog posts on the homepage - variant 1
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.2
 * @version 1.0.8
 */
// get the options
$show = get_inti_option('fpb_post_show', 'inti_customizer_options', 1);
$post_category = get_inti_option('fpb_post_category', 'inti_customizer_options', 0);
$number_posts = get_inti_option('fpb_post_number', 'inti_customizer_options', 3);
$order = get_inti_option('fpb_post_order', 'inti_customizer_options', 'DESC');
$showlinktoblog = get_inti_option('fpb_blog_link_show', 'inti_customizer_options', 0);
$bloglinkurl = get_inti_option('fpb_blog_link_url', 'inti_customizer_options', get_permalink(get_option('page_for_posts')));
$bloglinktext = get_inti_option('fpb_blog_link_text', 'inti_customizer_options', __('View All Posts', 'inti-child'));
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'post', 'cat' => $post_category, 'posts_per_page' => $number_posts, 'order' => $order, 'ignore_sticky_posts' => 1, 'paged' => $paged);
global $frontpage_query;
if ($show) {
    $frontpage_query = new WP_Query($args);
    ?>
	<section class="block blog-posts variant-1">

		<?php 
    if ($frontpage_query->have_posts()) {
        $odd = true;
        ?>

			
				<?php 
 * @package Inti
 * @subpackage blocks
 * @since 1.0.3
 * @version 1.0.8
 */
// get the options
$show = get_inti_option('fpb_testimonials_show', 'inti_customizer_options', 1);
$title = get_inti_option('fpb_testimonials_title', 'inti_customizer_options');
$description = get_inti_option('fpb_testimonials_description', 'inti_customizer_options');
$testimonial_category = get_inti_option('fpb_testimonials_category', 'inti_customizer_options', 0);
$number_posts = get_inti_option('fpb_testimonials_post_number', 'inti_customizer_options', -1);
$order = get_inti_option('fpb_testimonials_order', 'inti_customizer_options', 'ASC');
$content = get_inti_option('fpb_testimonials_content', 'inti_customizer_options', 'excerpt');
$hide_photos = get_inti_option('fpb_testimonials_hide_photos', 'inti_customizer_options', '');
$linkto_type = get_inti_option('fpb_testimonials_linkto_type', 'inti_customizer_options', '');
$linkto_page = get_inti_option('fpb_testimonials_linkto_page', 'inti_customizer_options', '');
$args = "";
if ($testimonial_category == 0) {
    $args = array('post_type' => 'inti-testimonial', 'posts_per_page' => $number_posts, 'order' => $order, 'orderby' => 'date', 'ignore_sticky_posts' => 1);
} else {
    $args = array('post_type' => 'inti-testimonial', 'tax_query' => array(array('taxonomy' => 'inti-testimonial-category', 'field' => 'id', 'terms' => $testimonial_category)), 'posts_per_page' => $number_posts, 'order' => $order, 'orderby' => 'date', 'ignore_sticky_posts' => 1);
}
if ($show) {
    $testimonials = new WP_Query($args);
    ?>
	<section class="block testimonials">
		<div class="row">
			<div class="column">
				<?php 
    if ($title || $description) {
        ?>
Esempio n. 15
0
 function inti_get_widget_social_links()
 {
     $fb = get_inti_option('social_fb', 'inti_social_options');
     $tw = get_inti_option('social_tw', 'inti_social_options');
     $gp = get_inti_option('social_gp', 'inti_social_options');
     $li = get_inti_option('social_li', 'inti_social_options');
     $in = get_inti_option('social_in', 'inti_social_options');
     $pi = get_inti_option('social_pi', 'inti_social_options');
     $yt = get_inti_option('social_yt', 'inti_social_options');
     $vi = get_inti_option('social_vi', 'inti_social_options');
     $blank = get_inti_option('social_open_new', 'inti_social_options');
     if ($blank) {
         $blank = ' target="_blank"';
     }
     $html = '<ul class="social-icons">';
     // foundicons
     // if ($fb) $html .= '<li class="social-fb"><a href="'. $fb .'"'. $blank .'><i class="fi fi-social-facebook"></i></a></li>';
     // if ($tw) $html .= '<li class="social-tw"><a href="'. $tw .'"'. $blank .'><i class="fi fi-social-twitter"></i></a></li>';
     // if ($gp) $html .= '<li class="social-gp"><a href="'. $gp .'"'. $blank .'><i class="fi fi-social-google-plus"></i></a></li>';
     // if ($li) $html .= '<li class="social-li"><a href="'. $li .'"'. $blank .'><i class="fi fi-social-linkedin"></i></a></li>';
     // if ($in) $html .= '<li class="social-in"><a href="'. $in .'"'. $blank .'><i class="fi fi-social-instagram"></i></a></li>';
     // if ($pi) $html .= '<li class="social-pi"><a href="'. $pi .'"'. $blank .'><i class="fi fi-social-pinterest"></i></a></li>';
     // if ($yt) $html .= '<li class="social-yt"><a href="'. $yt .'"'. $blank .'><i class="fi fi-social-youtube"></i></a></li>';
     // if ($vi) $html .= '<li class="social-vi"><a href="'. $vi .'"'. $blank .'><i class="fi fi-social-vimeo"></i></a></li>';
     // fontawesome
     if ($fb) {
         $html .= '<li class="social-fb"><a href="' . $fb . '"' . $blank . '><i class="fa fa-facebook"></i></a></li>';
     }
     if ($tw) {
         $html .= '<li class="social-tw"><a href="' . $tw . '"' . $blank . '><i class="fa fa-twitter"></i></a></li>';
     }
     if ($gp) {
         $html .= '<li class="social-gp"><a href="' . $gp . '"' . $blank . '><i class="fa fa-googleplus"></i></a></li>';
     }
     if ($li) {
         $html .= '<li class="social-li"><a href="' . $li . '"' . $blank . '><i class="fa fa-linkedin"></i></a></li>';
     }
     if ($in) {
         $html .= '<li class="social-in"><a href="' . $in . '"' . $blank . '><i class="fa fa-instagram"></i></a></li>';
     }
     if ($pi) {
         $html .= '<li class="social-pi"><a href="' . $pi . '"' . $blank . '><i class="fa fa-pinterest"></i></a></li>';
     }
     if ($yt) {
         $html .= '<li class="social-yt"><a href="' . $yt . '"' . $blank . '><i class="fa fa-youtube"></i></a></li>';
     }
     if ($vi) {
         $html .= '<li class="social-vi"><a href="' . $vi . '"' . $blank . '><i class="fa fa-vimeo"></i></a></li>';
     }
     $html .= '</ul>';
     return apply_filters('inti_filter_footer_social_links', $html);
 }
Esempio n. 16
0
                echo esc_attr($comment_author_url);
                ?>
" size="22" tabindex="3">
		</p>
		<?php 
            }
            ?>
		<p>
			<label for="comment"><?php 
            _e('Comment', 'inti');
            ?>
</label>
			<textarea name="comment" id="comment" rows="4" tabindex="4"></textarea>
		</p>
		<?php 
            if (get_inti_option('comments_show_allowed_tags', 'inti_commenting_options', false)) {
                ?>
			<p id="allowed_tags" class="small"><strong>HTML:</strong> <?php 
                _e('You can use these tags:', 'inti');
                ?>
 <code><?php 
                echo allowed_tags();
                ?>
</code></p>
		<?php 
            }
            ?>
		<p><input name="submit" class="button" type="submit" id="submit" tabindex="5" value="<?php 
            esc_attr_e('Submit Comment', 'inti');
            ?>
"></p>
Esempio n. 17
0
/**
 * The sidebar template containing the main widget area
 *
 * @package Inti
 * @subpackage Templates
 * @since 1.0.0
 * @version 1.2.0
 */
?>

<?php 
// get the page layout
wp_reset_postdata();
$layout = inti_get_layout(get_inti_option('', '', '', '_inti_layout_radio'));
$sticky = inti_get_sticky_sidebars(get_inti_option('', '', '', '_inti_layout_stickysidebars'));
?>
	
<?php 
inti_hook_sidebar_before();
?>

<?php 
// Build column classes depending on layout
$column_classes = "";
$has_sidebar = true;
switch ($layout) {
    case '1c':
    case '1c-thin':
        $has_sidebar = false;
        break;
<?php

// get the id of the opt in
$optin_id = get_inti_option('footer_opt_in', 'inti_customizer_options', '-1');
//fetch the opt in
$optin_object = get_post($optin_id);
if ($optin_object && $optin_object->post_type == "inti-opt-in" && $optin_object->post_status == "publish") {
    // get its meta
    $action = get_post_meta($optin_id, '_inti_opt_in_url', true);
    $target = get_post_meta($optin_id, '_inti_opt_in_target', true);
    $hidden = get_post_meta($optin_id, '_inti_opt_in_hidden', true);
    $button_text = get_post_meta($optin_id, '_inti_opt_in_button_text', true);
    $button_name = get_post_meta($optin_id, '_inti_opt_in_button_name', true);
    $form_name = get_post_meta($optin_id, '_inti_opt_in_form_name', true);
    $first_name_name = get_post_meta($optin_id, '_inti_opt_in_first_name_name', true);
    $first_name_placeholder = get_post_meta($optin_id, '_inti_opt_in_first_name_placeholder', true);
    $first_name_required = get_post_meta($optin_id, '_inti_opt_in_first_name_required', true);
    $email_name = get_post_meta($optin_id, '_inti_opt_in_email_name', true);
    $email_placeholder = get_post_meta($optin_id, '_inti_opt_in_email_placeholder', true);
    $email_required = get_post_meta($optin_id, '_inti_opt_in_email_required', true);
    ?>
		<section class="opt-in footer">
			<div class="row">
				<div class="small-12 medium-6 mlarge-5 columns">
					<div class="opt-in-lead-in">
						<?php 
    echo wpautop(do_shortcode($optin_object->post_content));
    ?>
					</div>
				</div>
				<div class="small-12 medium-6 mlarge-7 columns">
<?php

/**
 * Display Google Map
 *
 * This block takes a Google Maps embed src and displays it on the front
 * page. 
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.9
 */
// get the options
$show = get_inti_option('fpb_gmap_show', 'inti_customizer_options', 1);
$src = get_inti_option('fpb_gmap_source', 'inti_customizer_options', 'https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d12090.470159428245!2d-73.9856644!3d40.7484405!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xd134e199a405a163!2sEmpire+State+Building!5e0!3m2!1sen!2spe!4v1462314250678');
if ($show) {
    ?>

	<section class="block gmap">	
		<iframe src="<?php 
    echo $src;
    ?>
" width="100%" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
	</section>

<?php 
}
Esempio n. 20
0
/**
 * Custom logo link url
 *
 * @since 1.0.0
 */
function inti_filter_get_login_logo_url()
{
    if (get_inti_option('login_logo_url', 'inti_customizer_options')) {
        return get_inti_option('login_logo_url', 'inti_customizer_options');
    }
}
Esempio n. 21
0
<?php

/**
 * The main template for a static front page
 *
 * @package Inti
 * @subpackage Templates
 * @since 1.0.0
 */
$layout = inti_get_layout(get_inti_option('', '', '', '_inti_layout_radio'));
get_header();
?>


	<div id="primary" class="site-content">
	
		<?php 
inti_hook_content_before();
?>
	
		<div id="content" role="main" class="<?php 
apply_filters('inti_filter_content_classes', '');
?>
">
			<div class="row">
				<?php 
switch ($layout) {
    case '1c':
        ?>

				<div class="small-12 medium-12 large-12 columns">
Esempio n. 22
0
} else {
    ?>
		<meta name="msapplication-TileImage" content="<?php 
    echo get_template_directory_uri();
    ?>
/library/img/win-tile-icon.png">
	<?php 
}
?>

	<!-- Site Theme Color -->
	<?php 
if (get_inti_option('theme_color', 'inti_customizer_options')) {
    ?>
		<meta name="theme-color" content="<?php 
    echo get_inti_option('theme_color', 'inti_customizer_options');
    ?>
">
	<?php 
} else {
    ?>
		<meta name="theme-color" content="#e80e8a">
	<?php 
}
?>
    
	
	<meta name="robots" content="index, follow" />
	<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
 * This block requires a accompanying post type to be created,
 * which by default would be called "inti-brand"
 *
 * This block also (normally) requires that each logo link to either
 * the magazine/newspaper/article that the logo represents a feature in
 * when not set up as a on-site page. This would require a metabox to be
 * added to the custom type.
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.2
 */
// get the options
$show = get_inti_option('fpb_featured_in_show', 'inti_customizer_options', 1);
$title = get_inti_option('fpb_featuredinblock_title', 'inti_customizer_options');
$description = get_inti_option('fpb_featuredinblock_description', 'inti_customizer_options');
if ($show) {
    $brands = new WP_Query(array('post_type' => 'inti-brand', 'order' => 'ASC', 'orderby' => 'menu_order', 'posts_per_page' => -1));
    ?>
	<section class="block featured-in">
		<div class="row">
			<div class="column">
				<?php 
    if ($title || $description) {
        ?>
				<header>
					<?php 
        if ($title) {
            ?>
<h3><?php 
            echo $title;
<?php

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

	<?php 
// get the options
$post_category = get_inti_option('frontpage_post_category', 'inti_general_options', -1);
$number_posts = get_inti_option('frontpage_number_posts', 'inti_general_options', 3);
$post_columns = get_inti_option('frontpage_post_columns', 'inti_general_options', 1);
?>

	<?php 
// start the loop
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = array('post_type' => 'post', 'cat' => $post_category, 'posts_per_page' => $number_posts, 'ignore_sticky_posts' => 1, 'paged' => $paged);
global $frontpage_query;
$frontpage_query = new WP_Query($args);
?>
			  
		<?php 
if ($frontpage_query->have_posts()) {
    ?>
		
		<?php 
 * represent. 
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.3
 * @version 1.0,4
 */
// get the options
$show = get_inti_option('fpb_services_show', 'inti_customizer_options', 1);
$title = get_inti_option('fpb_services_title', 'inti_customizer_options');
$description = get_inti_option('fpb_services_description', 'inti_customizer_options');
$service_category = get_inti_option('fpb_services_category', 'inti_customizer_options', 0);
$number_posts = get_inti_option('fpb_services_post_number', 'inti_customizer_options', 3);
$post_columns = get_inti_option('fpb_services_post_columns', 'inti_customizer_options', 3);
$order = get_inti_option('fpb_services_order', 'inti_customizer_options', 'ASC');
$default_action_text = get_inti_option('read_more_text', 'inti_general_options', 'Read more &raquo;');
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
$args = "";
if ($service_category == 0) {
    $args = array('post_type' => 'inti-service', 'posts_per_page' => $number_posts, 'order' => $order, 'orderby' => 'menu_order', 'ignore_sticky_posts' => 1, 'paged' => $paged);
} else {
    $args = array('post_type' => 'inti-service', 'tax_query' => array(array('taxonomy' => 'inti-service-category', 'field' => 'id', 'terms' => $service_category)), 'posts_per_page' => $number_posts, 'order' => $order, 'orderby' => 'menu_order', 'ignore_sticky_posts' => 1, 'paged' => $paged);
}
global $services_query;
if ($show) {
    $services_query = new WP_Query($args);
    ?>
	<section class="block services">
		<div class="row">
			<div class="column">
				<?php 
/**
 * Page Edit 
 * Add an edit button for a page in the page footer
 * 
 * @since 1.2.4
 * @version 1.2.5
 */
function inti_do_page_sharing()
{
    $sharing_pages = get_inti_option('sharing_on_pages', 'inti_general_options', false);
    $twitter = get_inti_option('sharing_platforms_twitter', 'inti_general_options', false);
    $facebook = get_inti_option('sharing_platforms_facebook', 'inti_general_options', false);
    $google = get_inti_option('sharing_platforms_google', 'inti_general_options', false);
    $linkedin = get_inti_option('sharing_platforms_linkedin', 'inti_general_options', false);
    $pinterest = get_inti_option('sharing_platforms_pinterest', 'inti_general_options', false);
    $tumblr = get_inti_option('sharing_platforms_tumblr', 'inti_general_options', false);
    //pinterest build
    $thumb = "";
    if (has_post_thumbnail(get_the_ID())) {
        $thumb = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'large');
        $thumb = rawurlencode($thumb[0]);
    }
    // Sharing on twitter adds via @handle into the message, we grab that from the profile given in the social options
    $twitteruser = get_inti_option('social_tw', 'inti_social_options');
    $twitteruser = substr($twitteruser, strrpos($twitteruser, "/") + 1);
    if ($sharing_pages) {
        ?>
		<div class="social-sharing">
			<span><?php 
        _e('Share with', 'inti');
        ?>
:</span>
			<ul>

			<?php 
        if ($twitter) {
            ?>
 
					<?php 
            if ($twitteruser) {
                ?>
						<li class="share-twitter"><a href="//www.twitter.com/share?url=<?php 
                echo urlencode(inti_get_tiny_url(get_permalink()));
                ?>
&text=<?php 
                echo urlencode(get_the_title());
                ?>
&via=<?php 
                echo $twitteruser;
                ?>
" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li>
					<?php 
            } else {
                ?>
						<li class="share-twitter"><a href="//www.twitter.com/share?url=<?php 
                echo urlencode(inti_get_tiny_url(get_permalink()));
                ?>
&text=<?php 
                echo urlencode(get_the_title());
                ?>
" title="Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li>
					<?php 
            }
            ?>
			<?php 
        }
        ?>

			<?php 
        if ($facebook) {
            ?>
				<li class="share-facebook"><a href="//www.facebook.com/sharer/sharer.php?u=<?php 
            echo urlencode(get_permalink());
            ?>
&t=<?php 
            echo urlencode(get_the_title());
            ?>
" title="Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li>
			<?php 
        }
        ?>

			<?php 
        if ($google) {
            ?>
				<li class="share-google"><a href="//plus.google.com/share?url=<?php 
            echo urlencode(get_permalink());
            ?>
" title="Google+" target="_blank"><i class="fa fa-google-plus"></i></a></li>
			<?php 
        }
        ?>

			<?php 
        if ($linkedin) {
            ?>
				<li class="share-linkedin"><a href="//www.linkedin.com/cws/share?url=<?php 
            echo urlencode(get_permalink());
            ?>
" title="LinkedIn" target="_blank"><i class="fa fa-linkedin"></i></a></li>
			<?php 
        }
        ?>

			<?php 
        if ($pinterest) {
            ?>
				<li class="share-pinterest"><a href="//pinterest.com/pin/create/link/?url=<?php 
            echo urlencode(get_permalink());
            ?>
%2F&description=<?php 
            echo urlencode(get_the_title());
            ?>
" title="Pinterest" target="_blank"><i class="fa fa-pinterest"></i></a></li>
			<?php 
        }
        ?>

			<?php 
        if ($tumblr) {
            ?>
				<li class="share-tumblr"><a href="//www.tumblr.com/share/link?url=<?php 
            echo urlencode(get_permalink());
            ?>
&name=<?php 
            echo urlencode(get_the_title());
            ?>
&description=<?php 
            echo urlencode(get_the_excerpt());
            ?>
" title="Tumblr" target="_blank"><i class="fa fa-tumblr"></i></a></li>
			<?php 
        }
        ?>

			</ul>
		</div>
		<?php 
    }
}
 * Display Video
 *
 * Shows a video with or without a title. Useful for a sales pitch or introduction
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.4
 */
// get the options
$show = get_inti_option('fpb_video_show', 'inti_customizer_options', 1);
$title = get_inti_option('fpb_video_title', 'inti_customizer_options');
$aspect = get_inti_option('fpb_video_aspect', 'inti_customizer_options', 'widescreen');
$source = get_inti_option('fpb_video_source', 'inti_customizer_options', 'YouTube');
$code = get_inti_option('fpb_video_code', 'inti_customizer_options', 'MtCMtC50gwY');
$button_text = get_inti_option('fpb_video_button_text', 'inti_customizer_options');
$button_link = get_inti_option('fpb_video_button_link', 'inti_customizer_options');
if ($show) {
    ?>

	<section class="block video">	
	<?php 
    if ($title) {
        ?>
	
		<div class="row">
			<div class="column">
				<header class="block-header">
					<h3><?php 
        echo $title;
        ?>
</h3>
/**
 * Display Personal Bio
 *
 * This block has just two options to display, a block of text and an accompanying image.
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.3
 */
// get the options
$show = get_inti_option('fpb_personal_bio_show', 'inti_customizer_options', 1);
$title = get_inti_option('fpb_personal_bio_title', 'inti_customizer_options');
$bio_text = get_inti_option('fpb_personal_bio', 'inti_customizer_options');
$bio_image = get_inti_option('fpb_personal_bio_image', 'inti_customizer_options');
$bio_link = get_inti_option('fpb_personal_bio_link', 'inti_customizer_options');
if ($show) {
    ?>
	<section class="block personal-bio">	
	<?php 
    if ($title) {
        ?>
	
		<div class="row">
			<div class="column">
				<header class="block-header">
					<h3><?php 
        echo $title;
        ?>
</h3>
				</header>
Esempio n. 29
0
/**
 * The template for displaying the quote post format
 *
 * @package Inti
 * @subpackage Templates
 * @since 1.0.0
 */
/**
 * In the Theme Options, users can choose whether post archives display the full posts
 * or a group of excerpts with a "read more" button to see the rest. Post formats should
 * check which option is set and modify the interface accordingly.
 * 1 == standard (shown on singles or on archives when option is set to 1)
 * 2 == short (shown on archives when option is set to 2)
 *
 */
$interface = get_inti_option('blog_interface', 'inti_general_options');
if ($interface == 1 || is_single()) {
    // standard interface
    ?>

	<article id="post-<?php 
    the_ID();
    ?>
" <?php 
    post_class();
    ?>
>        
		<div class="entry-body">
		
			<?php 
    inti_hook_post_header_before();
<?php

/**
 * Display Slogan
 *
 * This block shows a block of text, by default in a <h2>, and is generally used
 * to show a company slogan, often below a hero image in some designs
 *
 * @package Inti
 * @subpackage blocks
 * @since 1.0.9
 */
// get the options
$show = get_inti_option('fpb_slogan_show', 'inti_customizer_options', 1);
$slogan = get_inti_option('fpb_slogan', 'inti_customizer_options', 'Inti Foundation - Kitchen Sink child theme');
?>

<?php 
if ($show) {
    ?>
	

	<section class="block slogan">	

		<div class="row">
			<div class="column">
				<h2><?php 
    echo $slogan;
    ?>
</h2>
			</div>