PluginProbe
WP API SwaggerUI / trunk
WP API SwaggerUI vtrunk
2.4.0 2.3.0 2.2.0 2.1.0 2.1.1 2.0.3 2.0.1 2.0.2 trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.2.0 2.0.0
wp-api-swaggerui / template / setting.php

setting.php in WP API SwaggerUI trunk, at template/setting.php

70 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wrap">
2 <h2><?php echo esc_html( $page_title ); ?></h2>
3 <form action="" method="post">
4 <?php wp_nonce_field( 'swagger_api_setting' ) ?>
5 <table class="form-table">
6 <tbody>
7 <tr>
8 <th>API Basepath</th>
9 <td>
10 <select name="swagger_api_basepath">
11 <?php
12 foreach ( $namespaces as $namespace ) {
13 ?>
14 <option value="<?php echo esc_attr( $namespace ); ?>" <?php selected( $namespace, $swagger_api_basepath ) ?>><?php echo esc_html( $namespace ); ?></option>
15 <?php
16 }
17 ?>
18 </select>
19 </td>
20 </tr>
21 <tr>
22 <th>Authentication</th>
23 <td>
24 <label>
25 <input type="checkbox" name="swagger_api_auth_schemes[]" value="basic" <?php checked( in_array( 'basic', $swagger_api_auth_schemes, true ) ); ?>>
26 Basic
27 </label><br>
28 <label>
29 <input type="checkbox" name="swagger_api_auth_schemes[]" value="bearer" <?php checked( in_array( 'bearer', $swagger_api_auth_schemes, true ) ); ?>>
30 Bearer (Authorization header)
31 </label>
32 <p class="description">Which authentication methods appear in the Swagger UI Authorize dialog. Bearer requires a token plugin (e.g. JWT) installed to validate requests.</p>
33 </td>
34 </tr>
35 <tr>
36 <th>OpenAPI Version</th>
37 <td>
38 <select name="swagger_api_spec_version">
39 <?php
40 foreach ( $spec_versions as $version ) {
41 ?>
42 <option value="<?php echo esc_attr( $version ); ?>" <?php selected( $version, $swagger_api_spec_version ); ?>><?php echo esc_html( $version ); ?></option>
43 <?php
44 }
45 ?>
46 </select>
47 <p class="description">Schema output format. 2.0 = Swagger 2.0; 3.0.3 = OpenAPI 3.0.3.</p>
48 </td>
49 </tr>
50 <tr>
51 <th>Contact Email</th>
52 <td>
53 <label>
54 <input type="checkbox" name="swagger_api_expose_contact_email" value="1" <?php checked( '1', $swagger_api_expose_contact_email ); ?>>
55 Include the site admin email as the API contact in the schema
56 </label>
57 <p class="description">Uncheck to omit <code>contact.email</code> from the public schema. Developers can still override via the <code>swagger_api_contact_email</code> filter.</p>
58 </td>
59 </tr>
60 <tr>
61 <th>API Docs</th>
62 <td>
63 <a href="<?php echo esc_url( $docs_url ); ?>" target="__blank">Docs URL</a>
64 </td>
65 </tr>
66 </tbody>
67 </table>
68 <?php submit_button(); ?>
69 </form>
70 </div>