first commit

This commit is contained in:
2025-09-22 16:00:20 +02:00
parent bb5cc93cb0
commit ce4d458162
61 changed files with 6544 additions and 114 deletions

View File

@@ -0,0 +1,7 @@
<div id="breadcrumbs_box">
<div class="container">
<?php if ( function_exists('yoast_breadcrumb') ) : ?>
<?php yoast_breadcrumb( '<div id="breadcrumbs">','</div>' ); ?>
<?php endif; ?>
</div>
</div>

View File

@@ -8,39 +8,39 @@
*
* @link https://developer.wordpress.org/themes/functionality/custom-headers/
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
/**
* Set up the WordPress core custom header feature.
*
* @uses brpfinanse_header_style()
* @uses brpp_prawo_podatki_header_style()
*/
function brpfinanse_custom_header_setup() {
function brpp_prawo_podatki_custom_header_setup() {
add_theme_support(
'custom-header',
apply_filters(
'brpfinanse_custom_header_args',
'brpp_prawo_podatki_custom_header_args',
array(
'default-image' => '',
'default-text-color' => '000000',
'width' => 1000,
'height' => 250,
'flex-height' => true,
'wp-head-callback' => 'brpfinanse_header_style',
'wp-head-callback' => 'brpp_prawo_podatki_header_style',
)
)
);
}
add_action( 'after_setup_theme', 'brpfinanse_custom_header_setup' );
add_action( 'after_setup_theme', 'brpp_prawo_podatki_custom_header_setup' );
if ( ! function_exists( 'brpfinanse_header_style' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_header_style' ) ) :
/**
* Styles the header image and text displayed on the blog.
*
* @see brpfinanse_custom_header_setup().
* @see brpp_prawo_podatki_custom_header_setup().
*/
function brpfinanse_header_style() {
function brpp_prawo_podatki_header_style() {
$header_text_color = get_header_textcolor();
/*

View File

@@ -1,8 +1,8 @@
<?php
/**
* brpfinanse Theme Customizer
* BRPP prawo podatki Theme Customizer
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
/**
@@ -10,7 +10,7 @@
*
* @param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function brpfinanse_customize_register( $wp_customize ) {
function brpp_prawo_podatki_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';
@@ -20,26 +20,26 @@ function brpfinanse_customize_register( $wp_customize ) {
'blogname',
array(
'selector' => '.site-title a',
'render_callback' => 'brpfinanse_customize_partial_blogname',
'render_callback' => 'brpp_prawo_podatki_customize_partial_blogname',
)
);
$wp_customize->selective_refresh->add_partial(
'blogdescription',
array(
'selector' => '.site-description',
'render_callback' => 'brpfinanse_customize_partial_blogdescription',
'render_callback' => 'brpp_prawo_podatki_customize_partial_blogdescription',
)
);
}
}
add_action( 'customize_register', 'brpfinanse_customize_register' );
add_action( 'customize_register', 'brpp_prawo_podatki_customize_register' );
/**
* Render the site title for the selective refresh partial.
*
* @return void
*/
function brpfinanse_customize_partial_blogname() {
function brpp_prawo_podatki_customize_partial_blogname() {
bloginfo( 'name' );
}
@@ -48,14 +48,14 @@ function brpfinanse_customize_partial_blogname() {
*
* @return void
*/
function brpfinanse_customize_partial_blogdescription() {
function brpp_prawo_podatki_customize_partial_blogdescription() {
bloginfo( 'description' );
}
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function brpfinanse_customize_preview_js() {
wp_enqueue_script( 'brpfinanse-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true );
function brpp_prawo_podatki_customize_preview_js() {
wp_enqueue_script( 'brpp-prawo-podatki-customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), _S_VERSION, true );
}
add_action( 'customize_preview_init', 'brpfinanse_customize_preview_js' );
add_action( 'customize_preview_init', 'brpp_prawo_podatki_customize_preview_js' );

View File

@@ -4,7 +4,7 @@
*
* @link https://jetpack.com/
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
/**
@@ -14,13 +14,13 @@
* See: https://jetpack.com/support/responsive-videos/
* See: https://jetpack.com/support/content-options/
*/
function brpfinanse_jetpack_setup() {
function brpp_prawo_podatki_jetpack_setup() {
// Add theme support for Infinite Scroll.
add_theme_support(
'infinite-scroll',
array(
'container' => 'main',
'render' => 'brpfinanse_infinite_scroll_render',
'render' => 'brpp_prawo_podatki_infinite_scroll_render',
'footer' => 'page',
)
);
@@ -33,7 +33,7 @@ function brpfinanse_jetpack_setup() {
'jetpack-content-options',
array(
'post-details' => array(
'stylesheet' => 'brpfinanse-style',
'stylesheet' => 'brpp-prawo-podatki-style',
'date' => '.posted-on',
'categories' => '.cat-links',
'tags' => '.tags-links',
@@ -48,13 +48,13 @@ function brpfinanse_jetpack_setup() {
)
);
}
add_action( 'after_setup_theme', 'brpfinanse_jetpack_setup' );
add_action( 'after_setup_theme', 'brpp_prawo_podatki_jetpack_setup' );
if ( ! function_exists( 'brpfinanse_infinite_scroll_render' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_infinite_scroll_render' ) ) :
/**
* Custom render function for Infinite Scroll.
*/
function brpfinanse_infinite_scroll_render() {
function brpp_prawo_podatki_infinite_scroll_render() {
while ( have_posts() ) {
the_post();
if ( is_search() ) :

View File

@@ -0,0 +1,29 @@
<?php
/**
* Partial: Article Card
*
* @param string $image
* @param string $title
* @param string $link
*/
?>
<article class="article-card">
<div class="article-card--wrapper">
<div class="article-card--image">
<a href="<?php echo esc_url( $args['link'] ); ?>">
<img src="<?php echo esc_url( $args['image'] ); ?>" alt="">
</a>
</div>
<div class="article-card--content">
<div class="article-card--title">
<h3>
<a href="<?php echo esc_url( $args['link'] ); ?>">
<?php echo esc_html( $args['title'] ); ?>
</a>
</h3>
</div>
<a class="btn_5" href="<?php echo esc_url( $args['link'] ); ?>">Czytaj więcej</a>
</div>
</div>
</article>

View File

@@ -2,7 +2,7 @@
/**
* Functions which enhance the theme by hooking into WordPress
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
/**
@@ -11,7 +11,7 @@
* @param array $classes Classes for the body element.
* @return array
*/
function brpfinanse_body_classes( $classes ) {
function brpp_prawo_podatki_body_classes( $classes ) {
// Adds a class of hfeed to non-singular pages.
if ( ! is_singular() ) {
$classes[] = 'hfeed';
@@ -24,14 +24,14 @@ function brpfinanse_body_classes( $classes ) {
return $classes;
}
add_filter( 'body_class', 'brpfinanse_body_classes' );
add_filter( 'body_class', 'brpp_prawo_podatki_body_classes' );
/**
* Add a pingback url auto-discovery header for single posts, pages, or attachments.
*/
function brpfinanse_pingback_header() {
function brpp_prawo_podatki_pingback_header() {
if ( is_singular() && pings_open() ) {
printf( '<link rel="pingback" href="%s">', esc_url( get_bloginfo( 'pingback_url' ) ) );
}
}
add_action( 'wp_head', 'brpfinanse_pingback_header' );
add_action( 'wp_head', 'brpp_prawo_podatki_pingback_header' );

View File

@@ -4,14 +4,14 @@
*
* Eventually, some of the functionality here could be replaced by core features.
*
* @package brpfinanse
* @package BRPP_prawo_podatki
*/
if ( ! function_exists( 'brpfinanse_posted_on' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post-date/time.
*/
function brpfinanse_posted_on() {
function brpp_prawo_podatki_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>';
@@ -25,10 +25,13 @@ if ( ! function_exists( 'brpfinanse_posted_on' ) ) :
esc_html( get_the_modified_date() )
);
// $posted_on = sprintf(
// esc_html_x( 'Posted on %s', 'post date', 'brpp-prawo-podatki' ),
// '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
// );
$posted_on = sprintf(
/* translators: %s: post date. */
esc_html_x( 'Posted on %s', 'post date', 'brpfinanse' ),
'<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>'
esc_html_x( '%s', 'post date', 'brpp-prawo-podatki' ), $time_string
);
echo '<span class="posted-on">' . $posted_on . '</span>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
@@ -36,14 +39,14 @@ if ( ! function_exists( 'brpfinanse_posted_on' ) ) :
}
endif;
if ( ! function_exists( 'brpfinanse_posted_by' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_posted_by' ) ) :
/**
* Prints HTML with meta information for the current author.
*/
function brpfinanse_posted_by() {
function brpp_prawo_podatki_posted_by() {
$byline = sprintf(
/* translators: %s: post author. */
esc_html_x( 'by %s', 'post author', 'brpfinanse' ),
esc_html_x( '%s', 'post author', 'brpp-prawo-podatki' ),
'<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>'
);
@@ -52,25 +55,25 @@ if ( ! function_exists( 'brpfinanse_posted_by' ) ) :
}
endif;
if ( ! function_exists( 'brpfinanse_entry_footer' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_entry_footer' ) ) :
/**
* Prints HTML with meta information for the categories, tags and comments.
*/
function brpfinanse_entry_footer() {
function brpp_prawo_podatki_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__( ', ', 'brpfinanse' ) );
$categories_list = get_the_category_list( esc_html__( ', ', 'brpp-prawo-podatki' ) );
if ( $categories_list ) {
/* translators: 1: list of categories. */
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'brpfinanse' ) . '</span>', $categories_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<span class="cat-links">' . esc_html__( 'Posted in %1$s', 'brpp-prawo-podatki' ) . '</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', 'brpfinanse' ) );
$tags_list = get_the_tag_list( '', esc_html_x( ', ', 'list item separator', 'brpp-prawo-podatki' ) );
if ( $tags_list ) {
/* translators: 1: list of tags. */
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'brpfinanse' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
printf( '<span class="tags-links">' . esc_html__( 'Tagged %1$s', 'brpp-prawo-podatki' ) . '</span>', $tags_list ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
}
@@ -80,7 +83,7 @@ if ( ! function_exists( 'brpfinanse_entry_footer' ) ) :
sprintf(
wp_kses(
/* translators: %s: post title */
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'brpfinanse' ),
__( 'Leave a Comment<span class="screen-reader-text"> on %s</span>', 'brpp-prawo-podatki' ),
array(
'span' => array(
'class' => array(),
@@ -97,7 +100,7 @@ if ( ! function_exists( 'brpfinanse_entry_footer' ) ) :
sprintf(
wp_kses(
/* translators: %s: Name of current post. Only visible to screen readers */
__( 'Edit <span class="screen-reader-text">%s</span>', 'brpfinanse' ),
__( 'Edit <span class="screen-reader-text">%s</span>', 'brpp-prawo-podatki' ),
array(
'span' => array(
'class' => array(),
@@ -112,14 +115,14 @@ if ( ! function_exists( 'brpfinanse_entry_footer' ) ) :
}
endif;
if ( ! function_exists( 'brpfinanse_post_thumbnail' ) ) :
if ( ! function_exists( 'brpp_prawo_podatki_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 brpfinanse_post_thumbnail() {
function brpp_prawo_podatki_post_thumbnail() {
if ( post_password_required() || is_attachment() || ! has_post_thumbnail() ) {
return;
}