This is the way I go…
I have a doubt that will be accepted but I wasted way to much time trying to find a way to do it a “right” way.
Or is this, or I’ll cut off the idea of customization for my themes and the end user will have do write the css by themselves.
And I got this on my other account on an soft-reject.
- Scripts and styles should not be hardcoded anywhere in your theme or added any other way but with wp_enqueue_* hook and to be added from the functions file. This includes custom JS/CSS.
For inline styles use: https://developer.wordpress.org/reference/functions/wp_add_inline_style/ and for scripts https://developer.wordpress.org/reference/functions/wp_add_inline_script/
How can I use
wp_add_inline_style() in a shortcode? Is there any other method to let me give the end user a easy option to customize the theme easily?
So, how am I supposed to give the end user the ability to customize some of the shortcode elements? Like a color for a paragraph or add some margin? Most of my clients depends on those kind of things.
I don’t know if this is the correct to post this, but since is has to do with the inline style rule for plugins, I think this deserve more to discuss on it.