__( 'UACF7 Placeholder', 'ultimate-addons-cf7' ), 'callback' => array( $this, 'uacf7_create_placeholder_panel_fields' ), ); return $panels; } /* * Function Placeholder fields */ public function uacf7_create_placeholder_panel_fields( $post ) { // get existing value $fontfamily = get_post_meta( $post->id(), 'uacf7_placeholder_fontfamily', true ); $fontsize = get_post_meta( $post->id(), 'uacf7_placeholder_fontsize', true ); $fontstyle = get_post_meta( $post->id(), 'uacf7_placeholder_fontstyle', true ); $fontweight = get_post_meta( $post->id(), 'uacf7_placeholder_fontweight', true ); $color = get_post_meta( $post->id(), 'uacf7_placeholder_color', true ); $background_color = get_post_meta( $post->id(), 'uacf7_placeholder_background_color', true ); ?>

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




Color





Font Style




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

E.g. Roboto, sans-serif

here' ); ?>

id(), 'uacf7_enable_placeholder_styles', $_POST['uacf7_enable_placeholder_styles'] ); update_post_meta( $form->id(), 'uacf7_placeholder_fontfamily', $_POST['uacf7_placeholder_fontfamily'] ); update_post_meta( $form->id(), 'uacf7_placeholder_fontsize', $_POST['uacf7_placeholder_fontsize'] ); update_post_meta( $form->id(), 'uacf7_placeholder_fontstyle', $_POST['uacf7_placeholder_fontstyle'] ); update_post_meta( $form->id(), 'uacf7_placeholder_fontweight', $_POST['uacf7_placeholder_fontweight'] ); update_post_meta( $form->id(), 'uacf7_placeholder_color', $_POST['uacf7_placeholder_color'] ); update_post_meta( $form->id(), 'uacf7_placeholder_background_color', $_POST['uacf7_placeholder_background_color'] ); } public function uacf7_properties($properties, $cfform) { if (!is_admin() || (defined('DOING_AJAX') && DOING_AJAX)) { $form = $properties['form']; $placeholder_styles = get_post_meta( $cfform->id(), 'uacf7_enable_placeholder_styles', true ); if( $placeholder_styles == 'on' ) : ob_start(); $fontfamily = get_post_meta( $cfform->id(), 'uacf7_placeholder_fontfamily', true ); $fontsize = get_post_meta( $cfform->id(), 'uacf7_placeholder_fontsize', true ); $fontstyle = get_post_meta( $cfform->id(), 'uacf7_placeholder_fontstyle', true ); $fontweight = get_post_meta( $cfform->id(), 'uacf7_placeholder_fontweight', true ); $color = get_post_meta( $cfform->id(), 'uacf7_placeholder_color', true ); $background_color = get_post_meta( $cfform->id(), 'uacf7_placeholder_background_color', true ); ?>