did some sniff sniff

This commit is contained in:
2025-07-14 21:47:29 -07:00
parent c6bb1b7c7b
commit 0e9321b01a
44 changed files with 2557 additions and 2259 deletions

View File

@@ -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 );