Stacks API value not set on default

Hi Themeco team,

I’m reporting a bug with the Stacks API example on your documentation page: https://theme.co/docs/stack-api.

The default value for the sample_theme_option_toggle option is set to true , but when I load the theme options, the toggle is not turned on by default.

Here are the steps to reproduce the bug:

  1. Copy the example code to the functions.php
  2. Go to the theme options page.
  3. Select the stack “My Stack”.
  4. The “sample_theme_option_toggle” should be turned on by default.

However, when I load the theme options, the toggle is not turned on by default. I also can’t find the key for this option in the Dev Toolkit.

1 Like

Hello thanks for sending this to me. The values is now apart of the configuration array and not a function argument to more closely match the Custom Elements API. Apologies for not updating the docs on this they are updated now. Have a great day!

1 Like

Ah I see, thanks for updating the docs!

1 Like