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

https://bitbucket.org/gfelizola/pacaembu-institucional · PHP · 175 lines · 160 code · 14 blank · 1 comment · 11 complexity · 0edb6b33f00faf54767ae75e1947ab91 MD5 · raw file

  1. <?php
  2. if( !empty( $_POST["update"] ) ) {
  3. $this->update_dashboard();
  4. } elseif( !empty( $_POST["reset"] ) ) {
  5. $this->update_reset( 'dashboard' );
  6. }
  7. $Data = $this->get_data( 'dashboard' );
  8. // include js css
  9. $ReadedJs = array( 'jquery' , 'jquery-ui-sortable' );
  10. wp_enqueue_script( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.js', $ReadedJs , $this->Ver );
  11. wp_enqueue_style( $this->PageSlug , $this->Dir . dirname( dirname( plugin_basename( __FILE__ ) ) ) . '.css', array() , $this->Ver );
  12. ?>
  13. <div class="wrap">
  14. <div class="icon32" id="icon-tools"></div>
  15. <?php echo $this->Msg; ?>
  16. <h2><?php _e( 'Dashboard' ); ?><?php _e( 'Settings' ); ?></h2>
  17. <p>&nbsp;</p>
  18. <form id="waum_setting_dashboard" class="waum_form" method="post" action="">
  19. <input type="hidden" name="<?php echo $this->UPFN; ?>" value="Y" />
  20. <?php wp_nonce_field(); ?>
  21. <div class="metabox-holder columns-1">
  22. <div class="postbox">
  23. <div class="handlediv" title="Click to toggle"><br></div>
  24. <h3 class="hndle"><span><?php _e( 'Meta boxes' , $this->ltd ); ?></span></h3>
  25. <div class="inside">
  26. <table class="form-table">
  27. <tbody>
  28. <?php $field = 'show_welcome_panel'; ?>
  29. <tr>
  30. <th>
  31. <label><?php _e( 'Welcome Panel' , $this->ltd ); ?></label>
  32. </th>
  33. <td>
  34. <?php $Checked = ''; ?>
  35. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  36. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  37. </td>
  38. </tr>
  39. <?php $field = 'dashboard_right_now'; ?>
  40. <tr>
  41. <th>
  42. <label><?php _e( 'Right Now' ); ?></label>
  43. </th>
  44. <td>
  45. <?php $Checked = ''; ?>
  46. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  47. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  48. </td>
  49. </tr>
  50. <?php $field = 'dashboard_recent_comments'; ?>
  51. <tr>
  52. <th>
  53. <label><?php _e( 'Recent Comments' ); ?></label>
  54. </th>
  55. <td>
  56. <?php $Checked = ''; ?>
  57. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  58. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  59. </td>
  60. </tr>
  61. <?php $field = 'dashboard_incoming_links'; ?>
  62. <tr>
  63. <th>
  64. <label><?php _e( 'Incoming Links' ); ?></label>
  65. </th>
  66. <td>
  67. <?php $Checked = ''; ?>
  68. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  69. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  70. </td>
  71. </tr>
  72. <?php $field = 'dashboard_plugins'; ?>
  73. <tr>
  74. <th>
  75. <label><?php _e( 'Plugins' ); ?></label>
  76. </th>
  77. <td>
  78. <?php $Checked = ''; ?>
  79. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  80. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  81. </td>
  82. </tr>
  83. <?php $field = 'dashboard_quick_press'; ?>
  84. <tr>
  85. <th>
  86. <label><?php _e( 'QuickPress' ); ?></label>
  87. </th>
  88. <td>
  89. <?php $Checked = ''; ?>
  90. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  91. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  92. </td>
  93. </tr>
  94. <?php $field = 'dashboard_recent_drafts'; ?>
  95. <tr>
  96. <th>
  97. <label><?php _e( 'Recent Drafts' ); ?></label>
  98. </th>
  99. <td>
  100. <?php $Checked = ''; ?>
  101. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  102. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  103. </td>
  104. </tr>
  105. <?php $field = 'dashboard_primary'; ?>
  106. <tr>
  107. <th>
  108. <label><?php _e( 'WordPress Blog' ); ?></label>
  109. </th>
  110. <td>
  111. <?php $Checked = ''; ?>
  112. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  113. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  114. </td>
  115. </tr>
  116. <?php $field = 'dashboard_secondary'; ?>
  117. <tr>
  118. <th>
  119. <label><?php _e( 'Other WordPress News' ); ?></label>
  120. </th>
  121. <td>
  122. <?php $Checked = ''; ?>
  123. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  124. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e ( 'Hide' ); ?></label>
  125. </td>
  126. </tr>
  127. </tbody>
  128. </table>
  129. </div>
  130. </div>
  131. <div class="postbox">
  132. <div class="handlediv" title="Click to toggle"><br></div>
  133. <h3 class="hndle"><span><?php _e( 'Other' , $this->ltd ); ?></span></h3>
  134. <div class="inside">
  135. <table class="form-table">
  136. <tbody>
  137. <?php $field = 'metabox_move'; ?>
  138. <tr>
  139. <th>
  140. <label><?php _e( 'Meta box movement restriction' , $this->ltd ); ?></label>
  141. </th>
  142. <td>
  143. <?php $Checked = ''; ?>
  144. <?php if( !empty( $Data[$field] ) ) : $Checked = 'checked="checked"'; endif; ?>
  145. <label><input type="checkbox" name="data[<?php echo $field; ?>]" value="1" <?php echo $Checked; ?> /> <?php _e( "Lock meta box positions" , $this->ltd ); ?></label>
  146. </td>
  147. </tr>
  148. </tbody>
  149. </table>
  150. </div>
  151. </div>
  152. </div>
  153. <p class="submit">
  154. <input type="submit" class="button-primary" name="update" value="<?php _e( 'Save' ); ?>" />
  155. </p>
  156. <p class="submit reset">
  157. <span class="description"><?php _e( 'Reset all settings?' , $this->ltd ); ?></span>
  158. <input type="submit" class="button-secondary" name="reset" value="<?php _e('Reset'); ?>" />
  159. </p>
  160. </form>
  161. </div>