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

@@ -6,11 +6,11 @@
* @since 1.0.0
*/
$author_id = get_the_author_meta( 'ID' );
$author_avatar = get_avatar( $author_id, 'thumbnail' );
$author_post_link = get_the_author_posts_link();
$author_bio = get_the_author_meta( 'description' );
$author_url = get_the_author_meta( 'user_url' );
$author_id = get_the_author_meta( 'ID' );
$author_avatar = get_avatar( $author_id, 'thumbnail' );
$author_post_link = get_the_author_posts_link();
$author_bio = get_the_author_meta( 'description' );
$author_url = get_the_author_meta( 'user_url' );
?>
<div class="sad-author-box">
@@ -42,4 +42,4 @@ $author_url = get_the_author_meta( 'user_url' );
</div>
<?php endif; ?>
</div>
</div>
</div>

View File

@@ -12,11 +12,13 @@
<div class="entry-content">
<?php
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
'after' => '</div>',
) );
?>
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
'after' => '</div>',
)
);
?>
</div>
<?php if ( get_edit_post_link() ) : ?>
@@ -41,4 +43,4 @@
?>
</footer>
<?php endif; ?>
</article>
</article>

View File

@@ -8,7 +8,7 @@
* @since 1.0.0
*/
$post_content_type = apply_filters( 'sophia_after_dark_archive_post_content_type', 'excerpt' );
$post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnail wow fadeInUp';
$post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnail wow fadeInUp';
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
@@ -30,13 +30,15 @@ $post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnai
<?php endif; ?>
<header class="entry-header">
<?php the_title(
<?php
the_title(
sprintf(
'<h2 class="entry-title"><a href="%s" rel="bookmark">',
esc_url( get_permalink() )
),
'</a></h2>'
); ?>
);
?>
</header>
<div class="entry-content">
@@ -44,13 +46,15 @@ $post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnai
<?php the_excerpt(); ?>
<?php elseif ( 'content' === $post_content_type ) : ?>
<?php
the_content( sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
[ 'span' => [ 'class' => [] ] ]
),
get_the_title()
) );
the_content(
sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
array( 'span' => array( 'class' => array() ) )
),
get_the_title()
)
);
?>
<?php endif; ?>
</div>

View File

@@ -13,43 +13,47 @@ $post_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
<div class="post-info-wrap">
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
<div class="entry-meta">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
</div>
</div>
<?php endif; ?>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail( 'full' ); ?>
<div class="post-info-wrap">
<div class="post-cat"><?php sophia_after_dark_article_categories_list(); ?></div>
<div class="entry-meta">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
</div>
</div>
<?php endif; ?>
<div class="entry-content">
<?php
the_content( sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
[ 'span' => [ 'class' => [] ] ]
),
get_the_title()
) );
<div class="entry-content">
<?php
the_content(
sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
array( 'span' => array( 'class' => array() ) )
),
get_the_title()
)
);
wp_link_pages( [
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
'after' => '</div>',
] );
?>
</div>
wp_link_pages(
array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'sophia-after-dark' ),
'after' => '</div>',
)
);
?>
</div>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
<?php get_template_part( 'template-parts/author/post', 'author-box' ); ?>
<?php get_template_part( 'template-parts/author/post', 'author-box' ); ?>
</article>

View File

