-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Hello again! This is not so much an issue as a question about a potential change to the customizer options.
I really wanted to use variables for the toolbar colors etc. rather than the default color picker, and now that I've got a plugin that my clients won't be able to update, I wanted to test out making some changes to it :) so I changed all the "color" field values in https://github.com/accessiblepixel/oneclickaccessibility2-fork/blob/main/includes/pojo-a11y-customizer.php to text fields instead so I could just use variables, and it seems to render the css just fine. I thought I'd put this comment here for the following reasons:
- In case you or someone else might be interested in using it the same way (grr color picker without custom palette), Or perhaps
- In case there's some other way to achieve similar functionality (for eg. I'm not sure how difficult it is to create a customizer object that has the theme's custom color palette available within plugin settings?) If it's a case of I just haven't read https://developer.wordpress.org/themes/customize-api/customizer-objects/ enough, and it's basically just a different premade object, it'd probably make more sense to just do that? If text is the easier way, then perhaps
- In case there's a security reason that I Shouldn't do what I've done, maybe you or someone else will be kind enough to let me know that :>
Thank you so very very much for doing this once again!!!
P.S. I unfortunately don't have funds to spare at the moment 😢 but if you put a donation link of some kind in the customizer, I bet people who are used to Elementor shoving itself everywhere will be just fine with that.
P.P.S. Adding an example below
$fields[] = [ 'id' => 'a11y_toggle_button_color', 'title' => __( 'Toggle Button Color', 'pojo-accessibility' ), 'type' => 'text', //instead of color here 'std' => '#ffffff', 'selector' => '#pojo-a11y-toolbar .pojo-a11y-toolbar-toggle a', 'change_type' => 'color', 'description' => __( 'Set Toolbar toggle button icon color', 'pojo-accessibility' ), ];