'text/css')); wp_localize_script('jquery', 'cm_settings', $cm_settings); wp_enqueue_script('wp-theme-plugin-editor'); wp_enqueue_style('wp-codemirror'); wp_enqueue_script( 'uacf7-uacf7style-script', UACF7_ADDONS . '/styler/js/custom.js', array('jquery', 'wp-color-picker' ), '', true ); } } } /* * Function create tab panel */ public function uacf7_add_panel( $panels ) { $panels['uacf7-uacf7style-panel'] = array( 'title' => __( 'UACF7 Form Styler', 'ultimate-addons-cf7' ), 'callback' => array( $this, 'uacf7_create_uacf7style_panel_fields' ), ); return $panels; } /* * Function uacf7style fields */ public function uacf7_create_uacf7style_panel_fields( $post ) { // get existing value $label_color = get_post_meta( $post->id(), 'uacf7_uacf7style_label_color', true ); $label_background_color = get_post_meta( $post->id(), 'uacf7_uacf7style_label_background_color', true ); $label_font_size = get_post_meta( $post->id(), 'uacf7_uacf7style_label_font_size', true ); $label_font_family = get_post_meta( $post->id(), 'uacf7_uacf7style_label_font_family', true ); $label_font_style = get_post_meta( $post->id(), 'uacf7_uacf7style_label_font_style', true ); $label_font_weight = get_post_meta( $post->id(), 'uacf7_uacf7style_label_font_weight', true ); $label_padding_top = get_post_meta( $post->id(), 'uacf7_uacf7style_label_padding_top', true ); $label_padding_right = get_post_meta( $post->id(), 'uacf7_uacf7style_label_padding_right', true ); $label_padding_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_label_padding_bottom', true ); $label_padding_left = get_post_meta( $post->id(), 'uacf7_uacf7style_label_padding_left', true ); $label_margin_top = get_post_meta( $post->id(), 'uacf7_uacf7style_label_margin_top', true ); $label_margin_right = get_post_meta( $post->id(), 'uacf7_uacf7style_label_margin_right', true ); $label_margin_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_label_margin_bottom', true ); $label_margin_left = get_post_meta( $post->id(), 'uacf7_uacf7style_label_margin_left', true ); $input_color = get_post_meta( $post->id(), 'uacf7_uacf7style_input_color', true ); $input_background_color = get_post_meta( $post->id(), 'uacf7_uacf7style_input_background_color', true ); $input_font_size = get_post_meta( $post->id(), 'uacf7_uacf7style_input_font_size', true ); $input_font_family = get_post_meta( $post->id(), 'uacf7_uacf7style_input_font_family', true ); $input_font_style = get_post_meta( $post->id(), 'uacf7_uacf7style_input_font_style', true ); $input_font_weight = get_post_meta( $post->id(), 'uacf7_uacf7style_input_font_weight', true ); $input_height = get_post_meta( $post->id(), 'uacf7_uacf7style_input_height', true ); $input_border_width = get_post_meta( $post->id(), 'uacf7_uacf7style_input_border_width', true ); $input_border_color = get_post_meta( $post->id(), 'uacf7_uacf7style_input_border_color', true ); $input_border_style = get_post_meta( $post->id(), 'uacf7_uacf7style_input_border_style', true ); $input_border_radius = get_post_meta( $post->id(), 'uacf7_uacf7style_input_border_radius', true ); $textarea_input_height = get_post_meta( $post->id(), 'uacf7_uacf7style_textarea_input_height', true ); $input_padding_top = get_post_meta( $post->id(), 'uacf7_uacf7style_input_padding_top', true ); $input_padding_right = get_post_meta( $post->id(), 'uacf7_uacf7style_input_padding_right', true ); $input_padding_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_input_padding_bottom', true ); $input_padding_left = get_post_meta( $post->id(), 'uacf7_uacf7style_input_padding_left', true ); $input_margin_top = get_post_meta( $post->id(), 'uacf7_uacf7style_input_margin_top', true ); $input_margin_right = get_post_meta( $post->id(), 'uacf7_uacf7style_input_margin_right', true ); $input_margin_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_input_margin_bottom', true ); $input_margin_left = get_post_meta( $post->id(), 'uacf7_uacf7style_input_margin_left', true ); $btn_color = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_color', true ); $btn_background_color = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_background_color', true ); $btn_font_size = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_font_size', true ); $btn_font_style = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_font_style', true ); $btn_font_weight = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_font_weight', true ); $btn_border_width = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_border_width', true ); $btn_border_color = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_border_color', true ); $btn_border_style = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_border_style', true ); $btn_border_radius = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_border_radius', true ); $btn_width = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_width', true ); $btn_color_hover = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_color_hover', true ); $btn_background_color_hover = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_background_color_hover', true ); $btn_border_color_hover = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_border_color_hover', true ); $btn_padding_top = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_padding_top', true ); $btn_padding_right = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_padding_right', true ); $btn_padding_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_padding_bottom', true ); $btn_padding_left = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_padding_left', true ); $btn_margin_top = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_margin_top', true ); $btn_margin_right = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_margin_right', true ); $btn_margin_bottom = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_margin_bottom', true ); $btn_margin_left = get_post_meta( $post->id(), 'uacf7_uacf7style_btn_margin_left', true ); $ua_custom_css = get_post_meta( $post->id(), 'uacf7_uacf7style_ua_custom_css', true ); ?>

documentation' ); ?>
id(), 'uacf7_enable_form_styles', true ); ?>










