コード例 #1
0
ファイル: footer.php プロジェクト: sharkness/csadv
    function csadv_socials_function()
    {
        $socials = array("facebook" => array("icon" => "fa fa-facebook", "target" => "_blank"), "twitter" => array("icon" => "fa fa-twitter", "target" => "_blank"), "flickr" => array("icon" => "fa fa-flickr", "target" => "_blank"), "google" => array("icon" => "fa fa-google-plus", "target" => "_blank"), "linkedin" => array("icon" => "fa fa-linkedin", "target" => "_blank"), "pinterest" => array("icon" => "fa fa-pinterest", "target" => "_blank"), "tumblr" => array("icon" => "fa fa-tumblr", "target" => "_blank"), "youtube" => array("icon" => "fa fa-youtube", "target" => "_blank"), "skype" => array("icon" => "fa fa-skype", "target" => "_self"), "instagram" => array("icon" => "fa fa-instagram", "target" => "_blank"), "github" => array("icon" => "fa fa-github", "target" => "_blank"), "xing" => array("icon" => "fa fa-xing", "target" => "_blank"), "whatsapp" => array("icon" => "fa fa-whatsapp", "target" => "_self"), "email" => array("icon" => "fa fa-envelope", "target" => "_self"));
        $i = 0;
        $html = "";
        foreach ($socials as $name => $attrs) {
            if (csadv_setting('csadv_footer_' . $name . '_button')) {
                $i++;
                $html .= '<a href="' . esc_url(csadv_setting('csadv_footer_' . $name . '_button'), array('http', 'https', 'tel', 'skype', 'mailto')) . '" target="' . $attrs['target'] . '" class="social ' . $name . '-button"> <i class="' . $attrs['icon'] . '" ></i> </a> ';
            }
        }
        if (csadv_setting('csadv_footer_rss_button') == "on") {
            $i++;
            $html .= '<a href="' . esc_url(get_bloginfo('rss2_url')) . '" title="Rss" class="social rss"> <i class="fa fa-rss" ></i>  </a> ';
        }
        if ($i > 0) {
            ?>
	
		<div class="socials">
				
			<?php 
            echo $html;
            ?>
							
		</div>
	
		<?php 
        }
    }
コード例 #2
0
ファイル: logo.php プロジェクト: sharkness/csadv
    function csadv_logo_function()
    {
        $class = "class='header-logo-area'";
        ?>
		
        <div id="logo" <?php 
        echo $class;
        ?>
>
        
            <a href="<?php 
        echo home_url();
        ?>
" title="<?php 
        bloginfo('name');
        ?>
">
                                                    
                <?php 
        if (csadv_setting('csadv_custom_logo')) {
            echo "<img src='" . csadv_setting('csadv_custom_logo') . "' alt='logo' class='header-logo'>";
            echo "<span class='sitename'>" . get_bloginfo('name') . "</span>";
            echo "<span class='sitedescription'>" . get_bloginfo('description') . "</span>";
        } else {
            echo "<span class='sitename'>" . get_bloginfo('name') . "</span>";
            echo "<span class='sitedescription'>" . get_bloginfo('description') . "</span>";
        }
        ?>
                                                        
            </a>
        
        </div>
                                    
<?php 
    }
コード例 #3
0
ファイル: infinitescroll.php プロジェクト: sharkness/csadv
    function csadv_infinitescroll_script_function($page)
    {
        if (csadv_setting($page) == "full") {
            $container = "'body.infinitescroll #blog'";
            $item = "#blog .post-container";
        } else {
            $container = "'body.infinitescroll #blog .row'";
            $item = "#blog .row .post-container";
        }
        ?>
	
		<script type="text/javascript">
	
			jQuery.noConflict()(function($){
						
				$(<?php 
        echo $container;
        ?>
).infinitescroll({
					navSelector  : ".wp-pagenavi",            
					nextSelector : ".wp-pagenavi a:first",    
					itemSelector : "<?php 
        echo $item;
        ?>
",
					loading: {
						img: "",
						msgText: '<div class="load-more"><i class="fa fa-circle-o-notch fa-spin"></i></div>',
					},
					
				}, 
					
				function(newElements) {
							
					var $newElems = $(newElements).css({
						opacity: 0
					});
					
					$newElems.imagesLoaded(function () {
								
						$newElems.animate({
							opacity: 1
						});
	
					});
					
				});
					
			});
						
		</script>
		
<?php 
    }
