Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private function register_scripts() {
- if ( wp_script_is( 'wp-color-picker', 'registered' ) ) {
- return;
- }
- wp_register_script(
- 'iris',
- admin_url( 'js/iris.min.js' ),
- array(
- 'jquery-ui-draggable',
- 'jquery-ui-slider',
- 'jquery-touch-punch',
- ),
- '1.0.7',
- true
- );
- wp_register_script( 'wp-color-picker', admin_url( 'js/color-picker.min.js' ), array( 'iris' ), '', true );
- wp_localize_script(
- 'wp-color-picker',
- 'wpColorPickerL10n',
- array(
- 'clear' => __( 'Clear', 'mb-frontend-submission' ),
- 'clearAriaLabel' => __( 'Clear color', 'mb-frontend-submission' ),
- 'defaultString' => __( 'Default', 'mb-frontend-submission' ),
- 'defaultAriaLabel' => __( 'Select default color', 'mb-frontend-submission' ),
- 'pick' => __( 'Select Color', 'mb-frontend-submission' ),
- 'defaultLabel' => __( 'Color value', 'mb-frontend-submission' ),
- )
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement