maddisondesigns / customizer-custom-controls Goto Github PK
View Code? Open in Web Editor NEWWordPress Customizer Custom Controls
WordPress Customizer Custom Controls
Hello.
Make sure that the items remain in place after saving. Currently, when saving, the selected items move up, and those that are not marked move down. Make sure that the elements are arranged in the order in which they were set by the user or by default regardless of whether they are selected or not.
How do I use this control? How can I use it to display a meta article, for example?
Thanks.
Sorry, my technology is limited. After I failed several times, I came here to ask for help
if ( !$this->multiselect ) {
// When using Select2 for single selection, the Placeholder needs an empty at the top of the list for it to work (multi-selects dont need this)
echo ''.$this->placeholder.'';
Here Need to Add $this->placeholder between option tag please reply soon
Hello,
This is really helpful repo. Do you have any demo/example of custom control with React?
sotable pill check box doesnot update visually on customizer. i mean ordering of checkbox doses not update on customizer settings
What happens:
When removing all choices from multi-select dropdown list
customizer should save empty value for correct theme_mod
Instead, after re-opening customizer i still have one selected value left in select-dropdown list
I can't wipe out all choices from select dropdown , also echoing theme_mode returns that one value
When removing last value from list i can't Publish this change - its like nothing happens inside Customizer,so i need change something else to click on Publish.
Hi! Thank you for the useful controls!
I'm trying to use the Slider control for a font size control. The skyrocket_sanitize_integer
sanitization only works if step is 1 (doesn't work if it's .1 or .5). But if I use the fawn_theme_range_sanitization
sanitization the control stops working entirely (I can move the slider in the customizer, but the font size doesn't change at all). I've copied all the CSS, scripts + controls. I uploaded the sample theme you've provided to a test blog and it works correctly there. I've gone over all the codes several times, but I can't find the mistake.
First, since this is the first issue ever -
Amazing work. Truly shows you understand the inner workings of WordPress. That repeater field is killer!
But it has a tiny issue which makes it, in my case, unusable.
I'd like for it to spit out an array, I know that each customizer option is stored within a theme_mod
but do you have any idea how to create a dynamic array for this theme_mod instead of just a string?
It should be an associative array, such as:
$repeat_control_values = [
'link1' => 'link.com',
'link2' => 'link2.com'
]
Thank you and amazing work, once again.
I've added a class of google font custom control same as given.
And created a control in the customizer file but it is showing an error.
Warning: Invalid argument supplied for foreach() in
public function skyrocket_getFontIndex( $haystack, $needle ) {
foreach( $haystack as $key => $value ) {
if( $value->family == $needle ) {
return $key;
}
}
return false;
}
Hi, Please, could you add responsive data to any control? Desktop, Tablet and Smartphone.
Thank for all these controls, your project is very cool!
Thank you
This looks so cool.
Please submit to Composer: https://packagist.org/packages/submit
Thank you for this.
Hi @maddisondesigns!
great collection of controls! Thanks!
I'm integrating the "Image checkbox" custom control. It is working fine except from the fact that it doesn't check saved values when loading.
It is weird, because if I check the code, the function esc_attr( $this->value())
is echoing the saved values into the customize-control-multi-image-checkbox
hidden input... but, if I echo that function or the value of $chkboxValues
I get nothing, just an empty string. Being that variable empty, it is normal that no option is checked when loading.
Any idea what might be happening? I'm really lost. Can't understand why the saved value can be retrieved within the hidden input but not anywhere else???
Thanks!
Hi Anthony,
These customizer controls are fantastic!
For the TinyMCE control, paragraph tags aren't automatically inserted as they are in a default WordPress Text widget and have to be manually added in the Text/HTML tab, which is not ideal. Do you know how to fix this?
Thanks!
Hello,
I am using your google font custom control and getting an error given below:
Trying to get property 'font' of non-object in line
$this->fontListIndex = $this-> skyrocket_getFontIndex( $this->fontList, $this->fontValues->font );
Trying to get property 'category' of non-object in line
<input type="hidden" class="google-fonts-category" value="<?php echo $this->fontValues->category; ?>">
Could you please help me?
Thanks in advance!
Hi,
Whenever I switch quickly between the colors on the palette, after 10 clicks or so, the browser freezes, not responding again.
This doesn't happen with the default wordpress color picker.
Hello,
Could you please add an example of Alpha Color with wp-color-picker-alpha ?
This one overwrites Iris and WP Color Picker.
Side note :
In The WordPress Customizer โ A Developers Guide (Part 1),
Under 1. Registering Customizer Content,
The end of mytheme_customize_register
is wrong.
It should be a closing brace }
and not a closing parentheses );
Thanks a lot for your time (digging in the core) and all your efforts bringing the Customizer much closer.
Hello, I'm testing your nice Google Fonts selector customizer control.
It works great for the pure selection of the fonts data, but my question is: once implemented, this should automatically enqueue the link to the actual font (in order to be rendered in the page) or I have to enqueue separately the font through the google CDN? 'Cause now the fonts are not rendered.
Maybe/surely I've missed something...
Thank you in advance
Paolo
No matter what I do this flat out does not work even copying everything exactly the same. It breaks the customizer and there is a warning about this block
<b>Warning</b>: Invalid argument supplied for foreach() in <b>.../customizer-custom-controls\inc\custom-controls.php</b> on line <b>713</b><br />
/**
* Find the index of the saved font in our multidimensional array of Google Fonts
*/
public function getFontIndex( $haystack, $needle ) {
foreach( $haystack as $key => $value ) {
if( $value->family == $needle ) {
return $key;
}
}
return false;
}
I mostly would just like the drag and drop field but I can't figure out why this isn't working.
Hi,
Thanks for the repo, looks great.
I am testing your controls with my theme based on Sage 9 and I am getting the next error:
Uncaught TypeError: $(...).sortable is not a function
on customizer.js
$( ".pill_checkbox_control .sortable" ).sortable({
placeholder: "pill-ui-state-highlight",
update: function( event, ui ) {
skyrocketGetAllPillCheckboxes($(this).parent());
}
});
Any idea what the problem is?
Thanks
the read me says: If you want to collect other type of data, such as plain text, simply duplicate this control and modify as necessary.
problem is that the jquery needs to be altered to make this work. I have worked thru everything accept for adding a new row. I can't simply hardcode the new row text for the multi-button so I am using jquery clone to get the new row added. Problem is if I .clone(false) I get a dead multi-box... if I .clone(true) when I try to select the new box the box I cloned gets selected.
any ideas?
thanks, john
I copied the files as they are, but only textarea are showing and not the toolbars. Any help?
Thanks for the beautiful controls!
I tried slider, but found that it did not work when I set a step size < 1, say 0.5. I set a max=4, min=0, and step=0.5. The circle slider did not respond, which was stuck on the left end of the bar, and I could not slide it to other positions to set different values. I also downloaded your ephemal theme, and went to your layout/container width control, which has a slider with step=5 and works perfectly. I tried to change it to 0.5, and the slider stuck. Could you help resolve this problem?
Thanks again.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.