diff --git a/admin/class-admin.php b/admin/class-admin.php index d391c12..545f2e9 100644 --- a/admin/class-admin.php +++ b/admin/class-admin.php @@ -234,6 +234,9 @@ public function nlds_community_blocks_render_token_select() { $nlds_community_blocks_municipalities[ $ncb_community ] = ucfirst( $ncb_community ); } + // Add a none option. + $nlds_community_blocks_municipalities['none'] = esc_html__( 'None', 'nlds-community-blocks' ); + // Output the field. foreach ( $nlds_community_blocks_municipalities as $value => $label ) { echo '
'; diff --git a/frontend/class-frontend.php b/frontend/class-frontend.php index 55aa8eb..feab5b2 100644 --- a/frontend/class-frontend.php +++ b/frontend/class-frontend.php @@ -99,7 +99,7 @@ public function enqueue_block_assets() { } $ncb_theme = esc_attr( get_option( 'ncb_municipality', 'denhaag' ) ); - if ( ! empty( $ncb_theme ) && Plugin::has_resource( NCB_ABSPATH . NCB_ASSETS_DIR . "client/tokens/ncb-$ncb_theme-tokens.css" ) ) { + if ( ! empty( $ncb_theme ) && 'none' !== $ncb_theme && Plugin::has_resource( NCB_ABSPATH . NCB_ASSETS_DIR . "client/tokens/ncb-$ncb_theme-tokens.css" ) ) { wp_enqueue_style( "ncb-$ncb_theme-tokens", ncb_mix( "client/tokens/ncb-$ncb_theme-tokens.css" ),