twentyeleven_theme_options_render_page

Render the theme options page for Twenty Eleven.

Description

twentyeleven_theme_options_render_page(); 

Usage

  1. if ( !function_exists( 'twentyeleven_theme_options_render_page' ) ) { 
  2. require_once '/inc/theme-options.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = twentyeleven_theme_options_render_page(); 
  7.  

Defined (1)

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

/inc/theme-options.php  
  1. function twentyeleven_theme_options_render_page() { 
  2. ?> 
  3. <div class="wrap"> 
  4. <?php screen_icon(); ?> 
  5. <h2><?php printf( __( '%s Theme Options', 'twentyeleven' ), get_current_theme() ); ?></h2> 
  6. <?php settings_errors(); ?> 
  7.  
  8. <form method="post" action="options.php"> 
  9. <?php 
  10. settings_fields( 'twentyeleven_options' ); 
  11. ?> 
  12.  
  13. <table class="form-table"> 
  14.  
  15. <tr valign="top" class="image-radio-option color-scheme"><th scope="row"><?php _e( 'Color Scheme', 'twentyeleven' ); ?></th> 
  16. <td> 
  17. <fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend> 
  18. <?php 
  19. foreach ( twentyeleven_color_schemes() as $scheme ) { 
  20. ?> 
  21. <div class="layout"> 
  22. <label class="description"> 
  23. <input type="radio" name="twentyeleven_theme_options[color_scheme]" value="<?php echo esc_attr( $scheme['value'] ); ?>" <?php checked( $options['color_scheme'], $scheme['value'] ); ?> /> 
  24. <input type="hidden" id="default-color-<?php echo esc_attr( $scheme['value'] ); ?>" value="<?php echo esc_attr( $scheme['default_link_color'] ); ?>" /> 
  25. <span> 
  26. <img src="<?php echo esc_url( $scheme['thumbnail'] ); ?>" width="136" height="122" alt="" /> 
  27. <?php echo $scheme['label']; ?> 
  28. </span> 
  29. </label> 
  30. </div> 
  31. <?php 
  32. ?> 
  33. </fieldset> 
  34. </td> 
  35. </tr> 
  36.  
  37. <tr valign="top"><th scope="row"><?php _e( 'Link Color', 'twentyeleven' ); ?></th> 
  38. <td> 
  39. <fieldset><legend class="screen-reader-text"><span><?php _e( 'Link Color', 'twentyeleven' ); ?></span></legend> 
  40. <input type="text" name="twentyeleven_theme_options[link_color]" id="link-color" value="<?php echo esc_attr( $options['link_color'] ); ?>" /> 
  41. <a href="#" class="pickcolor hide-if-no-js" id="link-color-example"></a> 
  42. <input type="button" class="pickcolor button hide-if-no-js" value="<?php esc_attr_e( 'Select a Color', 'twentyeleven' ); ?>" /> 
  43. <div id="colorPickerDiv" style="z-index: 100; background:#eee; border:1px solid #ccc; position:absolute; display:none;"></div> 
  44. <br /> 
  45. <span><?php printf( __( 'Default color: %s', 'twentyeleven' ), '<span id="default-color">' . twentyeleven_get_default_link_color( $options['color_scheme'] ) . '</span>' ); ?></span> 
  46. </fieldset> 
  47. </td> 
  48. </tr> 
  49.  
  50. <tr valign="top" class="image-radio-option theme-layout"><th scope="row"><?php _e( 'Default Layout', 'twentyeleven' ); ?></th> 
  51. <td> 
  52. <fieldset><legend class="screen-reader-text"><span><?php _e( 'Color Scheme', 'twentyeleven' ); ?></span></legend> 
  53. <?php 
  54. foreach ( twentyeleven_layouts() as $layout ) { 
  55. ?> 
  56. <div class="layout"> 
  57. <label class="description"> 
  58. <input type="radio" name="twentyeleven_theme_options[theme_layout]" value="<?php echo esc_attr( $layout['value'] ); ?>" <?php checked( $options['theme_layout'], $layout['value'] ); ?> /> 
  59. <span> 
  60. <img src="<?php echo esc_url( $layout['thumbnail'] ); ?>" width="136" height="122" alt="" /> 
  61. <?php echo $layout['label']; ?> 
  62. </span> 
  63. </label> 
  64. </div> 
  65. <?php 
  66. ?> 
  67. </fieldset> 
  68. </td> 
  69. </tr> 
  70. </table> 
  71.  
  72. <?php submit_button(); ?> 
  73. </form> 
  74. </div> 
  75. <?php