PluginProbe
WP-Stateless – Google Cloud Storage / trunk
WP-Stateless – Google Cloud Storage vtrunk
4.4.3 2.1.7 2.1.8 2.1.9 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.3.0 2.3.1 2.3.2 3.0 3.0.1 3.0.2 3.0.3 3.0.4 3.1.0 3.1.1 3.2.0 3.2.1 3.2.2 All 62 releases
wp-stateless / static / views / settings-sections / general.php

general.php in WP-Stateless – Google Cloud Storage trunk, at static/views/settings-sections/general.php

154 lines 8.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <tr>
2 <th scope="row"><?php _e('General', ud_get_stateless_media()->domain); ?></th>
3
4 <td>
5 <fieldset>
6
7 <legend class="screen-reader-text"><span><?php _e('General', ud_get_stateless_media()->domain); ?></span></legend>
8
9 <h4><?php _e('Mode', ud_get_stateless_media()->domain); ?></h4>
10
11 <p class="description"><strong id="notice-mode"></strong></p>
12
13 <?php if (is_network_admin()) : ?>
14 <p class="sm-mode">
15 <label for="sm_mode_not_override">
16 <input id="sm_mode_not_override" type="radio" name="sm[mode]" value="" <?php checked( $sm->mode, '' ); ?>>
17 <?php _e('Don\'t override', ud_get_stateless_media()->domain); ?>
18 <small class="description"><?php _e('Don\'t override.', ud_get_stateless_media()->domain); ?></small>
19 </label>
20 </p>
21 <?php endif; ?>
22
23 <p class="sm-mode">
24 <label for="sm_mode_disabled">
25 <input id="sm_mode_disabled" type="radio" name="sm[mode]" value="disabled" <?php checked( $sm->mode, 'disabled' ); ?>>
26 <?php _e('Disabled', ud_get_stateless_media()->domain); ?>
27 <small class="description"><?php _e('Disable Stateless Media.', ud_get_stateless_media()->domain); ?></small>
28 </label>
29 </p>
30
31 <p class="sm-mode">
32 <label for="sm_mode_backup">
33 <input id="sm_mode_backup" type="radio" name="sm[mode]" value="backup" <?php checked( $sm->mode, 'backup' ); ?>>
34 <?php _e('Backup', ud_get_stateless_media()->domain); ?>
35 <small class="description"><?php _e('Upload media files to Google Storage and serve local file urls.', ud_get_stateless_media()->domain); ?></small>
36 </label>
37 </p>
38
39 <p class="sm-mode">
40 <label for="sm_mode_cdn">
41 <input id="sm_mode_cdn" type="radio" name="sm[mode]" value="cdn" <?php checked( $sm->mode, 'cdn' ); ?>>
42 <?php _e('CDN', ud_get_stateless_media()->domain); ?>
43 <small class="description"><?php _e('Copy media files to Google Storage and serve them directly from there.', ud_get_stateless_media()->domain); ?></small>
44 </label>
45 </p>
46
47 <p class="sm-mode">
48 <label for="sm_mode_ephemeral">
49 <input id="sm_mode_ephemeral" type="radio" name="sm[mode]" value="ephemeral" <?php checked( $sm->mode, 'ephemeral' ); ?>>
50 <?php _e('Ephemeral', ud_get_stateless_media()->domain); ?>
51 <small class="description"><?php _e('Store and serve media files with Google Cloud Storage only. Media files are not stored locally, but local storage is used temporarily for processing and is required for certain compatibilities, generating thumbnails for PDF documents.', ud_get_stateless_media()->domain); ?></small>
52 </label>
53 </p>
54
55 <p class="sm-mode">
56 <label for="sm_mode_stateless">
57 <input id="sm_mode_stateless" type="radio" name="sm[mode]" value="stateless" <?php checked( $sm->mode, 'stateless' ); ?>>
58 <?php if ( apply_filters('wp_stateless_is_app_engine', false) ) : ?>
59 <?php _e('Stateless (Google App Engine Detected)', ud_get_stateless_media()->domain); ?>
60 <?php else : ?>
61 <?php _e('Stateless', ud_get_stateless_media()->domain); ?>
62 <?php endif; ?>
63
64 <small class="description"><?php _e('Store and serve media files with Google Cloud Storage only. Media files are not stored locally.', ud_get_stateless_media()->domain); ?></small>
65 </label>
66 </p>
67
68 <hr>
69
70 <h4><?php _e('File URL Replacement', ud_get_stateless_media()->domain); ?></h4>
71
72 <p class="sm-file-url">
73 <select name="sm[body_rewrite]" id="sm_body_rewrite">
74 <?php if (is_network_admin()) : ?>
75 <option value="" <?php selected( $sm->body_rewrite, '' ); ?>><?php _e("Don't override"); ?></option>
76 <?php endif; ?>
77 <option value="false" <?php selected( $sm->body_rewrite, 'false' ); ?>><?php _e('Disable', ud_get_stateless_media()->domain); ?></option>
78 <option value="enable_editor" <?php selected( $sm->body_rewrite, 'enable_editor' ); ?>><?php _e('Enable Editor', ud_get_stateless_media()->domain); ?></option>
79 <option value="enable_meta" <?php selected( $sm->body_rewrite, 'enable_meta' ); ?>><?php _e('Enable Meta', ud_get_stateless_media()->domain); ?></option>
80 <option value="true" <?php selected( $sm->body_rewrite, 'true' ); ?>><?php _e('Enable Editor & Meta', ud_get_stateless_media()->domain); ?></option>
81 </select>
82 </p>
83
84 <p class="description">
85 <strong id="notice-body_rewrite"></strong>
86 <?php _e('Scans post content and meta during presentation and replaces local media file urls with GCS urls. When selecting meta or true depending on the amount of meta, this could be significantly impact performance negatively. This setting does not modify your database.', ud_get_stateless_media()->domain); ?>
87 </p>
88
89 <h4 class="supported-file-types"><?php _e('Supported File Types', ud_get_stateless_media()->domain); ?></h4>
90
91 <div class="body_rewrite_types supported-file-types">
92 <p>
93 <label for="body_rewrite_types">
94 <input name="sm[body_rewrite_types]" type="text" id="body_rewrite_types" class="regular-text ltr" value="<?php echo $sm->body_rewrite_types; ?>">
95 </label>
96 </p>
97
98 <p class="description"><strong id="notice-body_rewrite_types"></strong>
99 <?php _e('Define the file types you would like supported with File URL Replacement. Separate each type by a space.', ud_get_stateless_media()->domain); ?>
100 </p>
101 </div>
102
103 <h4><?php _e('REST API Endpoint', ud_get_stateless_media()->domain); ?></h4>
104
105 <div class="use_api_siteurl">
106 <p>
107 <select id="use_api_siteurl" name="sm[use_api_siteurl]">
108 <?php if (is_network_admin()) : ?>
109 <option value="" <?php selected( $sm->use_api_siteurl, '' ); ?>><?php _e('Don\'t override', ud_get_stateless_media()->domain); ?></option>
110 <?php endif; ?>
111 <option value="WP_HOME" <?php selected( $sm->use_api_siteurl, 'WP_HOME' ); ?>><?php _e('WP_HOME', ud_get_stateless_media()->domain); ?></option>
112 <option value="WP_SITEURL" <?php selected( $sm->use_api_siteurl, 'WP_SITEURL' ); ?>><?php _e('WP_SITEURL', ud_get_stateless_media()->domain); ?></option>
113 </select>
114 </p>
115
116 <p class="description">
117 <strong id="notice-use_api_siteurl"></strong>
118 <?php _e('By default, we use the <code>WP_HOME</code> endpoint for REST API requests. If you encounter problems with synchronization or data optimization functions, try using the <code>WP_SITEURL</code> option instead. This is useful if your WordPress dashboard and frontend website utilize different domain names, such as with a headless CMS configuration.', ud_get_stateless_media()->domain); ?>
119 </p>
120 </div>
121
122 <h4><?php _e('Send Status Emails', ud_get_stateless_media()->domain); ?></h4>
123
124 <div class="status_email_type">
125 <p class="sm-status-email-type">
126 <select name="sm[status_email_type]" id="sm_status_email_type">
127 <?php if (is_network_admin()) : ?>
128 <option value="" <?php selected( $sm->status_email_type, '' ); ?>><?php _e("Don't override"); ?></option>
129 <?php endif; ?>
130 <option value="false" <?php selected( $sm->status_email_type, 'false' ); ?>><?php _e('Disable', ud_get_stateless_media()->domain); ?></option>
131 <option value="true" <?php selected( $sm->status_email_type, 'true' ); ?>><?php _e('Use Admin Email', ud_get_stateless_media()->domain); ?></option>
132 <option value="custom" <?php selected( $sm->status_email_type, 'custom' ); ?>><?php _e('Use Custom Email', ud_get_stateless_media()->domain); ?></option>
133 </select>
134 </p>
135
136 <p class="description"><strong id="notice-status_email_type"></strong>
137 <?php _e('Send status emails for background synchronization and data optimization processes.', ud_get_stateless_media()->domain); ?>
138 </p>
139 </div>
140
141 <div class="sm-status-email-address">
142 <label for="status_email_address">
143 <input name="sm[status_email_address]" type="text" id="status_status_email_addressemail" class="regular-text ltr" value="<?php echo $sm->status_email_address; ?>">
144 </label>
145
146 <p class="description">
147 <?php _e('You can specify several emails, separated by comma.', ud_get_stateless_media()->domain); ?>
148 </p>
149 </div>
150
151 </fieldset>
152 </td>
153 </tr>
154