Jetpack_Settings_Page

The Jetpack by WordPress.com Jetpack Settings Page class.

Defined (1)

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

/_inc/lib/admin-pages/class.jetpack-settings-page.php  
  1. class Jetpack_Settings_Page extends Jetpack_Admin_Page { 
  2. // Show the settings page only when Jetpack is connected or in dev mode 
  3. protected $dont_show_if_not_active = true; 
  4. function add_page_actions( $hook ) {} // There are no page specific actions to attach to the menu 
  5.  
  6. // Adds the Settings sub menu 
  7. function get_page_hook() { 
  8. return add_submenu_page( 'jetpack', __( 'Jetpack Settings', 'jetpack' ), __( 'Settings', 'jetpack' ), 'jetpack_manage_modules', 'jetpack_modules', array( $this, 'render' ) ); 
  9.  
  10. // Renders the module list table where you can use bulk action or row 
  11. // actions to activate/deactivate and configure modules 
  12. function page_render() { 
  13. $list_table = new Jetpack_Modules_List_Table; 
  14. ?> 
  15. <div class="clouds-sm"></div> 
  16. <?php /** This action is documented in class.jetpack.php */ 
  17. do_action( 'jetpack_notices' ) ?> 
  18. <div class="page-content configure"> 
  19. <div class="frame top hide-if-no-js"> 
  20. <div class="wrap"> 
  21. <div class="manage-left"> 
  22. <table class="table table-bordered fixed-top"> 
  23. <thead> 
  24. <tr> 
  25. <th class="check-column"><input type="checkbox" class="checkall"></th> 
  26. <th colspan="2"> 
  27. <?php $list_table->unprotected_display_tablenav( 'top' ); ?> 
  28. <span class="filter-search"> 
  29. <button type="button" class="button">Filter</button> 
  30. </span> 
  31. </th> 
  32. </tr> 
  33. </thead> 
  34. </table> 
  35. </div> 
  36. </div><!-- /.wrap --> 
  37. </div><!-- /.frame --> 
  38. <div class="frame bottom"> 
  39. <div class="wrap"> 
  40. <div class="manage-right"> 
  41. <div class="bumper"> 
  42. <form class="navbar-form" role="search"> 
  43. <input type="hidden" name="page" value="jetpack_modules" /> 
  44. <?php $list_table->search_box( __( 'Search', 'jetpack' ), 'srch-term' ); ?> 
  45. <p><?php esc_html_e( 'View:', 'jetpack' ); ?></p> 
  46. <div class="button-group filter-active"> 
  47. <button type="button" class="button <?php if ( empty( $_GET['activated'] ) ) echo 'active'; ?>"><?php esc_html_e( 'All', 'jetpack' ); ?></button> 
  48. <button type="button" class="button <?php if ( ! empty( $_GET['activated'] ) && 'true' == $_GET['activated'] ) echo 'active'; ?>" data-filter-by="activated" data-filter-value="true"><?php esc_html_e( 'Active', 'jetpack' ); ?></button> 
  49. <button type="button" class="button <?php if ( ! empty( $_GET['activated'] ) && 'false' == $_GET['activated'] ) echo 'active'; ?>" data-filter-by="activated" data-filter-value="false"><?php esc_html_e( 'Inactive', 'jetpack' ); ?></button> 
  50. </div> 
  51. <p><?php esc_html_e( 'Sort by:', 'jetpack' ); ?></p> 
  52. <div class="button-group sort"> 
  53. <button type="button" class="button <?php if ( empty( $_GET['sort_by'] ) ) echo 'active'; ?>" data-sort-by="name"><?php esc_html_e( 'Alphabetical', 'jetpack' ); ?></button> 
  54. <button type="button" class="button <?php if ( ! empty( $_GET['sort_by'] ) && 'introduced' == $_GET['sort_by'] ) echo 'active'; ?>" data-sort-by="introduced" data-sort-order="reverse"><?php esc_html_e( 'Newest', 'jetpack' ); ?></button> 
  55. <button type="button" class="button <?php if ( ! empty( $_GET['sort_by'] ) && 'sort' == $_GET['sort_by'] ) echo 'active'; ?>" data-sort-by="sort"><?php esc_html_e( 'Popular', 'jetpack' ); ?></button> 
  56. </div> 
  57. <p><?php esc_html_e( 'Show:', 'jetpack' ); ?></p> 
  58. <?php $list_table->views(); ?> 
  59. </form> 
  60. </div> 
  61. </div> 
  62. <div class="manage-left"> 
  63. <form class="jetpack-modules-list-table-form" onsubmit="return false;"> 
  64. <table class="<?php echo implode( ' ', $list_table->get_table_classes() ); ?>"> 
  65. <tbody id="the-list"> 
  66. <?php $list_table->display_rows_or_placeholder(); ?> 
  67. </tbody> 
  68. </table> 
  69. </form> 
  70. </div> 
  71. </div><!-- /.wrap --> 
  72. </div><!-- /.frame --> 
  73. </div><!-- /.content --> 
  74. <?php 
  75.  
  76. // Javascript logic specific to the list table 
  77. function page_admin_scripts() { 
  78. wp_enqueue_script( 'jetpack-admin-js', plugins_url( '_inc/jetpack-admin.js', JETPACK__PLUGIN_FILE ), array( 'jquery' ), JETPACK__VERSION . '-20121111' );