diff --git a/nacc-wordpress-plugin.php b/nacc-wordpress-plugin.php index 9de76e1..6a3d6b0 100644 --- a/nacc-wordpress-plugin.php +++ b/nacc-wordpress-plugin.php @@ -29,7 +29,7 @@ class NACC { private const DEFAULT_THEME = 'NACC-Instance'; private const DEFAULT_LANGUAGE = 'en'; private const DEFAULT_LAYOUT = 'linear'; - private const DEFAULT_SHOW_SPECIAL = 'true'; + private const DEFAULT_SHOW_SPECIAL = false; private $plugin_dir; /** @@ -140,7 +140,7 @@ private static function render_keytags( array $args ): void { wp_json_encode( esc_attr( $args['theme'] ) ), wp_json_encode( esc_attr( $args['language'] ) ), wp_json_encode( esc_attr( $args['layout'] ) ), - wp_json_encode( esc_attr( $args['special'] ) ), + wp_json_encode( (bool) $args['special'] ), wp_json_encode( esc_attr( $args['siteURI'] ) ) ) ); @@ -316,6 +316,7 @@ public static function register_settings(): void { 'nacc_special', [ 'type' => 'boolean', + 'default' => self::DEFAULT_SHOW_SPECIAL, 'sanitize_callback' => 'wp_validate_boolean', ] ); diff --git a/readme.txt b/readme.txt index 5ac2891..658d3a1 100644 --- a/readme.txt +++ b/readme.txt @@ -32,6 +32,7 @@ That text will be replaced with this cleantime calculator. = 6.0.2 = +* Fixed the "Show Special Keytags" default so that specialty (over 2 years) tags stay hidden until the setting is explicitly enabled, matching the unchecked checkbox and "Default is false." label. * Added a "How to Use" help section to the Settings → NACC admin page documenting the `[nacc]` shortcode, its attributes, and what each setting does. = 6.0.1 =