E.g. 16

E.g. Roboto, sans-serif

E.g. 16

E.g. 16







E.g. 16 (Do not add px or em ).

E.g. Roboto, sans-serif

E.g. 16

E.g. 16

E.g. 16

E.g. 16

E.g. 16 (Do not add px or em ).

E.g. 16









E.g. 16

E.g. 100px or 100%.

E.g. 16

E.g. 16





E.g. 16

E.g. 16

.

id(), 'uacf7_enable_form_styles', $_POST['uacf7_enable_form_styles'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_color', $_POST['uacf7_uacf7style_label_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_background_color', $_POST['uacf7_uacf7style_label_background_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_font_size', $_POST['uacf7_uacf7style_label_font_size'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_font_family', $_POST['uacf7_uacf7style_label_font_family'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_font_style', $_POST['uacf7_uacf7style_label_font_style'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_font_weight', $_POST['uacf7_uacf7style_label_font_weight'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_padding_top', $_POST['uacf7_uacf7style_label_padding_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_padding_right', $_POST['uacf7_uacf7style_label_padding_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_padding_bottom', $_POST['uacf7_uacf7style_label_padding_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_padding_left', $_POST['uacf7_uacf7style_label_padding_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_margin_top', $_POST['uacf7_uacf7style_label_margin_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_margin_right', $_POST['uacf7_uacf7style_label_margin_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_margin_bottom', $_POST['uacf7_uacf7style_label_margin_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_label_margin_left', $_POST['uacf7_uacf7style_label_margin_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_color', $_POST['uacf7_uacf7style_input_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_background_color', $_POST['uacf7_uacf7style_input_background_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_font_size', $_POST['uacf7_uacf7style_input_font_size'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_font_family', $_POST['uacf7_uacf7style_input_font_family'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_font_style', $_POST['uacf7_uacf7style_input_font_style'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_font_weight', $_POST['uacf7_uacf7style_input_font_weight'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_height', $_POST['uacf7_uacf7style_input_height'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_border_width', $_POST['uacf7_uacf7style_input_border_width'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_border_color', $_POST['uacf7_uacf7style_input_border_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_border_style', $_POST['uacf7_uacf7style_input_border_style'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_border_radius', $_POST['uacf7_uacf7style_input_border_radius'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_textarea_input_height', $_POST['uacf7_uacf7style_textarea_input_height'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_padding_top', $_POST['uacf7_uacf7style_input_padding_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_padding_right', $_POST['uacf7_uacf7style_input_padding_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_padding_bottom', $_POST['uacf7_uacf7style_input_padding_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_padding_left', $_POST['uacf7_uacf7style_input_padding_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_margin_top', $_POST['uacf7_uacf7style_input_margin_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_margin_right', $_POST['uacf7_uacf7style_input_margin_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_margin_bottom', $_POST['uacf7_uacf7style_input_margin_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_input_margin_left', $_POST['uacf7_uacf7style_input_margin_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_color', $_POST['uacf7_uacf7style_btn_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_background_color', $_POST['uacf7_uacf7style_btn_background_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_font_size', $_POST['uacf7_uacf7style_btn_font_size'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_font_style', $_POST['uacf7_uacf7style_btn_font_style'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_font_weight', $_POST['uacf7_uacf7style_btn_font_weight'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_border_width', $_POST['uacf7_uacf7style_btn_border_width'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_border_color', $_POST['uacf7_uacf7style_btn_border_color'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_border_style', $_POST['uacf7_uacf7style_btn_border_style'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_border_radius', $_POST['uacf7_uacf7style_btn_border_radius'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_width', $_POST['uacf7_uacf7style_btn_width'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_color_hover', $_POST['uacf7_uacf7style_btn_color_hover'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_background_color_hover', $_POST['uacf7_uacf7style_btn_background_color_hover'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_border_color_hover', $_POST['uacf7_uacf7style_btn_border_color_hover'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_padding_top', $_POST['uacf7_uacf7style_btn_padding_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_padding_right', $_POST['uacf7_uacf7style_btn_padding_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_padding_bottom', $_POST['uacf7_uacf7style_btn_padding_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_padding_left', $_POST['uacf7_uacf7style_btn_padding_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_margin_top', $_POST['uacf7_uacf7style_btn_margin_top'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_margin_right', $_POST['uacf7_uacf7style_btn_margin_right'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_margin_bottom', $_POST['uacf7_uacf7style_btn_margin_bottom'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_btn_margin_left', $_POST['uacf7_uacf7style_btn_margin_left'] ); update_post_meta( $form->id(), 'uacf7_uacf7style_ua_custom_css', $_POST['uacf7_uacf7style_ua_custom_css'] ); } public function uacf7_properties($properties, $cfform) { if (!is_admin() || (defined('DOING_AJAX') && DOING_AJAX)) { $form = $properties['form']; $form_styles = get_post_meta( $cfform->id(), 'uacf7_enable_form_styles', true ); if( $form_styles == 'on' ) : ob_start(); $label_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_color', true ); $label_background_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_background_color', true ); $label_font_size = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_font_size', true ); $label_font_family = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_font_family', true ); $label_font_style = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_font_style', true ); $label_font_weight = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_font_weight', true ); $label_padding_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_padding_top', true ); $label_padding_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_padding_right', true ); $label_padding_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_padding_bottom', true ); $label_padding_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_padding_left', true ); $label_margin_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_margin_top', true ); $label_margin_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_margin_right', true ); $label_margin_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_margin_bottom', true ); $label_margin_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_label_margin_left', true ); $input_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_color', true ); $input_background_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_background_color', true ); $input_font_size = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_font_size', true ); $input_font_family = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_font_family', true ); $input_font_style = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_font_style', true ); $input_font_weight = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_font_weight', true ); $input_height = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_height', true ); $input_border_width = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_border_width', true ); $input_border_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_border_color', true ); $input_border_style = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_border_style', true ); $input_border_radius = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_border_radius', true ); $textarea_input_height = get_post_meta( $cfform->id(), 'uacf7_uacf7style_textarea_input_height', true ); $input_padding_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_padding_top', true ); $input_padding_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_padding_right', true ); $input_padding_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_padding_bottom', true ); $input_padding_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_padding_left', true ); $input_margin_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_margin_top', true ); $input_margin_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_margin_right', true ); $input_margin_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_margin_bottom', true ); $input_margin_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_input_margin_left', true ); $btn_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_color', true ); $btn_background_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_background_color', true ); $btn_font_size = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_font_size', true ); $btn_font_style = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_font_style', true ); $btn_font_weight = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_font_weight', true ); $btn_width = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_width', true ); $btn_border_color = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_border_color', true ); $btn_border_style = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_border_style', true ); $btn_border_radius = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_border_radius', true ); $btn_border_width = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_border_width', true ); $btn_color_hover = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_color_hover', true ); $btn_background_color_hover = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_background_color_hover', true ); $btn_border_color_hover = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_border_color_hover', true ); $btn_padding_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_padding_top', true ); $btn_padding_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_padding_right', true ); $btn_padding_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_padding_bottom', true ); $btn_padding_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_padding_left', true ); $btn_margin_top = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_margin_top', true ); $btn_margin_right = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_margin_right', true ); $btn_margin_bottom = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_margin_bottom', true ); $btn_margin_left = get_post_meta( $cfform->id(), 'uacf7_uacf7style_btn_margin_left', true ); $ua_custom_css = get_post_meta( $cfform->id(), 'uacf7_uacf7style_ua_custom_css', true ); ?> id().'">'.$form.''; $properties['form'] = ob_get_clean(); endif; } return $properties; } } new UACF7_uacf7style();