@@ -9,55 +9,57 @@
*/
global $wp_query;
$current_post = $wp_query->current_post;
$archive_style = get_theme_mod( 'sophia_after_dark_archive_style', 'sad-archive--masonry-style' );
$current_post = $wp_query->current_post;
$archive_style = get_theme_mod( 'sophia_after_dark_archive_style', 'sad-archive--masonry-style' );
$post_content_type = apply_filters( 'sophia_after_dark_archive_post_content_type', 'excerpt' );
// Determine post class
$post_class = has_post_thumbnail() ? 'has-thumbnail' : 'no-thumbnail';
if ( $current_post >= 3 || 'sad-archive--masonry-style' !== $archive_style ) {
$post_class .= ' wow fadeInUp';
$post_class .= ' wow fadeInUp';
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<div class="thumb-cat-wrap">
<?php
sophia_after_dark_post_thumbnail();
sophia_after_dark_article_categories_list();
?>
</div>
<div class="thumb-cat-wrap">
<?php
sophia_after_dark_post_thumbnail();
sophia_after_dark_article_categories_list();
?>
</div>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-cat">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php endif; ?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-cat">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
</header>
<header class="entry-header">
<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
</header>
<div class="entry-content">
<?php
if ( 'excerpt' === $post_content_type ) {
the_excerpt();
} elseif ( 'content' === $post_content_type ) {
the_content( sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
[ 'span' => [ 'class' => [] ] ]
),
get_the_title()
) );
}
?>
</div>
<div class="entry-content">
<?php
if ( 'excerpt' === $post_content_type ) {
the_excerpt();
} elseif ( 'content' === $post_content_type ) {
the_content(
sprintf(
wp_kses(
__( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'sophia-after-dark' ),
array( 'span' => array( 'class' => array() ) )
),
get_the_title()
)
);
}
?>
</div>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
</article>

View File

@@ -6,34 +6,34 @@
* @since 1.0.0
*/
$post_class = has_post_thumbnail() ? "has-thumbnail wow fadeInUp" : "no-thumbnail wow fadeInUp";
$post_class = has_post_thumbnail() ? 'has-thumbnail wow fadeInUp' : 'no-thumbnail wow fadeInUp';
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( $post_class ); ?>>
<div class="thumb-cat-wrap">
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
<?php sophia_after_dark_post_thumbnail(); ?>
</a>
<?php endif; ?>
<div class="thumb-cat-wrap">
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">
<?php sophia_after_dark_post_thumbnail(); ?>
</a>
<?php endif; ?>
<?php sophia_after_dark_article_categories_list(); ?>
</div>
<?php sophia_after_dark_article_categories_list(); ?>
</div>
<?php if ( "post" === get_post_type() ) : ?>
<div class="entry-cat">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php endif; ?>
<?php if ( 'post' === get_post_type() ) : ?>
<div class="entry-cat">
<?php
sophia_after_dark_posted_on();
sophia_after_dark_posted_by();
?>
</div>
<?php endif; ?>
<header class="entry-header">
<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
</header>
<header class="entry-header">
<?php the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' ); ?>
</header>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
<footer class="entry-footer">
<?php sophia_after_dark_entry_footer(); ?>
</footer>
</article>

View File

@@ -8,34 +8,34 @@
global $post;
$related_post_id = get_the_ID();
$get_categories = get_the_terms( $related_post_id, 'category' );
$selected_cat = ! empty( $get_categories ) && is_array( $get_categories ) ? wp_list_pluck( $get_categories, 'term_id' ) : [];
$selected_cat = ! empty( $get_categories ) && is_array( $get_categories ) ? wp_list_pluck( $get_categories, 'term_id' ) : array();
$related_posts_count = apply_filters( 'sophia_after_dark_related_posts_count', 3 );
$related_posts_title = apply_filters( 'sophia_after_dark_related_posts_section_title', __( 'Related Posts', 'sophia-after-dark' ) );
$related_posts_args = [
$related_posts_args = array(
'posts_per_page' => absint( $related_posts_count ),
'post__not_in' => [ $related_post_id ],
'post__not_in' => array( $related_post_id ),
'category__in' => $selected_cat,
];
);
$related_posts_query = new WP_Query( $related_posts_args );
if ( $related_posts_query->have_posts() ) :
?>
?>
<section class="sad-single-related-posts">
<h2 class="sad-related-post-title"><?php echo esc_html( $related_posts_title ); ?></h2>
<div class="sad-related-posts-wrapper">
<?php
while ( $related_posts_query->have_posts() ) :
$related_posts_query->the_post();
get_template_part( 'template-parts/related/content', 'related' );
while ( $related_posts_query->have_posts() ) :
$related_posts_query->the_post();
get_template_part( 'template-parts/related/content', 'related' );
endwhile;
?>
</div>
</section>
<?php
<?php
endif;
wp_reset_postdata();