first commit

This commit is contained in:
2026-01-08 15:27:15 +01:00
commit f0a25b1e3d
471 changed files with 47986 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
<?php
/**
* Sample implementation of the Custom Header feature
*
* You can add an optional custom header image to header.php like so ...
*
<?php the_header_image_tag(); ?>
*
* @link https://developer.wordpress.org/themes/functionality/custom-headers/
*
* @package aac
*/
/**
* Set up the WordPress core custom header feature.
*
* @uses aac_header_style()
*/
function aac_custom_header_setup() {
add_theme_support(
'custom-header',
apply_filters(
'aac_custom_header_args',
array(
'default-image' => '',
'default-text-color' => '000000',
'width' => 1000,
'height' => 250,
'flex-height' => true,
'wp-head-callback' => 'aac_header_style',
)
)
);
}
add_action( 'after_setup_theme', 'aac_custom_header_setup' );
if ( ! function_exists( 'aac_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog.
*
* @see aac_custom_header_setup().
*/
function aac_header_style() {
$header_text_color = get_header_textcolor();
/*
* If no custom options for text are set, let's bail.
* get_header_textcolor() options: Any hex value, 'blank' to hide text. Default: add_theme_support( 'custom-header' ).
*/
if ( get_theme_support( 'custom-header', 'default-text-color' ) === $header_text_color ) {
return;
}
// If we get this far, we have custom styles. Let's do this.
?>
<style type="text/css">
<?php
// Has the text been hidden?
if ( ! display_header_text() ) :
?>
.site-title,
.site-description {
position: absolute;
clip: rect(1px, 1px, 1px, 1px);
}
<?php
// If the user has set a custom color for the text use that.
else :
?>
.site-title a,
.site-description {
color: #<?php echo esc_attr( $header_text_color ); ?>;
}
<?php endif; ?>
</style>
<?php
}
endif;

View File

@@ -0,0 +1,61 @@
<?php
/**
* aac Theme Customizer
*
* @package aac
*/
/**
* Add postMessage support for site title and description for the Theme Customizer.
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function aac_customize_register( $wp_customize ) {
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
if ( isset( $wp_customize->selective_refresh ) ) {
$wp_customize->selective_refresh->add_partial(
'blogname',
array(
'selector' => '.site-title a',
'render_callback' => 'aac_customize_partial_blogname',
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription',
array(
'selector' => '.site-description',
'render_callback' => 'aac_customize_partial_blogdescription',
)
);
}
}
add_action( 'customize_register', 'aac_customize_register' );
/**
* Render the site title for the selective refresh partial.
*
* @return void
*/
function aac_customize_partial_blogname() {
bloginfo( 'name' );
}
/**
* Render the site tagline for the selective refresh partial.
*
* @return void
*/
function aac_customize_partial_blogdescription() {
bloginfo( 'description' );
}
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function aac_customize_preview_js() {
wp_enqueue_script( 'aac-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true );
}
add_action( 'customize_preview_init', 'aac_customize_preview_js' );

View File

@@ -0,0 +1,67 @@
<?php
/**
* Jetpack Compatibility File
*
* @link https://jetpack.com/
*
* @package aac
*/
/**
* Jetpack setup function.
*
* See: https://jetpack.com/support/infinite-scroll/
* See: https://jetpack.com/support/responsive-videos/
* See: https://jetpack.com/support/content-options/
*/
function aac_jetpack_setup() {
// Add theme support for Infinite Scroll.
add_theme_support(
'infinite-scroll',
array(
'container' => 'main',
'render' => 'aac_infinite_scroll_render',
'footer' => 'page',
)
);
// Add theme support for Responsive Videos.
add_theme_support( 'jetpack-responsive-videos' );
// Add theme support for Content Options.
add_theme_support(
'jetpack-content-options',
array(
'post-details' => array(
'stylesheet' => 'aac-style',
'date' => '.posted-on',
'categories' => '.cat-links',
'tags' => '.tags-links',
'author' => '.byline',
'comment' => '.comments-link',
),
'featured-images' => array(
'archive' => true,
'post' => true,
'page' => true,
),
)
);
}
add_action( 'after_setup_theme', 'aac_jetpack_setup' );
if ( ! function_exists( 'aac_infinite_scroll_render' ) ) :
/**
* Custom render function for Infinite Scroll.
*/
function aac_infinite_scroll_render() {
while ( have_posts() ) {
the_post();
if ( is_search() ) :
get_template_part( 'template-parts/content', 'search' );
else :
get_template_part( 'template-parts/content', get_post_type() );
endif;
}
}
endif;

View File

@@ -0,0 +1,61 @@
<?php
$image = $args['image'] ?? '';
$title = $args['title'] ?? '';
$link = $args['link'] ?? '#';
$category = $args['category'] ?? '';
$post_id = $args['post_id'] ?? get_the_ID();
$author_id = get_post_field('post_author', $post_id);
$author_name = get_the_author_meta('display_name', $author_id);
$author_url = get_author_posts_url($author_id);
$author_img = get_avatar_url($author_id, ['size' => 96]);
$second_img = get_field('second_profile_img', 'user_' . $author_id);
$gender = get_field('plec', 'user_' . $author_id);
$author_title = ($gender === 'female') ? 'Autorka' : 'Autor';
if ($second_img && $gender === 'female') {
$author_title = 'Autorki';
}
?>
<article class="article-card">
<?php if ($category) : ?>
<ol class="card-tags">
<?php foreach ($category as $item) : ?>
<li><span><?php echo $item->name; ?></span></li>
<?php endforeach; ?>
</ol>
<?php endif; ?>
<div class="card-img">
<a href="<?php echo $link; ?>">
<img src="<?php echo $image; ?>" alt="">
</a>
</div>
<div class="card-data">
<div class="card-title">
<h3><a href="<?php echo $link; ?>"><?php echo $title; ?></a></h3>
</div>
<div class="card-footer">
<div class="card-author">
<ol class="card-author--img">
<li>
<img src="<?php echo esc_url($author_img); ?>" alt="<?php echo esc_attr($author_name); ?>">
</li>
<?php if($second_img) : ?>
<li>
<img src="<?php echo esc_url($second_img); ?>" alt="<?php echo esc_attr($author_name); ?>">
</li>
<?php endif; ?>
</ol>
<div class="card-author--data">
<p class="card-author--title"><?php echo $author_title; ?></p>
<a class="card-author--name" href="#"><?php echo esc_html($author_name); ?></a>
</div>
</div>
<a href="<?php echo $link; ?>" class="btn-2">Czytaj dalej</a>
</div>
</div>
</article>

View File

@@ -0,0 +1,21 @@
<?php
$image = $args['image'] ?? '';
$title = $args['title'] ?? '';
$link_text = $args['link_text'] ?? '';
$link = $args['link'] ?? '#';
?>
<article class="article-more">
<div class="article-more--bg">
<img src="<?php echo $image; ?>" alt="">
</div>
<div class="article-more--wrapper">
<div class="article-more--title">
<h3><?php echo $title; ?></h3>
</div>
<div class="article-more--nav">
<a href="<?php echo $link; ?>" class="btn-1"><?php echo $link_text; ?></a>
</div>
</div>
</article>

View File

@@ -0,0 +1,37 @@
<?php
/**
* Functions which enhance the theme by hooking into WordPress
*
* @package aac
*/
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array
*/
function aac_body_classes( $classes ) {
// Adds a class of hfeed to non-singular pages.
if ( ! is_singular() ) {
$classes[] = 'hfeed';
}
// Adds a class of no-sidebar when there is no sidebar present.
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
$classes[] = 'no-sidebar';
}
return $classes;
}
add_filter( 'body_class', 'aac_body_classes' );
/**
* Add a pingback url auto-discovery header for single posts, pages, or attachments.
*/
function aac_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'wp_head', 'aac_pingback_header' );

View File

@@ -0,0 +1,41 @@
<?php
$image = $args['image'] ?? '';
$title = $args['title'] ?? '';
$link = $args['link'] ?? '#';
$acf = $args['acf'] ?? '';
?>
<article class="podcast-card">
<div class="card-img">
<img src="<?php echo $image; ?>" alt="">
</div>
<div class="card-head">
<div class="card-head--img">
<img src="/wp-content/uploads/2025/10/Headphones.svg" alt="">
</div>
<ul class="card-head--attr">
<li>
<span>Czas trwania: <?php echo $acf; ?></span>
</li>
<li>
<span><?php echo get_the_date('j F Y'); ?></span>
</li>
</ul>
</div>
<div class="card-body">
<h2>
<a href="<?php echo $link; ?>"><?php echo $title; ?></a>
</h2>
</div>
<div class="card-footer">
<div class="card-footer--nav">
<a href="<?php echo $link; ?>" class="btn-1">
<img src="/wp-content/uploads/2025/10/Vector.svg" alt="">
<span>Posłuchaj tego odcinka</span>
</a>
</div>
<div class="audio-player">
</div>
</div>
</article>

View File

@@ -0,0 +1,165 @@
<?php
/**
* Custom template tags for this theme
*
* Eventually, some of the functionality here could be replaced by core features.
*
* @package aac
*/
if ( ! function_exists( 'aac_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time.
*/
function aac_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}
$time_string = sprintf(
$time_string,
esc_attr( get_the_date( DATE_W3C ) ),
esc_html( get_the_date() ),
esc_attr( get_the_modified_date( DATE_W3C ) ),
esc_html( get_the_modified_date() )
);
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'aac' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
);
echo '<span class="posted-on">' . $posted_on . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
endif;
if ( ! function_exists( 'aac_posted_by' ) ) :
/**
* Prints HTML with meta information for the current author.
*/
function aac_posted_by() {
$byline = sprintf(
/* translators: %s: post author. */
esc_html_x( 'by %s', 'post author', 'aac' ),
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
);
echo '<span class="byline"> ' . $byline . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
endif;
if ( ! function_exists( 'aac_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function aac_entry_footer() {
// Hide category and tag text for pages.
if ( 'post' === get_post_type() ) {
/* translators: used between list items, there is a space after the comma */
$categories_list = get_the_category_list( esc_html__( ', ', 'aac' ) );
if ( $categories_list ) {
/* translators: 1: list of categories. */
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'aac' ) . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/* translators: used between list items, there is a space after the comma */
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'aac' ) );
if ( $tags_list ) {
/* translators: 1: list of tags. */
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'aac' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) {
echo '<span class="comments-link">';
comments_popup_link(
sprintf(
wp_kses(
/* translators: %s: post title */
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'aac' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
)
);
echo '</span>';
}
edit_post_link(
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'aac' ),
array(
'span' => array(
'class' => array(),
),
)
),
wp_kses_post( get_the_title() )
),
'<span class="edit-link">',
'</span>'
);
}
endif;
if ( ! function_exists( 'aac_post_thumbnail' ) ) :
/**
* Displays an optional post thumbnail.
*
* Wraps the post thumbnail in an anchor element on index views, or a div
* element when on single views.
*/
function aac_post_thumbnail() {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}
if ( is_singular() ) :
?>
<div class="post-thumbnail">
<?php the_post_thumbnail(); ?>
</div><!-- .post-thumbnail -->
<?php else : ?>
<a class="post-thumbnail" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
<?php
the_post_thumbnail(
'post-thumbnail',
array(
'alt' => the_title_attribute(
array(
'echo' => false,
)
),
)
);
?>
</a>
<?php
endif; // End is_singular().
}
endif;
if ( ! function_exists( 'wp_body_open' ) ) :
/**
* Shim for sites older than 5.2.
*
* @link https://core.trac.wordpress.org/ticket/12563
*/
function wp_body_open() {
do_action( 'wp_body_open' );
}
endif;