cf7_style_load_property

Dashboard generate custom style desired properties.

Description

cf7_style_load_property(); 

Usage

  1. if ( !function_exists( 'cf7_style_load_property' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7-style/cf7-style.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = cf7_style_load_property(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/cf7-style.php  
  1. function cf7_style_load_property() { 
  2.  
  3. $form_property = sanitize_text_field( $_POST['property'] ); 
  4. $form_panel = ""; 
  5. $saved_values = maybe_unserialize(get_post_meta( $post->ID, 'cf7_style_custom_styler', true )); 
  6. $saved_values = (empty($saved_values)) ? array() : $saved_values; 
  7. require 'plugin-options.php'; 
  8. foreach( $elements as $property => $property_value ) { 
  9. if( $property == $form_property ) { 
  10. if( $property_value['description'] != "") { 
  11. $form_panel .= '<h4 class="description-title">'.$property_value['description'].'</h4>'; 
  12. foreach( $property_value['settings'] as $sub_property_key => $sub_property_value ) { 
  13. $property = strtolower( $property ); 
  14. $sub_property_slug = strtolower( $options[$sub_property_value]['slug'] ); 
  15. $style_element_name = strtolower($options[$sub_property_value]['name']); 
  16. $half_width_class = ( $style_element_name == "box sizing" || $style_element_name == "display" || $style_element_name == "position" || $style_element_name == "width" || $style_element_name == "height") ? "half-size" : ""; 
  17. $form_panel .= '<div class="element-styling '.$half_width_class.' '.$style_element_name.'"><h3><span><'.$property.'></span> '.$style_element_name . '</h3>'; 
  18. if( $options[$sub_property_value]['type'] ) { 
  19. $form_panel .= "<ul>"; 
  20. foreach( $options[$sub_property_value]['type'] as $key => $value ) { 
  21. if( $key != "comming-soon" ) { 
  22. $form_panel .= generate_property_fields( $key, $value, $property, $sub_property_slug, $saved_values, ''); 
  23. $form_panel .= generate_property_fields( $key, $value, $property, $sub_property_slug, $saved_values, '_hover'); 
  24. } else { 
  25. $form_panel .= "<li></li>"; 
  26. $form_panel .= "</ul>"; 
  27. $form_panel .= "</div>"; 
  28. print_r($form_panel); 
  29. wp_die();