[ Index ]

PHP Cross Reference of GlotPress

title

Body

[close]

/gp-templates/ -> settings.php (source)

   1  <?php
   2  /**
   3   * The settings page
   4   *
   5   * Displays the settings page for a user.
   6   *
   7   * @link http://glotpress.org
   8   *
   9   * @package GlotPress
  10   * @since 2.0.0
  11   */
  12  
  13  gp_title( __( 'Your Settings &lt; GlotPress', 'glotpress' ) );
  14  gp_breadcrumb( array( __( 'Your Settings', 'glotpress' ) ) );
  15  gp_tmpl_header();
  16  
  17  // phpcs:disable WordPress.WP.GlobalVariablesOverride.Prohibited
  18  $per_page = (int) get_user_option( 'gp_per_page' );
  19  if ( 0 === $per_page ) {
  20      $per_page = 15;
  21  }
  22  // phpcs:enable WordPress.WP.GlobalVariablesOverride.Prohibited
  23  
  24  $default_sort = get_user_option( 'gp_default_sort' );
  25  if ( ! is_array( $default_sort ) ) {
  26      $default_sort = array(
  27          'by'  => 'priority',
  28          'how' => 'desc',
  29      );
  30  }
  31  ?>
  32  <h2><?php _e( 'Your Settings', 'glotpress' ); ?></h2>
  33  <form action="" method="post">
  34      <?php require_once  __DIR__ . '/settings-edit.php'; ?>
  35      <br>
  36      <?php gp_route_nonce_field( 'update-settings_' . get_current_user_id() ); ?>
  37      <input  class="button is-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Save Settings', 'glotpress' ); ?>">
  38  </form>
  39  
  40  <?php
  41  gp_tmpl_footer();


Generated: Fri Dec 27 01:01:06 2024 Cross-referenced by PHPXref 0.7.1