/includes/forms/views/tabs/form-appearance.php

  1. <?php 
  2.  
  3. $theme = wp_get_theme(); 
  4. $css_options = array( 
  5. '0' => sprintf( __( 'Inherit from %s theme', 'mailchimp-for-wp' ), $theme->Name ),  
  6. 'basic' => __( 'Basic', 'mailchimp-for-wp' ),  
  7. __( 'Form Themes', 'mailchimp-for-wp' ) => array( 
  8. 'theme-light' => __( 'Light Theme', 'mailchimp-for-wp' ),  
  9. 'theme-dark' => __( 'Dark Theme', 'mailchimp-for-wp' ),  
  10. 'theme-red' => __( 'Red Theme', 'mailchimp-for-wp' ),  
  11. 'theme-green' => __( 'Green Theme', 'mailchimp-for-wp' ),  
  12. 'theme-blue' => __( 'Blue Theme', 'mailchimp-for-wp' ),  
  13. ); 
  14.  
  15. /** 
  16. * Filters the <option>'s in the "CSS Stylesheet" <select> box. 
  17. * 
  18. * @ignore 
  19. */ 
  20. $css_options = apply_filters( 'mc4wp_admin_form_css_options', $css_options ); 
  21.  
  22. ?> 
  23.  
  24. <h2><?php _e( 'Form Appearance', 'mailchimp-for-wp' ); ?></h2> 
  25.  
  26. <table class="form-table"> 
  27. <tr valign="top"> 
  28. <th scope="row"><label for="mc4wp_load_stylesheet_select"><?php _e( 'Form Style' , 'mailchimp-for-wp' ); ?></label></th> 
  29. <td class="nowrap valigntop"> 
  30. <select name="mc4wp_form[settings][css]" id="mc4wp_load_stylesheet_select"> 
  31.  
  32. <?php foreach( $css_options as $key => $option ) { 
  33. if( is_array( $option ) ) { 
  34. $label = $key; 
  35. $options = $option; 
  36. printf( '<optgroup label="%s">', $label ); 
  37. foreach( $options as $key => $option ) { 
  38. printf( '<option value="%s" %s>%s</option>', $key, selected( $opts['css'], $key, false ), $option ); 
  39. print( '</optgroup>' ); 
  40. } else { 
  41. printf( '<option value="%s" %s>%s</option>', $key, selected( $opts['css'], $key, false ), $option ); 
  42. } ?> 
  43. </select> 
  44. <p class="help"> 
  45. <?php _e( 'If you want to load some default CSS styles, select "basic formatting styles" or choose one of the color themes' , 'mailchimp-for-wp' ); ?> 
  46. </p> 
  47. </td> 
  48. </tr> 
  49.  
  50. <?php 
  51. /** @ignore */ 
  52. do_action( 'mc4wp_admin_form_after_appearance_settings_rows', $opts, $form ); 
  53. ?> 
  54.  
  55. </table> 
  56.  
  57. <?php submit_button(); ?> 
.