This commit is contained in:
Alexander Agnarson 2025-03-31 12:51:06 +02:00
parent 8e034a54e6
commit bbdd8fc2ff
4 changed files with 32 additions and 14 deletions

View file

@ -633,3 +633,16 @@ function dashwall_skip_link_focus_fix() {
<?php
}
add_action( 'wp_print_footer_scripts', 'dashwall_skip_link_focus_fix' );
/* Kirki deprecated fix
/* ------------------------------------ */
function dashwall_kirki_config( $config ) {
if ( isset( $config['compiler'] ) ) {
unset( $config['compiler'] );
}
return $config;
}
add_filter( 'kirki/config', 'dashwall_kirki_config', 999 );

View file

@ -1,12 +1,12 @@
// Get current theme
var theme = localStorage.getItem( 'theme' );
var dashwall_theme = localStorage.getItem( 'theme' );
// Set defaults if theme is not defined.
if ( ! theme ) {
if ( ! dashwall_theme ) {
localStorage.setItem( 'theme', 'light' );
theme = 'light';
dashwall_theme = 'light';
}
// Add theme to the body.
document.body.classList.add( theme );
document.body.classList.add( dashwall_theme );
// Handle onClick events
document.getElementById( 'theme-toggle' ).addEventListener( 'click', () => {
@ -14,9 +14,9 @@ document.getElementById( 'theme-toggle' ).addEventListener( 'click', () => {
document.body.classList.remove( 'light' );
document.body.classList.remove( 'dark' );
// Change the theme.
theme = ( theme === 'light' ) ? 'dark' : 'light';
dashwall_theme = ( dashwall_theme === 'light' ) ? 'dark' : 'light';
// Save the theme.
localStorage.setItem( 'theme', theme );
localStorage.setItem( 'theme', dashwall_theme );
// Apply the theme.
document.body.classList.add( theme );
document.body.classList.add( dashwall_theme );
});

View file

@ -1,7 +1,7 @@
=== Dashwall ===
Contributors: alxmedia
Requires at least: 5.0
Tested up to: 6.6
Tested up to: 6.7
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0
Tags: blog, one-column, two-columns, right-sidebar, left-sidebar, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, custom-logo, custom-header, custom-background, news, entertainment, footer-widgets
@ -83,5 +83,10 @@ Right column images
== Changelog ==
= 1.0.1 - 2025-03-31 =
* Fixed kirki deprecated notice
* Fixed theme-toggle.js prefix
* Fixed theme links in style.css
= 1.0.0 - 2025-03-28 =
* Initial release

View file

@ -1,17 +1,17 @@
/*
Theme Name: Dashwall
Theme URI: http://alx.media/themes/dashwall/
Version: 1.0.0
Theme URI: https://agnarson.com/wpthemes/dashwall/
Version: 1.0.1
Requires at least: 5.0
Requires PHP: 5.6
Tested up to: 6.6
Description: <a href="http://alx.media/themes/dashwall/">Dashwall</a> is a flexible blog and magazine theme with plenty of options. Optimized for all devices, this theme will stand out with a unique design, including dark/light mode. Demo: http://demo.alx.media/x/?theme=Dashwall
Tested up to: 6.7
Description: <a href="https://agnarson.com/wpthemes/dashwall/">Dashwall</a> is a flexible blog and magazine theme with plenty of options. Optimized for all devices, this theme will stand out with a unique design, including dark/light mode. Demo: https://demo.agnarson.com/?theme=Dashwall
Author: Alexander Agnarson
Author URI: http://alx.media
Author URI: https://agnarson.com
Tags: blog, one-column, two-columns, right-sidebar, left-sidebar, custom-colors, custom-menu, featured-images, flexible-header, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready, custom-logo, custom-header, custom-background, news, entertainment, footer-widgets
Text Domain: dashwall
Copyright: (c) 2024 Alexander "Alx" Agnarson
Copyright: (c) 2025 Alexander "Alx" Agnarson
License: GNU General Public License v3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
*/