responsive_deluxe_theme_options_view

The Responsive Deluxe responsive deluxe theme options view function.

Description

responsive_deluxe_theme_options_view(); 

Usage

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

Defined (1)

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

/inc/theme-options.php  
  1. function responsive_deluxe_theme_options_view() { 
  2. ?> 
  3. <div class="wrap"> 
  4. <form method="post" action=""> 
  5. <h2><?php _e('Deluxe Options Page', 'responsive-deluxe'); ?></h2> 
  6. <div class="metabox-holder has-right-sidebar"> 
  7. <div id="post-body"> 
  8. <div id="post-body-content"> 
  9. <?php 
  10. if (isset($_POST['options'])) { 
  11. $author = ''; 
  12. if ( isset ($_POST['options']['author'] ) ) { 
  13. $author = $_POST['options']['author']; 
  14. $sanitized_options = array( 
  15. 'logo' => esc_url( $_POST['options']['logo'] ),  
  16. 'header' => wp_strip_all_tags( $_POST['options']['header'] ),  
  17. 'author' => $author,  
  18. 'fb' => esc_url( $_POST['options']['fb'] ),  
  19. 'twitter' => esc_url( $_POST['options']['twitter'] ),  
  20. 'linkedin' => esc_url( $_POST['options']['linkedin'] ),  
  21. 'youtube' => esc_url( $_POST['options']['youtube'] ),  
  22. 'insta' => esc_url( $_POST['options']['insta'] ),  
  23. 'gplus' => esc_url( $_POST['options']['gplus'] ),  
  24. 'pinterest' => esc_url( $_POST['options']['pinterest'] ),  
  25. 'vimeo' => esc_url( $_POST['options']['vimeo'] ),  
  26. 'tumblr' => esc_url( $_POST['options']['tumblr'] ),  
  27. ); 
  28. update_option('deluxe_theme_options', $sanitized_options); 
  29. ?> 
  30. <div id="setting-error-settings_updated" class="updated settings-error">  
  31. <p><strong><?php _e( 'Settings saved.', 'responsive-deluxe' ); ?></strong></p></div> 
  32. <?php 
  33. $options = get_option('deluxe_theme_options'); 
  34. ?> 
  35. <div class="postbox"> 
  36. <div class="inside"> 
  37. <p><b style="font-size:18px; color: #0064FF;"><?php _e( 'Upload your logo', 'responsive-deluxe' ); ?></b></p><hr> 
  38. <p class="description"><?php _e( 'Upload a logo, otherwise your blog name will be shown', 'responsive-deluxe' ); ?></p> 
  39. <table> 
  40. <tbody> 
  41. <tr> 
  42. <td width="170px" valign="top"><b><?php _e('Logo', 'responsive-deluxe'); ?></b></td> 
  43. <td valign="top"> 
  44. <input type="text" name="options[logo]" id="optionsLogoURL" size="75" value="<?php echo esc_url( $options['logo'] ); ?>"> 
  45. <input type="button" name="thumbnail" id="uploadBtn" class="button-secondary" value="<?php _e( 'Upload Logo', 'responsive-deluxe' ); ?>" /> 
  46. </td> 
  47. <td valign="top"><?php if ( !empty( $options['logo'] ) ) { ?> 
  48. <img src="<?php echo esc_url( $options['logo'] ); ?>" id="deluxeLogo"> 
  49. <?php } ?> 
  50. </td> 
  51. </tr> 
  52. </tbody> 
  53. </table> 
  54. </div> 
  55.  
  56. <div class="inside"> 
  57. <p><b style="font-size:18px; color: #0064FF;"><?php _e('Post View Page', 'responsive-deluxe'); ?></b></p><hr> 
  58. <table> 
  59. <tbody> 
  60. <tr> 
  61. <td valign="top"><input type="checkbox" name="options[author]" <?php if( !empty( $options['author'] ) ) { ?> checked="chechek" <?php } ?>><?php _e('Show author information on post view page', 'responsive-deluxe'); ?></td> 
  62. </tr> 
  63. </tbody> 
  64. </table> 
  65. </div> 
  66.  
  67. <div class="inside"> 
  68. <p><b style="font-size:18px; color: #0064FF;"><?php _e('Custom Code', 'responsive-deluxe'); ?></b></p><hr> 
  69. <p class="description"><?php _e( 'Add your custom scripts and styles in the following fields.', 'responsive-deluxe' ); ?></p> 
  70. <table> 
  71. <tbody> 
  72. <tr> 
  73. <td width="170px" valign="top"><b><?php _e('Add Custom Code', 'responsive-deluxe'); ?></b></td> 
  74. <td><textarea name="options[header]" rows="10" cols="75"><?php echo esc_textarea( $options['header'] ); ?></textarea></td> 
  75. </tr> 
  76. </tbody> 
  77. </table> 
  78. </div> 
  79.  
  80. <div class="inside"> 
  81. <p><b style="font-size:18px; color: #0064FF;"><?php _e('Social Networks', 'responsive-deluxe'); ?></b></p><hr> 
  82. <p class="description"><?php _e( 'Please use the full URL to your social network pages.', 'responsive-deluxe' ); ?></p> 
  83. <table> 
  84. <tbody> 
  85. <tr> 
  86. <td width="170px"><?php _e('Facebook', 'responsive-deluxe'); ?></td> 
  87. <td><input type="text" name="options[fb]" size="75" value="<?php echo esc_attr( $options['fb'] ); ?>" /></td> 
  88. </tr> 
  89. <tr> 
  90. <td><?php _e('Twitter', 'responsive-deluxe'); ?></td> 
  91. <td><input type="text" name="options[twitter]" size="75" value="<?php echo esc_attr( $options['twitter'] ); ?>" /></td> 
  92. </tr> 
  93. <tr> 
  94. <td><?php _e('Linkedin', 'responsive-deluxe'); ?></td> 
  95. <td><input type="text" name="options[linkedin]" size="75" value="<?php echo esc_attr( $options['linkedin'] ); ?>" /></td> 
  96. </tr> 
  97. <tr> 
  98. <td><?php _e('YouTube', 'responsive-deluxe'); ?></td> 
  99. <td><input type="text" name="options[youtube]" size="75" value="<?php echo esc_attr( $options['youtube'] ); ?>" /></td> 
  100. </tr> 
  101. <tr> 
  102. <td><?php _e('Instagram', 'responsive-deluxe'); ?></td> 
  103. <td><input type="text" name="options[insta]" size="75" value="<?php echo esc_attr( $options['insta'] ); ?>" /></td> 
  104. </tr> 
  105. <tr> 
  106. <td><?php _e('Google +', 'responsive-deluxe'); ?></td> 
  107. <td><input type="text" name="options[gplus]" size="75" value="<?php echo esc_attr( $options['gplus'] ); ?>" /></td> 
  108. </tr> 
  109. <tr> 
  110. <td><?php _e('Pinterest', 'responsive-deluxe'); ?></td> 
  111. <td><input type="text" name="options[pinterest]" size="75" value="<?php echo esc_attr( $options['pinterest'] ); ?>" /></td> 
  112. </tr> 
  113. <tr> 
  114. <td><?php _e('Vimeo', 'responsive-deluxe'); ?></td> 
  115. <td><input type="text" name="options[vimeo]" size="75" value="<?php echo esc_attr( $options['vimeo'] ); ?>" /></td> 
  116. </tr> 
  117. <tr> 
  118. <td><?php _e('Tumblr', 'responsive-deluxe'); ?></td> 
  119. <td><input type="text" name="options[tumblr]" size="75" value="<?php echo esc_attr( $options['tumblr'] ); ?>" /></td> 
  120. </tr> 
  121. </tbody> 
  122. </table> 
  123. <hr> 
  124. <input type="submit" class="button-primary" value="<?php esc_attr_e('Save Changes', 'responsive-deluxe'); ?>" /> 
  125. </div> 
  126. </div> 
  127. </div> 
  128. </div> 
  129. </div> 
  130. </form> 
  131. </div> 
  132. <?php