WC_Settings_General::color_picker
Output a color picker input box.
Method of the class: WC_Settings_General{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Settings_General = new WC_Settings_General(); $WC_Settings_General->color_picker( $name, $id, $value, $desc );
- $name(mixed) (required)
- Name of input.
- $id(string) (required)
- ID of input.
- $value(mixed) (required)
- Value of input.
- $desc(string)
- Description for input.
Default: ''
WC_Settings_General::color_picker() WC Settings General::color picker code WC 10.3.5
public function color_picker( $name, $id, $value, $desc = '' ) {
echo '<div class="color_box">' . wc_help_tip( $desc ) . '
<input name="' . esc_attr( $id ) . '" id="' . esc_attr( $id ) . '" type="text" value="' . esc_attr( $value ) . '" class="colorpick" /> <div id="colorPickerDiv_' . esc_attr( $id ) . '" class="colorpickdiv"></div>
</div>';
}