Skip to content

Commit

Permalink
Merge pull request #60 from dreamsicle-io/release/4.2.1
Browse files Browse the repository at this point in the history
Release/4.2.1
  • Loading branch information
theenoahmason authored Jun 1, 2024
2 parents 50396a1 + 7d8a824 commit 61b3514
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-theme-assets",
"version": "4.2.0",
"version": "4.2.1",
"description": "WP Theme Assets",
"repository": {
"type": "git",
Expand Down
6 changes: 3 additions & 3 deletions package/includes/class-wp-theme-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ class WP_Theme_Assets {
* Style Suffix
*
* @since 0.0.1
* @var bool
* @var string
*/
public bool $style_suffix;
public string $style_suffix;

/**
* Construct
Expand Down Expand Up @@ -111,7 +111,7 @@ public function init(): void {
* @param string $file The name of the file without extensions. Example: `site.min`, `login.min`, `admin.min`, `editor.min`, `customizer-preview.min`, `customizer-controls.min`.
*/
public function get_asset_version( string $file ): string {
$config = require_once $this->$build_directory_path . '/build/' . $file . '.asset.php';
$config = require_once $this->$build_directory_path . '/' . $file . '.asset.php';
return ! empty( $config['version'] ) ? $config['version'] : $this->theme_version;
}

Expand Down
13 changes: 13 additions & 0 deletions package/includes/class-wp-theme-backstage.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@ public function init_options() {
'description' => __( 'All custom WP Theme WordPress options.', 'wp-theme' ),
'show_in_rest' => true,
'sections' => array(
array(
'id' => 'wp_theme_general',
'title' => __( 'General', 'wp-theme' ),
'description' => __( 'Configure general theme options.', 'wp-theme' ),
'fields' => array(
array(
'type' => 'text',
'name' => 'wp_theme_copyright_holder',
'label' => __( 'Copyright Holder', 'wp-theme' ),
'description' => __( 'Set a legal copyright holder to be displayed in all copyright messages.', 'wp-theme' ),
),
),
),
array(
'id' => 'wp_theme_social',
'title' => __( 'Social', 'wp-theme' ),
Expand Down
19 changes: 19 additions & 0 deletions package/includes/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ function wp_theme_branding() {

}

/**
* WP Theme Copyright
*
* @since 0.0.1
*/
function wp_theme_copyright() {

$copyright_holder = get_option( 'wp_theme_copyright_holder' );

printf(
/* translators: 1: year, 2: copyright holder. */
wp_kses_post( __( '&copy; Copyright %1$d <a href="%1$s">%3$s</a>. All rights reserved.', 'wp-theme' ) ),
absint( gmdate( 'Y' ) ),
esc_url( home_url( '/' ) ),
$copyright_holder ? esc_html( $copyright_holder ) : esc_html( get_bloginfo( 'name' ) )
);

}

/**
* WP Theme Comment Count Message
*
Expand Down
2 changes: 2 additions & 0 deletions package/partials/colophon.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
)
); ?>

<?php wp_theme_copyright(); ?>

<?php wp_nav_menu(
array(
'theme_location' => 'legal',
Expand Down

0 comments on commit 61b3514

Please sign in to comment.