コード例 #4
0
ファイル: readmore.php プロジェクト: sharkness/csadv
 function csadv_excerpt_function()
 {
     global $post, $more;
     $more = 0;
     $class = 'button';
     $button = __('Read more', "csadv");
     if (csadv_setting('csadv_readmore_button') == "off") {
         $class = 'more';
         $button = ' [...] ';
     }
     if ($pos = strpos($post->post_content, '<!--more-->')) {
         $content = substr(apply_filters('the_content', get_the_content()), 0, -5);
     } else {
         $content = substr(apply_filters('the_excerpt', get_the_excerpt()), 0, -5);
     }
     echo $content . '<a class="' . $class . '" href="' . get_permalink($post->ID) . '" title="More">' . $button . '</a></p>';
 }
コード例 #5
0
ファイル: header.php プロジェクト: sharkness/csadv
bloginfo('charset');
?>
" />
<meta http-equiv="Content-Type" content="<?php 
bloginfo('html_type');
?>
; charset=<?php 
bloginfo('charset');
?>
" />

<?php 
if (csadv_setting('csadv_custom_favicon')) {
    ?>
<link rel="shortcut icon" href="<?php 
    echo csadv_setting('csadv_custom_favicon');
    ?>
"/><?php 
}
?>

<link rel="stylesheet" href="<?php 
bloginfo('stylesheet_url');
?>
" media="screen" />

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.2, user-scalable=yes" />

<!--[if IE 8]>
    <script src="<?php 
echo get_template_directory_uri();
コード例 #6
0
ファイル: archive.php プロジェクト: sharkness/csadv
<?php

