did some sniff sniff
This commit is contained in:
@@ -24,37 +24,37 @@ if ( ! function_exists( 'sophia_after_dark_site_branding' ) ) :
|
||||
* function to display site branding
|
||||
*/
|
||||
function sophia_after_dark_site_branding() {
|
||||
?>
|
||||
?>
|
||||
<div class="logo-ads-wrap">
|
||||
<div class="sad-container">
|
||||
<div class="site-branding">
|
||||
<?php
|
||||
the_custom_logo();
|
||||
if ( is_front_page() || is_home() ) :
|
||||
?>
|
||||
if ( is_front_page() || is_home() ) :
|
||||
?>
|
||||
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
|
||||
<?php else : ?>
|
||||
<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
|
||||
<?php
|
||||
<?php
|
||||
endif;
|
||||
$sophia_after_dark_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $sophia_after_dark_description || is_customize_preview() ) :
|
||||
?>
|
||||
if ( $sophia_after_dark_description || is_customize_preview() ) :
|
||||
?>
|
||||
<p class="site-description"><?php echo $sophia_after_dark_description; /* WPCS: xss ok. */ ?></p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="header-widget-wrapper">
|
||||
<?php
|
||||
if ( is_active_sidebar( 'header-ads-section' ) ) {
|
||||
dynamic_sidebar( 'header-ads-section' );
|
||||
}
|
||||
<?php
|
||||
if ( is_active_sidebar( 'header-ads-section' ) ) {
|
||||
dynamic_sidebar( 'header-ads-section' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
endif;
|
||||
|
||||
if ( ! function_exists( 'sophia_after_dark_menu_wrapper_start' ) ) :
|
||||
@@ -76,19 +76,21 @@ if ( ! function_exists( 'sophia_after_dark_header_main_menu' ) ) :
|
||||
*/
|
||||
function sophia_after_dark_header_main_menu() {
|
||||
$sophia_after_dark_menu_toggle_text = apply_filters( 'sophia_after_dark_menu_toggle_text', __( 'Menu', 'sophia-after-dark' ) );
|
||||
?>
|
||||
?>
|
||||
<div class="sad-header-menu-wrap">
|
||||
<div class="menu-toggle"><a href="javascript:void(0)"><i class="fa fa-navicon"></i><?php echo esc_html( $sophia_after_dark_menu_toggle_text ); ?></a></div>
|
||||
<nav itemscope id="site-navigation" class="main-navigation">
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'primary_menu',
|
||||
'menu_id' => 'primary-menu',
|
||||
) );
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'primary_menu',
|
||||
'menu_id' => 'primary-menu',
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -115,12 +117,12 @@ if ( ! function_exists( 'sophia_after_dark_menu_social_icons' ) ) :
|
||||
return;
|
||||
}
|
||||
$sophia_after_dark_menu_social_icons_label = apply_filters( 'sophia_after_dark_menu_social_icons_label', __( 'Follow Us: ', 'sophia-after-dark' ) );
|
||||
?>
|
||||
?>
|
||||
<div class="sad-social-wrapper">
|
||||
<span class="sad-follow-title"><?php echo esc_html( $sophia_after_dark_menu_social_icons_label ); ?></span>
|
||||
<?php sophia_after_dark_social_media_content(); ?>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -136,7 +138,7 @@ if ( ! function_exists( 'sophia_after_dark_menu_search_icon' ) ) :
|
||||
return;
|
||||
}
|
||||
$sophia_after_dark_menu_search_icon_lable = apply_filters( 'sophia_after_dark_menu_search_icon_lable', __( 'Search', 'sophia-after-dark' ) );
|
||||
?>
|
||||
?>
|
||||
<div class="sad-menu-search">
|
||||
<div class="sad-search-icon"><a href="javascript:void(0)"><?php echo esc_html( $sophia_after_dark_menu_search_icon_lable ); ?><i class="fa fa-search"></i></a></div>
|
||||
<div class="sad-form-wrap">
|
||||
@@ -146,7 +148,7 @@ if ( ! function_exists( 'sophia_after_dark_menu_search_icon' ) ) :
|
||||
<div class="sad-form-close"><a href="javascript:void(0)"><i class="fa fa-close"></i></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -207,34 +209,39 @@ if ( ! function_exists( 'sophia_after_dark_header_categories_lists_content' ) )
|
||||
* function to display categories lists
|
||||
*/
|
||||
function sophia_after_dark_header_categories_lists_content() {
|
||||
$get_categories = get_categories( array( 'orderby' => 'name', 'order' => 'ASC' ) );
|
||||
?>
|
||||
$get_categories = get_categories(
|
||||
array(
|
||||
'orderby' => 'name',
|
||||
'order' => 'ASC',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<div class="sad-header-cat-list-wrapper">
|
||||
<ul class="sticky-header-sidebar-menu sad-slide-cat-lists">
|
||||
<?php
|
||||
$count = 1;
|
||||
$count = 1;
|
||||
$cat_list_items = apply_filters( 'sophia_after_dark_menu_cat_list_items', 5 );
|
||||
foreach ( $get_categories as $category ) {
|
||||
$cat_link = get_category_link( $category->term_id );
|
||||
$cat_name = $category->name;
|
||||
$cat_count = $category->count;
|
||||
if ( $count <= $cat_list_items ) {
|
||||
?>
|
||||
foreach ( $get_categories as $category ) {
|
||||
$cat_link = get_category_link( $category->term_id );
|
||||
$cat_name = $category->name;
|
||||
$cat_count = $category->count;
|
||||
if ( $count <= $cat_list_items ) {
|
||||
?>
|
||||
<li class="cat-item">
|
||||
<a href="<?php echo esc_url( $cat_link ); ?>">
|
||||
<?php
|
||||
echo esc_html( $cat_name );
|
||||
echo '<span>'. esc_html( $cat_count ) .'</span>';
|
||||
?>
|
||||
<?php
|
||||
echo esc_html( $cat_name );
|
||||
echo '<span>' . esc_html( $cat_count ) . '</span>';
|
||||
?>
|
||||
</a>
|
||||
</li>
|
||||
<?php
|
||||
}
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -247,16 +254,16 @@ if ( ! function_exists( 'sophia_after_dark_header_author_box_content' ) ) :
|
||||
*/
|
||||
function sophia_after_dark_header_author_box_content() {
|
||||
$sophia_after_dark_user_id = apply_filters( 'sophia_after_dark_header_user_id', 1 );
|
||||
?>
|
||||
?>
|
||||
<div itemscope itemtype="http://schema.org/Person" class="sticky-header-sidebar-author author-bio-wrap">
|
||||
<div class="author-avatar"><?php echo get_avatar( $sophia_after_dark_user_id, '150' ); ?></div>
|
||||
<h3 itemprop="name" class="author-name"><?php echo esc_html( get_the_author_meta( 'nicename', $sophia_after_dark_user_id ) ); ?></h3>
|
||||
<div class="author-description"><?php echo wp_kses_post( wpautop( get_the_author_meta( 'description', $sophia_after_dark_user_id ) ) ); ?></div>
|
||||
<div class="author-social">
|
||||
<?php sophia_after_dark_social_media_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<div class="author-avatar"><?php echo get_avatar( $sophia_after_dark_user_id, '150' ); ?></div>
|
||||
<h3 itemprop="name" class="author-name"><?php echo esc_html( get_the_author_meta( 'nicename', $sophia_after_dark_user_id ) ); ?></h3>
|
||||
<div class="author-description"><?php echo wp_kses_post( wpautop( get_the_author_meta( 'description', $sophia_after_dark_user_id ) ) ); ?></div>
|
||||
<div class="author-social">
|
||||
<?php sophia_after_dark_social_media_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -274,7 +281,7 @@ if ( ! function_exists( 'sophia_after_dark_scroll_top_content' ) ) :
|
||||
*/
|
||||
function sophia_after_dark_scroll_top_content() {
|
||||
$sophia_after_dark_scroll_top_text = apply_filters( 'sophia_after_dark_scroll_top_text', __( 'Back To Top', 'sophia-after-dark' ) );
|
||||
echo '<div id="sad-scrollup" class="animated arrow-hide">'. esc_html( $sophia_after_dark_scroll_top_text ) .'</div>';
|
||||
echo '<div id="sad-scrollup" class="animated arrow-hide">' . esc_html( $sophia_after_dark_scroll_top_text ) . '</div>';
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -288,15 +295,15 @@ if ( ! function_exists( 'sophia_after_dark_innerpage_header_start' ) ) :
|
||||
function sophia_after_dark_innerpage_header_start() {
|
||||
$inner_header_attribute = '';
|
||||
$inner_header_attribute = apply_filters( 'sophia_after_dark_inner_header_style_attribute', $inner_header_attribute );
|
||||
if ( !empty( $inner_header_attribute ) ) {
|
||||
if ( ! empty( $inner_header_attribute ) ) {
|
||||
$header_class = 'has-bg-img';
|
||||
} else {
|
||||
$header_class = 'no-bg-img';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<div class="custom-header <?php echo esc_attr( $header_class ); ?>" <?php echo ( ! empty( $inner_header_attribute ) ) ? ' style="' . esc_attr( $inner_header_attribute ) . '" ' : ''; ?>>
|
||||
<div class="sad-container">
|
||||
<?php
|
||||
<div class="sad-container">
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -313,17 +320,17 @@ if ( ! function_exists( 'sophia_after_dark_innerpage_header_title' ) ) :
|
||||
the_archive_title( '<h1 class="page-title">', '</h1>' );
|
||||
the_archive_description( '<div class="taxonomy-description">', '</div>' );
|
||||
} elseif ( is_search() ) {
|
||||
?>
|
||||
?>
|
||||
<h1 class="page-title"><?php printf( esc_html__( 'Search Results for: %s', 'sophia-after-dark' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
|
||||
<?php
|
||||
<?php
|
||||
} elseif ( is_404() ) {
|
||||
echo '<h1 class="entry-title">'. esc_html( 'Error 404', 'sophia-after-dark' ) .'</h1>';
|
||||
echo '<h1 class="entry-title">' . esc_html( 'Error 404', 'sophia-after-dark' ) . '</h1>';
|
||||
} elseif ( is_home() ) {
|
||||
$page_for_posts_id = get_option( 'page_for_posts' );
|
||||
$page_title = get_the_title( $page_for_posts_id );
|
||||
?>
|
||||
$page_title = get_the_title( $page_for_posts_id );
|
||||
?>
|
||||
<h1 class="entry-title"><?php echo esc_html( $page_title ); ?></h1>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
@@ -339,18 +346,20 @@ if ( ! function_exists( 'sophia_after_dark_breadcrumb_content' ) ) :
|
||||
if ( false === $sophia_after_dark_breadcrumb_option ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<nav id="breadcrumb" class="sad-breadcrumb">
|
||||
<?php
|
||||
breadcrumb_trail( array(
|
||||
'container' => 'div',
|
||||
'before' => '<div class="sad-container">',
|
||||
'after' => '</div>',
|
||||
'show_browse' => false,
|
||||
) );
|
||||
breadcrumb_trail(
|
||||
array(
|
||||
'container' => 'div',
|
||||
'before' => '<div class="sad-container">',
|
||||
'after' => '</div>',
|
||||
'show_browse' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -361,10 +370,10 @@ if ( ! function_exists( 'sophia_after_dark_innerpage_header_end' ) ) :
|
||||
* function to manage ending div of section
|
||||
*/
|
||||
function sophia_after_dark_innerpage_header_end() {
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -383,7 +392,6 @@ if ( ! function_exists( 'sophia_after_dark_front_slider' ) ) :
|
||||
|
||||
/**
|
||||
* Function displaying front slider section
|
||||
*
|
||||
*/
|
||||
function sophia_after_dark_front_slider() {
|
||||
$sophia_after_dark_section_slider_option = get_theme_mod( 'sophia_after_dark_section_slider_option', false );
|
||||
@@ -396,31 +404,31 @@ if ( ! function_exists( 'sophia_after_dark_front_slider' ) ) :
|
||||
} else {
|
||||
$slider_class = 'no-featured-slider full-width--slider';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<div class="front-slider-wrapper <?php echo esc_attr( $slider_class ); ?>">
|
||||
<div class="sad-container">
|
||||
<div class="front-slider-block">
|
||||
<div class="front-slider cS-hidden">
|
||||
<?php
|
||||
$slider_cat_slug = get_theme_mod( 'sophia_after_dark_section_slider_cat', '' );
|
||||
$slide_post_count = apply_filters( 'sophia_after_dark_slider_post_count', 3 );
|
||||
$slider_args = array(
|
||||
'category_name' => esc_attr( $slider_cat_slug ),
|
||||
'meta_key' => '_thumbnail_id',
|
||||
'posts_per_page' => absint( $slide_post_count )
|
||||
$slider_cat_slug = get_theme_mod( 'sophia_after_dark_section_slider_cat', '' );
|
||||
$slide_post_count = apply_filters( 'sophia_after_dark_slider_post_count', 3 );
|
||||
$slider_args = array(
|
||||
'category_name' => esc_attr( $slider_cat_slug ),
|
||||
'meta_key' => '_thumbnail_id',
|
||||
'posts_per_page' => absint( $slide_post_count ),
|
||||
);
|
||||
$slider_post_query = new WP_Query( $slider_args );
|
||||
if ( $slider_post_query->have_posts() ) :
|
||||
while ( $slider_post_query-> have_posts() ) :
|
||||
$slider_post_query -> the_post();
|
||||
$post_id = get_the_ID();
|
||||
while ( $slider_post_query->have_posts() ) :
|
||||
$slider_post_query->the_post();
|
||||
$post_id = get_the_ID();
|
||||
$image_url = get_the_post_thumbnail_url( $post_id, 'large' );
|
||||
if ( ! empty( $image_url ) ) {
|
||||
$slider_style = 'style="background:url('. esc_url( $image_url ) .') no-repeat scroll center center; background-size:cover"';
|
||||
$slider_style = 'style="background:url(' . esc_url( $image_url ) . ') no-repeat scroll center center; background-size:cover"';
|
||||
} else {
|
||||
$slider_style = '';
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<div class="slider-post-wrap" <?php echo $slider_style; ?>>
|
||||
<div class="post-thumbnail">
|
||||
<a href="<?php the_permalink(); ?>"></a>
|
||||
@@ -428,75 +436,76 @@ if ( ! function_exists( 'sophia_after_dark_front_slider' ) ) :
|
||||
<div class="post-info-wrap">
|
||||
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
</div>
|
||||
?>
|
||||
</div>
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
?>
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
if ( true == $sophia_after_dark_section_top_featured_posts_option ) {
|
||||
$sophia_after_dark_top_featured_posts_title = get_theme_mod( 'sophia_after_dark_top_featured_posts_title', __( 'Featured News', 'sophia-after-dark' ) );
|
||||
echo '<div class="top-featured-post-main-wrapper">';
|
||||
if ( ! empty( $sophia_after_dark_top_featured_posts_title ) ) {
|
||||
echo '<div class="features-post-title">'.esc_html( $sophia_after_dark_top_featured_posts_title ).'</div>';
|
||||
}
|
||||
|
||||
$sophia_after_dark_top_featured_post_order = get_theme_mod( 'sophia_after_dark_top_featured_post_order', 'default' );
|
||||
$featured_posts_per_page = apply_filters( 'sophia_after_dark_featured_post_count', 5 );
|
||||
$top_featured_post_args = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => absint( $featured_posts_per_page ),
|
||||
);
|
||||
if ( 'random' == $sophia_after_dark_top_featured_post_order ) {
|
||||
$top_featured_post_args['orderby'] = 'rand';
|
||||
}
|
||||
$top_featured_post_query = new WP_Query( $top_featured_post_args );
|
||||
if ( $top_featured_post_query -> have_posts() ) :
|
||||
echo '<div class="top-featured-post-wrap">';
|
||||
$featured_post_count = 1;
|
||||
while ( $top_featured_post_query -> have_posts() ) : $top_featured_post_query -> the_post();
|
||||
?>
|
||||
if ( true == $sophia_after_dark_section_top_featured_posts_option ) {
|
||||
$sophia_after_dark_top_featured_posts_title = get_theme_mod( 'sophia_after_dark_top_featured_posts_title', __( 'Featured News', 'sophia-after-dark' ) );
|
||||
echo '<div class="top-featured-post-main-wrapper">';
|
||||
if ( ! empty( $sophia_after_dark_top_featured_posts_title ) ) {
|
||||
echo '<div class="features-post-title">' . esc_html( $sophia_after_dark_top_featured_posts_title ) . '</div>';
|
||||
}
|
||||
|
||||
$sophia_after_dark_top_featured_post_order = get_theme_mod( 'sophia_after_dark_top_featured_post_order', 'default' );
|
||||
$featured_posts_per_page = apply_filters( 'sophia_after_dark_featured_post_count', 5 );
|
||||
$top_featured_post_args = array(
|
||||
'post_type' => 'post',
|
||||
'posts_per_page' => absint( $featured_posts_per_page ),
|
||||
);
|
||||
if ( 'random' == $sophia_after_dark_top_featured_post_order ) {
|
||||
$top_featured_post_args['orderby'] = 'rand';
|
||||
}
|
||||
$top_featured_post_query = new WP_Query( $top_featured_post_args );
|
||||
if ( $top_featured_post_query->have_posts() ) :
|
||||
echo '<div class="top-featured-post-wrap">';
|
||||
$featured_post_count = 1;
|
||||
while ( $top_featured_post_query->have_posts() ) :
|
||||
$top_featured_post_query->the_post();
|
||||
?>
|
||||
<div id="post-<?php the_ID(); ?>" class="sad-single-post-wrap sad-clearfix">
|
||||
<div class="post-thumbnail">
|
||||
<span class="post-number"><?php echo absint( $featured_post_count ); ?></span>
|
||||
<figure style="background: no-repeat center top url(<?php echo get_the_post_thumbnail_url(); ?>); background-size: cover; height: 100px;">
|
||||
<figure style="background: no-repeat center top url(<?php echo get_the_post_thumbnail_url(); ?>); background-size: cover; height: 100px;">
|
||||
</figure>
|
||||
</div>
|
||||
<div class="sad-post-content">
|
||||
<div class="entry-meta">
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
<?php
|
||||
sophia_after_dark_posted_on();
|
||||
sophia_after_dark_posted_by();
|
||||
?>
|
||||
</div>
|
||||
<header class="entry-header">
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
|
||||
</header>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$featured_post_count ++;
|
||||
endwhile;
|
||||
echo '</div>';
|
||||
<?php
|
||||
++$featured_post_count;
|
||||
endwhile;
|
||||
echo '</div>';
|
||||
endif;
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
endif;
|
||||
add_action( 'sophia_after_dark_front_slider_section', 'sophia_after_dark_front_slider' );
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -531,45 +540,47 @@ if ( ! function_exists( 'sophia_after_dark_bottom_footer' ) ) :
|
||||
* function to display bottom footer section
|
||||
*/
|
||||
function sophia_after_dark_bottom_footer() {
|
||||
?>
|
||||
?>
|
||||
<div id="bottom-footer">
|
||||
<div class="sad-container">
|
||||
<?php
|
||||
$sophia_after_dark_enable_footer_menu = get_theme_mod( 'sophia_after_dark_enable_footer_menu', true );
|
||||
if ( true === $sophia_after_dark_enable_footer_menu ) {
|
||||
?>
|
||||
<nav id="footer-navigation" class="footer-navigation">
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'footer_menu',
|
||||
'menu_id' => 'footer-menu',
|
||||
'fallback_cb' => false,
|
||||
'depth' => 1
|
||||
) );
|
||||
?>
|
||||
</nav>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="sad-container">
|
||||
<?php
|
||||
$sophia_after_dark_enable_footer_menu = get_theme_mod( 'sophia_after_dark_enable_footer_menu', true );
|
||||
if ( true === $sophia_after_dark_enable_footer_menu ) {
|
||||
?>
|
||||
<nav id="footer-navigation" class="footer-navigation">
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'footer_menu',
|
||||
'menu_id' => 'footer-menu',
|
||||
'fallback_cb' => false,
|
||||
'depth' => 1,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="site-info">
|
||||
<span class="sad-copyright-text">
|
||||
<?php
|
||||
$sophia_after_dark_footer_copyright = get_theme_mod( 'sophia_after_dark_footer_copyright', __( 'Sophia After Dark', 'sophia-after-dark' ) );
|
||||
echo esc_html( $sophia_after_dark_footer_copyright );
|
||||
?>
|
||||
</span>
|
||||
<div class="site-info">
|
||||
<span class="sad-copyright-text">
|
||||
<?php
|
||||
$sophia_after_dark_footer_copyright = get_theme_mod( 'sophia_after_dark_footer_copyright', __( 'Sophia After Dark', 'sophia-after-dark' ) );
|
||||
echo esc_html( $sophia_after_dark_footer_copyright );
|
||||
?>
|
||||
</span>
|
||||
<br>
|
||||
<span class="sad-disclaimer-text">
|
||||
<?php
|
||||
$sophia_after_dark_footer_disclaimer = get_theme_mod( 'sophia_after_dark_footer_disclaimer', __( 'Sophia After Dark', 'sophia-after-dark' ) );
|
||||
echo esc_html( $sophia_after_dark_footer_disclaimer );
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
$sophia_after_dark_footer_disclaimer = get_theme_mod( 'sophia_after_dark_footer_disclaimer', __( 'Sophia After Dark', 'sophia-after-dark' ) );
|
||||
echo esc_html( $sophia_after_dark_footer_disclaimer );
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -591,4 +602,4 @@ endif;
|
||||
add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_start', 5 );
|
||||
add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_sidebar', 10 );
|
||||
add_action( 'sophia_after_dark_footer', 'sophia_after_dark_bottom_footer', 15 );
|
||||
add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_end', 20 );
|
||||
add_action( 'sophia_after_dark_footer', 'sophia_after_dark_footer_end', 20 );
|
||||
|
||||
@@ -32,46 +32,47 @@ endif;
|
||||
|
||||
if ( ! function_exists( 'sophia_after_dark_trending_section' ) ) :
|
||||
|
||||
/**
|
||||
* function to display the trending tags sections
|
||||
*
|
||||
*/
|
||||
function sophia_after_dark_trending_section() {
|
||||
/**
|
||||
* function to display the trending tags sections
|
||||
*/
|
||||
function sophia_after_dark_trending_section() {
|
||||
$sophia_after_dark_enable_trending = get_theme_mod( 'sophia_after_dark_enable_trending', false );
|
||||
if ( false === $sophia_after_dark_enable_trending ){
|
||||
if ( false === $sophia_after_dark_enable_trending ) {
|
||||
return;
|
||||
}
|
||||
$sophia_after_dark_enable_trending_tag_before_icon = get_theme_mod( 'sophia_after_dark_enable_trending_tag_before_icon', true );
|
||||
if ( $sophia_after_dark_enable_trending_tag_before_icon === true ){
|
||||
if ( $sophia_after_dark_enable_trending_tag_before_icon === true ) {
|
||||
$before_icon = 'tag-before-icon';
|
||||
}else{
|
||||
} else {
|
||||
$before_icon = '';
|
||||
}
|
||||
$trending_label = get_theme_mod( 'sophia_after_dark_trending_label', __( 'Trending Now', 'sophia-after-dark' ) );
|
||||
?>
|
||||
<div class="trending-wrapper <?php echo esc_html( $before_icon ); ?>">
|
||||
<span class="wrap-label"><i class="fa fa-bolt" aria-hidden="true"></i> <?php echo esc_html( $trending_label ); ?></span>
|
||||
<div class="tags-wrapper">
|
||||
?>
|
||||
<div class="trending-wrapper <?php echo esc_html( $before_icon ); ?>">
|
||||
<span class="wrap-label"><i class="fa fa-bolt" aria-hidden="true"></i> <?php echo esc_html( $trending_label ); ?></span>
|
||||
<div class="tags-wrapper">
|
||||
<?php
|
||||
$sophia_after_dark_trending_tags_orderby = get_theme_mod( 'sophia_after_dark_trending_tags_orderby', '' );
|
||||
$sophia_after_dark_trending_tags_orderby = get_theme_mod( 'sophia_after_dark_trending_tags_orderby', '' );
|
||||
$sophia_after_dark_trending_tags_count = get_theme_mod( 'sophia_after_dark_trending_tags_count', '5' );
|
||||
$get_tags_lists = get_tags( array(
|
||||
'order' => 'DESC',
|
||||
'orderby'=> esc_attr( $sophia_after_dark_trending_tags_orderby ),
|
||||
'number' => absint( $sophia_after_dark_trending_tags_count ),
|
||||
));
|
||||
if ( !empty( $get_tags_lists ) ) {
|
||||
echo '<span class="head-tags-links">';
|
||||
foreach( $get_tags_lists as $tag ) {
|
||||
echo '<a href="'.esc_html( get_tag_link( $tag->term_id ) ).'" rel="tag">'. esc_html( $tag->name ) .'</a>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
$get_tags_lists = get_tags(
|
||||
array(
|
||||
'order' => 'DESC',
|
||||
'orderby' => esc_attr( $sophia_after_dark_trending_tags_orderby ),
|
||||
'number' => absint( $sophia_after_dark_trending_tags_count ),
|
||||
)
|
||||
);
|
||||
if ( ! empty( $get_tags_lists ) ) {
|
||||
echo '<span class="head-tags-links">';
|
||||
foreach ( $get_tags_lists as $tag ) {
|
||||
echo '<a href="' . esc_html( get_tag_link( $tag->term_id ) ) . '" rel="tag">' . esc_html( $tag->name ) . '</a>';
|
||||
}
|
||||
echo '</span>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
|
||||
@@ -86,26 +87,28 @@ if ( ! function_exists( 'sophia_after_dark_top_header_nav' ) ) :
|
||||
|
||||
if ( true === $sophia_after_dark_enable_live_now ) {
|
||||
$sophia_after_dark_live_now_label = get_theme_mod( 'sophia_after_dark_live_now_label', __( 'Live Now', 'sophia-after-dark' ) );
|
||||
$sophia_after_dark_live_now_link = get_theme_mod( 'sophia_after_dark_live_now_link' );
|
||||
?>
|
||||
$sophia_after_dark_live_now_link = get_theme_mod( 'sophia_after_dark_live_now_link' );
|
||||
?>
|
||||
<div class="sad-live-link">
|
||||
<a href="<?php echo esc_url( $sophia_after_dark_live_now_link ); ?>" target="_blank"> <i class="fa fa-play-circle-o" aria-hidden="true"></i><?php echo esc_html( $sophia_after_dark_live_now_label ); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
?>
|
||||
<div class="top-header-nav">
|
||||
<nav itemscope id="top-navigation" class="main-navigation">
|
||||
<?php
|
||||
wp_nav_menu( array(
|
||||
'theme_location' => 'top_header_menu',
|
||||
'menu_id' => 'top-header-menu',
|
||||
'fallback_cb' => false,
|
||||
) );
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'top_header_menu',
|
||||
'menu_id' => 'top-header-menu',
|
||||
'fallback_cb' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav>
|
||||
</div>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
endif;
|
||||
@@ -113,4 +116,4 @@ endif;
|
||||
add_action( 'sophia_after_dark_top_header', 'sophia_after_dark_top_header_start', 5 );
|
||||
add_action( 'sophia_after_dark_top_header', 'sophia_after_dark_trending_section', 10 );
|
||||
add_action( 'sophia_after_dark_top_header', 'sophia_after_dark_top_header_nav', 20 );
|
||||
add_action( 'sophia_after_dark_top_header', 'sophia_after_dark_top_header_end', 50 );
|
||||
add_action( 'sophia_after_dark_top_header', 'sophia_after_dark_top_header_end', 50 );
|
||||
|
||||
Reference in New Issue
Block a user