Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add none option to loading of tokens #58

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YvetteNikolov
Copy link

Screenshot 2024-03-26 at 13 17 59

  • Adds a "None" option to the "Load tokens from: " option setting
  • Choosing "None" skips the enqueuing of the tokens css

@YvetteNikolov
Copy link
Author

Closes #57

@@ -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" ) ) {
Copy link
Author

@YvetteNikolov YvetteNikolov Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze extra check is eigenlijk niet nodig aangezien client/tokens/ncb-none-tokens.css niet bestaat, maar dit maakt het wel extra verbose.

Hoor het wel of je deze erin wilt houden.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants