/wordpress/wp-content/plugins/wp-admin-ui-customize/inc/setting_admin_general.php

https://bitbucket.org/gfelizola/pacaembu-institucional · PHP · 183 lines · 164 code · 18 blank · 1 comment · 9 complexity · bcd0feec31552b86b28a3d6428e1184a MD5 · raw file

  1. <?php
  2. if( !empty( $_POST["update"] ) ) {
  3. $this->update_admin_general();
  4. } elseif( !empty( $_POST["reset"] ) ) {
  5. $this->update_reset( 'admin_general' );
  6. }
  7. $Data = $this->get_data( 'admin_general' );
  8. $User = wp_get_current_user();
  9. // include js css
  10. $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' , 'thickbox' );
  11. wp_enqueue_script( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.js', $ReadedJs , $this->Ver );
  12. wp_enqueue_style('thickbox');
  13. wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.css', array() , $this->Ver );
  14. ?>
  15. <div class="wrap">
  16. <div class="icon32" id="icon-tools"></div>
  17. <?php echo $this->Msg; ?>
  18. <h2><?php _e( 'General Screen Settings' , $this->ltd ); ?></h2>
  19. <p>&nbsp;</p>
  20. <form id="waum_setting_admin_genelral" class="waum_form" method="post" action="">
  21. <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
  22. <?php wp_nonce_field(); ?>
  23. <div class="metabox-holder columns-1">
  24. <div class="postbox">
  25. <div class="handlediv" title="Click to toggle"><br></div>
  26. <h3 class="hndle"><span><?php echo _e( 'Notifications' , $this->ltd ); ?></span></h3>
  27. <div class="inside">
  28. <table class="form-table">
  29. <tbody>
  30. <tr>
  31. <th>
  32. <label><?php _e( 'WordPress core update notice' , $this->ltd ); ?></label>
  33. </th>
  34. <td>
  35. <?php $field = 'notice_update_core'; ?>
  36. <?php $Checked = ''; ?>
  37. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  38. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
  39. </td>
  40. </tr>
  41. <tr>
  42. <th>
  43. <label><?php _e( 'Plugin update notice' , $this->ltd ); ?></label>
  44. </th>
  45. <td>
  46. <?php $field = 'notice_update_plugin'; ?>
  47. <?php $Checked = ''; ?>
  48. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  49. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
  50. </td>
  51. </tr>
  52. <tr>
  53. <th>
  54. <label><?php _e( 'Theme update notice' , $this->ltd ); ?></label>
  55. </th>
  56. <td>
  57. <?php $field = 'notice_update_theme'; ?>
  58. <?php $Checked = ''; ?>
  59. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  60. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Not notified' , $this->ltd ); ?></label>
  61. </td>
  62. </tr>
  63. </tbody>
  64. </table>
  65. </div>
  66. </div>
  67. <div class="postbox">
  68. <div class="handlediv" title="Click to toggle"><br></div>
  69. <h3 class="hndle"><span><?php echo _e( 'Screen Options and Help Tab' , $this->ltd ); ?></span></h3>
  70. <div class="inside">
  71. <table class="form-table">
  72. <tbody>
  73. <tr>
  74. <th>
  75. <label><?php _e( 'Screen Options' ); ?></label>
  76. </th>
  77. <td>
  78. <?php $field = 'screen_option_tab'; ?>
  79. <?php $Checked = ''; ?>
  80. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  81. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  82. </td>
  83. </tr>
  84. <tr>
  85. <th>
  86. <label><?php _e( 'Help' ); ?></label>
  87. </th>
  88. <td>
  89. <?php $field = 'help_tab'; ?>
  90. <?php $Checked = ''; ?>
  91. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  92. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  93. </td>
  94. </tr>
  95. </tbody>
  96. </table>
  97. </div>
  98. </div>
  99. <div class="postbox">
  100. <div class="handlediv" title="Click to toggle"><br></div>
  101. <h3 class="hndle"><span><?php echo _e( 'Footer' ); ?></span></h3>
  102. <div class="inside">
  103. <table class="form-table">
  104. <tbody>
  105. <tr>
  106. <th>
  107. <label><?php _e( 'Footer text' , $this->ltd ); ?></label>
  108. </th>
  109. <td>
  110. <?php $field = 'footer_text'; ?>
  111. <?php $Val = ''; ?>
  112. <?php if( !empty( $Data[$field] ) ) : $Val = esc_html( stripslashes( $Data[$field] ) ); endif; ?>
  113. <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="large-text" />
  114. <p class="description">Default: <?php _e( 'Thank you for creating with <a href="http://wordpress.org/">WordPress</a>.' ); ?></p>
  115. <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
  116. </td>
  117. </tr>
  118. </tbody>
  119. </table>
  120. </div>
  121. </div>
  122. <div class="postbox">
  123. <div class="handlediv" title="Click to toggle"><br></div>
  124. <h3 class="hndle"><span><?php _e( 'General' ); ?></span></h3>
  125. <div class="inside">
  126. <table class="form-table">
  127. <tbody>
  128. <?php $field = 'css'; ?>
  129. <tr>
  130. <th>
  131. <label><?php _e( 'CSS file to load' , $this->ltd ); ?></label>
  132. </th>
  133. <td>
  134. <?php $Val = ''; ?>
  135. <?php if( !empty( $Data[$field] ) ) : $Val = strip_tags( $Data[$field] ); endif; ?>
  136. <input type="text" name="data[<?php echo $field; ?>]" value="<?php echo $Val; ?>" class="regular-text" id="<?php echo $field; ?>">
  137. <a href="#TB_inline?height=300&width=600&inlineId=list_variables&modal=false" title="<?php _e( 'Variables' , $this->ltd ); ?>" class="thickbox"><?php _e( 'Available Shortcodes' , $this->ltd ); ?></a>
  138. </td>
  139. </tr>
  140. <?php $field = 'title_tag'; ?>
  141. <tr>
  142. <th>
  143. <label><?php _e( 'Title tag for Admin screen' , $this->ltd ); ?></label>
  144. </th>
  145. <td>
  146. <?php $Checked = ''; ?>
  147. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  148. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Remove "Wordpress" from the title tag of the Admin screen' , $this->ltd ); ?></label>
  149. </td>
  150. </tr>
  151. </tbody>
  152. </table>
  153. </div>
  154. </div>
  155. </div>
  156. <p class="submit">
  157. <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
  158. </p>
  159. <p class="submit reset">
  160. <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
  161. <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
  162. </p>
  163. </form>
  164. </div>
  165. <?php require_once( dirname( __FILE__ ) . '/list_variables.php' ); ?>