How to override a function in the wp_includes folder(block supports/colors.php)
How to override a function in the wp_includes folder(block supports/colors.php)
How to override a function in the wp_includes folder(block supports/colors.php)
There is no such option in WordPress, you will need to consult the 3rd party plugins you have installed to identify the plugin that provided it then contact their support. But you shouldn’t need it, as WordPress already provides this feature, and it’s visible in your screenshot as highlight: Which brings up a colour picker:
You are setting the color of the paragraph the link resides in, but in style.css (that is part of the theme you are using) there is a rule targeting all <a> elements that is more specific targeting and is overriding the color you are trying to set at the <p> level. You can try customizing … Read more
Color Picker UI in admin is not correct
Don’t save everything as individual options, save all of your options as an array under a single key. One query to load it and save it, then just do all your manipulation in php. example structure and output: $colors = array( ‘current_scheme’ => ‘user_scheme’, ‘preset_schemes’ => array( ‘red’ => array( ‘menu’ => ‘#CC0000’, ‘footer’ => … Read more
You must make sure that your styles are hooked into the head of the site after other styles, so they will override them. You do this by putting them late in the action queue like this: add_action (‘wp_head’, ‘your_output_function’, 9999);
It’s hard to know for sure, since you don’t include the markup you’re output for the metabox nor the JS you’re using to clone. But, the following simplified setup seems to work for me: metabox markup <label for=”my_field”> My Color Picker Field </label> <input name=”my_field” id=’my_field’ type=”text” class=”my-colorpicker” /> <a href=”#” class=”clone-it”>Add Another Color Picker</a> … Read more
Thanks for your help Sally, here is the completed jQuery which pushes the RGB value to another field. Name of the RGB field has _rgb at the end. jQuery(function() { var myOptions = { // you can declare a default color here, // or in the data-default-color attribute on the input defaultColor: false, // a … Read more
Well, just change this: el( ColorPalette, { value: props.attributes.paletteData[0], onChange: updatePalette, } ) to this: el( ‘div’, {}, props.attributes.paletteData.map( function ( value, i ) { return el( ColorPalette, { ‘value’: value, onChange: updatePalette, key: ‘color-‘ + i, // required //… } ); } ) ) I.e. Pass an array of elements as the third parameter: … Read more
You should be able to add more colors using the add_theme_support function as per the docs here add_theme_support( ‘editor-color-palette’, array( array( ‘name’ => __( ‘strong magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘strong-magenta’, ‘color’ => ‘#a156b4’, ), array( ‘name’ => __( ‘light grayish magenta’, ‘themeLangDomain’ ), ‘slug’ => ‘light-grayish-magenta’, ‘color’ => ‘#d0a5db’, ), array( ‘name’ => __( … Read more