get_header();
do_action('csadv_header_sidebar', 'header-sidebar-area');
if (!csadv_setting('csadv_category_layout') || csadv_setting('csadv_category_layout') == "masonry") {
    get_template_part('layouts/archive-masonry');
} else {
    get_template_part('layouts/archive-blog');
}
do_action('csadv_bottom_sidebar', 'bottom-sidebar-area');
get_footer();
コード例 #7
0
ファイル: masonry.php プロジェクト: sharkness/csadv
    function csadv_masonry_function()
    {
        ?>
	
		<div class="row" id="masonry">
			
			<?php 
        if (have_posts()) {
            while (have_posts()) {
                the_post();
                ?>
	   
                <article <?php 
                post_class();
                ?>
>
                
                    <?php 
                do_action('csadv_postformat');
                ?>
                
                </article>
	
			<?php 
            }
            do_action('csadv_masonry_script');
            if (csadv_setting('csadv_infinitescroll_system') == "on") {
                do_action('csadv_infinitescroll_masonry_script');
            }
        } else {
            ?>
    
                <article class="post-container col-md-12" >
            
					<div class="post-article">
            
						<h1><?php 
            _e('Content not found', "csadv");
            ?>
</h1>           
                            
						<p> <?php 
            _e('No article found in this blog.', "csadv");
            ?>
 </p>
            
						<h2> <?php 
            _e('What can i do?', "csadv");
            ?>
 </h2>           
            
						<p> <a href="<?php 
            echo esc_url(home_url('/'));
            ?>
" title="<?php 
            bloginfo('name');
            ?>
"> <?php 
            _e('Back to the homepage', "csadv");
            ?>
 </a> </p>
                          
						<p> <?php 
            _e('Make a search, from the below form:', "csadv");
            ?>
 </p>
                            
						<section class="contact-form">
                            
							<form method="get" id="searchform" action="<?php 
            echo home_url('/');
            ?>
">
							<input type="text" value="<?php 
            _e('Search', "csadv");
            ?>
" name="s" id="s" onblur="if (this.value == '') {this.value = '<?php 
            _e('Search', "csadv");
            ?>
';}" onfocus="if (this.value == '<?php 
            _e('Search', "csadv");
            ?>
') {this.value = '';}" class="input-search"/>
							<input type="submit" id="searchsubmit" class="button-search" value="<?php 
            _e('Search', "csadv");
            ?>
" />
							</form>
                                
							<div class="clear"></div>
                                
						</section>
             
                   </div>
            
                </article>
        
            <?php 
        }
        ?>
			
		</div>
		
	<?php 
    }
コード例 #8
0
ファイル: search.php プロジェクト: sharkness/csadv
<?php

get_header();
do_action('csadv_header_sidebar', 'header-sidebar-area');
if (!csadv_setting('csadv_search_layout') || csadv_setting('csadv_search_layout') == "masonry") {
    get_template_part('layouts/search-masonry');
} else {
    get_template_part('layouts/search-blog');
}
do_action('csadv_bottom_sidebar', 'bottom-sidebar-area');
get_footer();
コード例 #9
0
ファイル: search-masonry.php プロジェクト: sharkness/csadv
<div class="container masonry-container">

	<?php 
do_action('csadv_masonry');
if (csadv_setting('csadv_infinitescroll_system') == "on") {
    do_action('csadv_infinitescroll_masonry_script');
}
do_action('csadv_pagination', 'archive');
?>

</div>
コード例 #10
0
ファイル: scroll-sidebar.php プロジェクト: sharkness/csadv
		<?php 
if (is_active_sidebar(csadv_sidebar_name('scroll'))) {
    dynamic_sidebar(csadv_sidebar_name('scroll'));
}
?>
	    
		<div class="post-article">

			<div class="copyright">
	                
				<p class="small">
				
					<?php 
if (csadv_setting('csadv_copyright_text')) {
    echo stripslashes(csadv_setting('csadv_copyright_text'));
} else {
    echo __('Copyright ', 'csadv') . get_bloginfo("name") . " " . date("Y");
}
echo " | " . __('Theme by', 'csadv');
?>
 
                    
                    	<a href="<?php 
echo esc_url('https://www.goatshark.com/');
?>
" target="_blank">Goatshark Enterprises, LLC</a> | &copy;<?php 
echo date("Y");
?>
 All Rights Reserved
                        
コード例 #11
0
ファイル: theme_style.php プロジェクト: sharkness/csadv
function csadv_css_custom()
{
    echo '<style type="text/css">';
    /* =================== BODY STYLE =================== */
    if (get_theme_mod('csadv_full_image_background') == "on") {
        echo "body {  -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;}";
    }
    /* =================== END BODY STYLE =================== */
    /* =================== HEADER STYLE =================== */
    if (get_theme_mod('csadv_full_image_header_background') == "on" || !get_theme_mod('csadv_full_image_header_background')) {
        echo "#header { -webkit-background-size: cover;-moz-background-size: cover;-o-background-size: cover;background-size: cover;}";
    } else {
        echo "#header { -webkit-background-size: inherit;-moz-background-size: inherit;-o-background-size: inherit;background-size: inherit;}";
    }
    if (get_theme_mod('csadv_header_background_position')) {
        echo "#header { background-position:" . get_theme_mod('csadv_header_background_position') . ";}";
    }
    if (get_theme_mod('csadv_header_background_repeat')) {
        echo "#header { background-repeat:" . get_theme_mod('csadv_header_background_repeat') . ";}";
    }
    if (get_theme_mod('csadv_header_background_attachment')) {
        echo "#header { background-attachment:" . get_theme_mod('csadv_header_background_attachment') . ";}";
    }
    if (get_theme_mod('csadv_header_padding')) {
        echo "#header { padding: " . get_theme_mod('csadv_header_padding') . " 0; }";
    }
    if (get_theme_mod('header_image')) {
        echo "#header { background-image:url('" . get_theme_mod('header_image') . "')}";
    }
    if (get_theme_mod('header_image') == "remove-header") {
        echo "#header { background:none !important; margin-bottom:0 !important; padding:50px 0 !important;}";
    }
    /* =================== END HEADER STYLE =================== */
    if (get_theme_mod('header_textcolor')) {
        echo '#header a, #header .navigation i, #logo a span.sitename, #logo a span.sitedescription, #slogan, #slogan h1, #slogan span { color: #' . get_theme_mod('header_textcolor') . '; } ';
    }
    if (csadv_setting('csadv_header_textcolor_hover')) {
        echo '#header a:hover, #logo a:hover span.sitename, #logo a:hover span.sitedescription , #header .navigation i:hover { color: ' . csadv_setting('csadv_header_textcolor_hover') . ' }';
    }
    /* =================== BEGIN PAGE WIDTH =================== */
    if (csadv_setting('csadv_screen1')) {
        echo "@media (min-width:768px){.container{width:" . csadv_setting('csadv_screen1') . "px}}";
        echo "@media (min-width:768px){.container.block{width:" . (csadv_setting('csadv_screen1') - 10) . "px}}";
    }
    if (csadv_setting('csadv_screen2')) {
        echo "@media (min-width:992px){.container{width:" . csadv_setting('csadv_screen2') . "px}}";
        echo "@media (min-width:992px){.container.block{width:" . (csadv_setting('csadv_screen2') - 10) . "px}}";
    }
    if (csadv_setting('csadv_screen3')) {
        echo "@media (min-width:1200px){.container{width:" . csadv_setting('csadv_screen3') . "px}}";
        echo "@media (min-width:1200px){.container.block{width:" . (csadv_setting('csadv_screen3') - 10) . "px}}";
    }
    /* =================== END PAGE WIDTH =================== */
    /* =================== BEGIN LOGO STYLE =================== */
    /* Logo Font Size */
    if (csadv_setting('csadv_logo_font_size')) {
        echo "#logo a span.sitename { font-size:" . csadv_setting('csadv_logo_font_size') . "; } ";
    }
    /* Logo Description */
    if (csadv_setting('csadv_logo_description_size')) {
        echo "#logo a span.sitedescription { font-size:" . csadv_setting('csadv_logo_description_size') . "; } ";
    }
    /* =================== END LOGO STYLE =================== */
    /* =================== BEGIN SLOGAN STYLE =================== */
    /* Slogan Font Size */
    if (csadv_setting('csadv_slogan_font_size')) {
        echo "#slogan, #slogan h1 { font-size:" . csadv_setting('csadv_slogan_font_size') . "; } ";
    }
    /* Subslogan Font Size */
    if (csadv_setting('csadv_subslogan_font_size')) {
        echo "#slogan span { font-size:" . csadv_setting('csadv_subslogan_font_size') . "; } ";
    }
    /* =================== END SLOGAN STYLE =================== */
    /* =================== BEGIN NAV STYLE =================== */
    $navstyle = '';
    /* Nav  Font Size */
    if (csadv_setting('csadv_menu_font_size')) {
        echo "nav.custommenu ul li a, #footer nav.custommenu ul li a { font-size:" . csadv_setting('csadv_menu_font_size') . ";}";
        echo "nav.custommenu ul ul li a, #footer nav.custommenu ul ul li a { font-size:" . (str_replace("px", "", csadv_setting('csadv_menu_font_size')) - 4) . "px;}";
    }
    /* =================== END NAV STYLE =================== */
    /* =================== BEGIN CONTENT STYLE =================== */
    if (csadv_setting('csadv_content_font_size')) {
        echo ".post-article p, .post-article li, .post-article address, .post-article dd, .post-article blockquote, .post-article td, .post-article th, .textwidget, .toggle_container h5.element  { font-size:" . csadv_setting('csadv_content_font_size') . "}";
    }
    /* =================== END CONTENT STYLE =================== */
    /* =================== START TITLE STYLE =================== */
    $titlestyle = '';
    if (csadv_setting('csadv_h1_font_size')) {
        echo "h1 {font-size:" . csadv_setting('csadv_h1_font_size') . "; }";
    }
    if (csadv_setting('csadv_h2_font_size')) {
        echo "h2 { font-size:" . csadv_setting('csadv_h2_font_size') . "; }";
    }
    if (csadv_setting('csadv_h3_font_size')) {
        echo "h3 { font-size:" . csadv_setting('csadv_h3_font_size') . "; }";
    }
    if (csadv_setting('csadv_h4_font_size')) {
        echo "h4 { font-size:" . csadv_setting('csadv_h4_font_size') . "; }";
    }
    if (csadv_setting('csadv_h5_font_size')) {
        echo "h5 { font-size:" . csadv_setting('csadv_h5_font_size') . "; }";
    }
    if (csadv_setting('csadv_h6_font_size')) {
        echo "h6 { font-size:" . csadv_setting('csadv_h6_font_size') . "; }";
    }
    /* =================== END TITLE STYLE =================== */
    /* =================== END LINK STYLE =================== */
    if (csadv_setting('csadv_custom_css_code')) {
        echo csadv_setting('csadv_custom_css_code');
    }
    echo '</style>';
}
コード例 #12
0
ファイル: index.php プロジェクト: sharkness/csadv
<?php

get_header();
do_action('csadv_header_sidebar', 'header-sidebar-area');
if (!csadv_setting('csadv_home') || csadv_setting('csadv_home') == "masonry") {
    get_template_part('layouts/home-masonry');
} else {
    get_template_part('layouts/home-blog');
}
do_action('csadv_bottom_sidebar', 'bottom-sidebar-area');
get_footer();
コード例 #13
0
ファイル: functions.php プロジェクト: sharkness/csadv
 function csadv_get_height()
 {
     if (csadv_setting('csadv_thumbnails')) {
         return csadv_setting('csadv_thumbnails');
     } else {
         return "600";
     }
 }
コード例 #14
0
ファイル: theme_templates.php プロジェクト: sharkness/csadv
 function csadv_template($id)
 {
     $template = array("full" => "col-md-12", "left-sidebar" => "col-md-8", "right-sidebar" => "col-md-8");
     $span = $template["right-sidebar"];
     $sidebar = "right-sidebar";
     if ((is_category() || is_tag() || is_tax() || is_month()) && csadv_setting('csadv_category_layout')) {
         $span = $template[csadv_setting('csadv_category_layout')];
         $sidebar = csadv_setting('csadv_category_layout');
     } else {
         if (is_home() && csadv_setting('csadv_home')) {
             $span = $template[csadv_setting('csadv_home')];
             $sidebar = csadv_setting('csadv_home');
         } else {
             if (is_search() && csadv_setting('csadv_search_layout')) {
                 $span = $template[csadv_setting('csadv_search_layout')];
                 $sidebar = csadv_setting('csadv_search_layout');
             } else {
                 if ((is_single() || is_page()) && csadv_postmeta('csadv_template')) {
                     $span = $template[csadv_postmeta('csadv_template')];
                     $sidebar = csadv_postmeta('csadv_template');
                 }
             }
         }
     }
     return ${$id};
 }
コード例 #15
0
ファイル: theme_functions.php プロジェクト: sharkness/csadv
 function csadv_body_classes_function($classes)
 {
     global $wp_customize;
     if (csadv_setting('csadv_infinitescroll_system') == "on") {
         $classes[] = 'infinitescroll';
     }
     if (csadv_is_single() && (csadv_get_header_layout() == "header_five" || csadv_get_header_layout() == "header_six")) {
         $classes[] = 'hide_title';
     }
     if (preg_match('~MSIE|Internet Explorer~i', $_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'Trident/7.0; rv:11.0') !== false) {
         $classes[] = 'ie_browser';
     }
     if (isset($wp_customize)) {
         $classes[] = 'customizer_active';
     }
     return $classes;
 }