Changeset 2684505
- Timestamp:
- 02/24/2022 04:29:15 PM (4 years ago)
- Location:
- cloudimage/trunk/admin
- Files:
-
- 4 edited
-
class-cloudimage-admin.php (modified) (2 diffs)
-
css/cloudimage-admin.css (modified) (1 diff)
-
partials/cloudimage-admin-advanced-display.php (modified) (19 diffs)
-
partials/cloudimage-admin-general-display.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cloudimage/trunk/admin/class-cloudimage-admin.php
r2409030 r2684505 211 211 } 212 212 213 $switches = ['use_js_powered_mode', 'use_for_logged_in_users' ];213 $switches = ['use_js_powered_mode', 'use_for_logged_in_users','removes_v7']; 214 214 } else { 215 215 $switches = [ … … 224 224 'detect_image_node_css', 225 225 'process_only_width', 226 'disable_settimeout_checks' 226 'disable_settimeout_checks', 227 'cdnize_static_files', 228 227 229 ]; 228 230 -
cloudimage/trunk/admin/css/cloudimage-admin.css
r2409030 r2684505 173 173 .cloudimg-box .a_logo img { 174 174 max-width: 100%; 175 } 176 .a_logo { 177 margin-right: 10%; 175 178 } 176 179 -
cloudimage/trunk/admin/partials/cloudimage-admin-advanced-display.php
r2410866 r2684505 32 32 $disable_image_downsize_filter = isset($options['cloudimage_disable_image_downsize_filter']) 33 33 ? $options['cloudimage_disable_image_downsize_filter'] : 0; // 0 = enabling, 1 = disabling 34 35 36 34 37 $content_filter_method = isset($options['cloudimage_content_filter_method']) 35 38 ? $options['cloudimage_content_filter_method'] : 0; // 0 = ob_buffer, 1 = the_content … … 50 53 $disable_settimeout_checks = isset($options['cloudimage_disable_settimeout_checks']) 51 54 ? $options['cloudimage_disable_settimeout_checks'] : 0; // 0 = don't use, 1 = use 55 $CDNize_static_files = isset($options['cloudimage_cdnize_static_files']) 56 ? $options['cloudimage_cdnize_static_files'] : 0; // 0 = don't use, 1 = use 52 57 53 58 $both_mode_switches = [ 59 54 60 [ 55 61 'id' => 'disable_image_downsize_filter', … … 61 67 62 68 $backend_fields = [ 69 70 63 71 [ 64 72 'id' => 'srcset_widths', 65 73 'label' => 'Srcset widths (px)', 66 74 'tooltip' => 'The widths in pixels that would be generated for srcset tag if srcset adding option is enabled.', 67 'description' => ' Widths are separated by comma (,)',75 'description' => 'Separated by comma (,)', 68 76 'placeholder' => 'default: 320,576,940,1080', 69 77 'value' => $srcset_widths … … 88 96 89 97 $backend_switches = [ 98 90 99 [ 91 100 'id' => 'enable_srcset', … … 101 110 'label' => 'Skip classes', 102 111 'tooltip' => 'HTML tags with the specified classes would be skipped', 103 'description' => ' Classes are separated by comma (,)',112 'description' => 'Separated by comma (,)', 104 113 'placeholder' => 'example: class,other_class,example-class', 105 114 'value' => $skip_classes … … 109 118 'label' => 'Skip files', 110 119 'tooltip' => 'Files with these extensions would be skipped', 111 'description' => ' Files extensions are without dot (.) and separated by comma (,)',120 'description' => 'Without dot (.) and separated by comma (,)', 112 121 'placeholder' => 'example: ico,jpg,png', 113 122 'value' => $skip_files … … 119 128 'id' => 'content_filter_method', 120 129 'label' => 'Use WordPress filter method', 121 'tooltip' => 'The way of filtering page\'s content. OFF for using \'ob_buffer\' PHP function, ON for using \'the_content\' filter from word press.',130 'tooltip' => 'The way of filtering page\'s content. OFF for using \'ob_buffer\' PHP function, ON for using \'the_content\' filter from wordPress.', 122 131 'value' => $content_filter_method 123 132 ], … … 128 137 'value' => $javascript_libraries_host 129 138 ], 139 140 130 141 [ 131 142 'id' => 'ignore_node_img_size', … … 192 203 <tr> 193 204 <th scope="row" class="titledesc"> 194 <label for="<?php echo $this->plugin_name . '-' . $field['id']; ?>">205 <label for="<?php echo esc_attr($this->plugin_name . '-' . $field['id']); ?>"> 195 206 <?php esc_attr_e($field['label'], 'cloudimage'); ?> 196 207 <div class="tooltip">? … … 200 211 </th> 201 212 <td class="forminp forminp-text"> 202 <input type="text" id="<?php echo $this->plugin_name . '-' . $field['id']; ?>"203 placeholder="<?php echo $field['placeholder']; ?>"204 name="<?php echo $this->plugin_name . '[' . $field['id'] . ']'; ?>"213 <input type="text" id="<?php echo esc_attr($this->plugin_name . '-' . $field['id']); ?>" 214 placeholder="<?php echo esc_attr($field['placeholder']); ?>" 215 name="<?php echo esc_attr($this->plugin_name . '[' . $field['id'] . ']'); ?>" 205 216 class="widefat" 206 value="<?php if (!empty($field['value'])) echo $field['value']; ?>">217 value="<?php if (!empty($field['value'])) echo esc_textarea($field['value']); ?>"> 207 218 <div class="cloudimage__description"> 208 219 <?php esc_attr_e($field['description'], 'cloudimage'); ?> … … 214 225 <tr> 215 226 <th scope="row" class="titledesc"> 216 <label for="<?php echo $this->plugin_name . '-' . $switch['id']; ?>">227 <label for="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>"> 217 228 <?php esc_attr_e($switch['label'], 'cloudimage'); ?> 218 229 <div class="tooltip">? … … 225 236 <label class="switch"> 226 237 <input type="checkbox" 227 id="<?php echo $this->plugin_name . '-' . $switch['id']; ?>"228 name="<?php echo $this->plugin_name . '[' . $switch['id'] . ']'; ?>" <?php checked($switch['value'], 1); ?> >238 id="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>" 239 name="<?php echo esc_attr($this->plugin_name . '[' . $switch['id'] . ']'); ?>" <?php checked($switch['value'], 1); ?> > 229 240 <span class="slider round"></span> 230 241 </label> … … 246 257 <tr> 247 258 <th scope="row" class="titledesc"> 248 <label for="<?php echo $this->plugin_name . '-' . $switch['id']; ?>">259 <label for="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>"> 249 260 <?php esc_attr_e($switch['label'], 'cloudimage'); ?> 250 261 <div class="tooltip">? … … 257 268 <label class="switch"> 258 269 <input type="checkbox" 259 id="<?php echo $this->plugin_name . '-' . $switch['id']; ?>"260 name="<?php echo $this->plugin_name . '[' . $switch['id'] . ']'; ?>" <?php checked($switch['value'], 1); ?> >270 id="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>" 271 name="<?php echo esc_attr($this->plugin_name . '[' . $switch['id'] . ']'); ?>" <?php checked($switch['value'], 1); ?> > 261 272 <span class="slider round"></span> 262 273 </label> … … 268 279 <tr> 269 280 <th scope="row" class="titledesc"> 270 <label for="<?php echo $this->plugin_name . '-' . $field['id']; ?>">281 <label for="<?php echo esc_attr($this->plugin_name . '-' . $field['id']); ?>"> 271 282 <?php esc_attr_e($field['label'], 'cloudimage'); ?> 272 283 <div class="tooltip">? … … 276 287 </th> 277 288 <td class="forminp forminp-text"> 278 <input type="text" id="<?php echo $this->plugin_name . '-' . $field['id']; ?>"279 placeholder="<?php echo $field['placeholder']; ?>"280 name="<?php echo $this->plugin_name . '[' . $field['id'] . ']'; ?>"289 <input type="text" id="<?php echo esc_attr($this->plugin_name . '-' . $field['id']); ?>" 290 placeholder="<?php echo esc_attr($field['placeholder']); ?>" 291 name="<?php echo esc_attr($this->plugin_name . '[' . $field['id'] . ']'); ?>" 281 292 class="widefat" 282 value="<?php if (!empty($field['value'])) echo $field['value']; ?>">293 value="<?php if (!empty($field['value'])) echo esc_textarea($field['value']); ?>"> 283 294 <div class="cloudimage__description"> 284 295 <?php esc_attr_e($field['description'], 'cloudimage'); ?> … … 300 311 <tr> 301 312 <th scope="row" class="titledesc"> 302 <label for="<?php echo $this->plugin_name . '-' . $switch['id']; ?>">313 <label for="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>"> 303 314 <?php esc_attr_e($switch['label'], 'cloudimage'); ?> 304 315 <div class="tooltip">? … … 311 322 <label class="switch"> 312 323 <input type="checkbox" 313 id="<?php echo $this->plugin_name . '-' . $switch['id']; ?>"314 name="<?php echo $this->plugin_name . '[' . $switch['id'] . ']'; ?>" <?php checked($switch['value'], 1); ?> >324 id="<?php echo esc_attr($this->plugin_name . '-' . $switch['id']); ?>" 325 name="<?php echo esc_attr($this->plugin_name . '[' . $switch['id'] . ']'); ?>" <?php checked($switch['value'], 1); ?> > 315 326 <span class="slider round"></span> 316 327 </label> … … 337 348 <div class="cloudimg-box"> 338 349 <h4> 339 <?php _e(' Cloudimage advanced options:', 'cloudimage'); ?>350 <?php _e('To your Cloudimage administration panel for all configuration options:', 'cloudimage'); ?> 340 351 <a href="https://admin.cloudimage.io" class="cloudimage-link" target="_blank"> 341 352 <?php _e('Cloudimage Admin ', 'cloudimage'); ?> -
cloudimage/trunk/admin/partials/cloudimage-admin-general-display.php
r2409035 r2684505 19 19 20 20 $domain = $options['cloudimage_domain']; 21 $removes_v7 = isset($options['cloudimage_removes_v7']) 22 ? $options['cloudimage_removes_v7'] : 0; // 0 = enabling, 1 = disabling 21 23 $use_js_powered_mode = isset($options['cloudimage_use_js_powered_mode']) 22 24 ? $options['cloudimage_use_js_powered_mode'] : 0; 23 25 $use_for_logged_in_users = isset($options['cloudimage_use_for_logged_in_users']) 24 26 ? $options['cloudimage_use_for_logged_in_users'] : 0; 27 25 28 26 29 ?> … … 41 44 <div class="a_logo"> 42 45 <a target="_blank" href="http://cloudimg.io/"> 43 <img src=" <?php echo plugin_dir_url(__FILE__); ?>../images/logo_cloudimage.png"46 <img src=" <?php echo plugin_dir_url(__FILE__); ?>../images/logo_new_cloudimage.png" 44 47 alt="cloudimage logo"> 45 48 </a> … … 88 91 <tr> 89 92 <th scope="row" class="titledesc"> 90 <label for="<?php echo $this->plugin_name; ?>-domain" class="cloudimage-domain">93 <label for="<?php echo esc_attr($this->plugin_name); ?>-domain" class="cloudimage-domain"> 91 94 <?php esc_attr_e('Cloudimage token or custom domain: ', 'cloudimage'); ?> 92 95 <div class="tooltip">? … … 96 99 </th> 97 100 <td class="forminp forminp-text"> 98 <input type="text" id="<?php echo $this->plugin_name; ?>-domain" placeholder="efuevfz"99 name="<?php echo $this->plugin_name; ?>[domain]"101 <input type="text" id="<?php echo esc_attr($this->plugin_name); ?>-domain" placeholder="my-token" 102 name="<?php echo esc_attr($this->plugin_name); ?>[domain]" 100 103 class="widefat" 101 value="<?php if (!empty($domain)) echo $domain; ?>">104 value="<?php if (!empty($domain)) echo esc_textarea($domain); ?>"> 102 105 <div class="cloudimage__description"> 103 106 <?php esc_attr_e('Enter token: ', 'cloudimage') ?> … … 106 109 </td> 107 110 </tr> 108 111 109 112 <tr> 110 113 <td colspan="2"> … … 123 126 <tr id="js-powered-section"> 124 127 <th scope="row" class="titledesc"> 125 <label for="<?php echo $this->plugin_name; ?>-use_js_powered_mode">128 <label for="<?php echo esc_attr($this->plugin_name); ?>-use_js_powered_mode"> 126 129 <?php esc_attr_e('Javascript mode', 'cloudimage'); ?> 127 130 <div class="tooltip">? … … 133 136 <td class="forminp forminp-text"> 134 137 <label class="switch"> 135 <input type="checkbox" id="<?php echo $this->plugin_name; ?>-use_js_powered_mode" 136 name="<?php echo $this->plugin_name; ?>[use_js_powered_mode]" <?php checked($use_js_powered_mode, 1); ?> > 138 <input type="checkbox" id="<?php echo esc_attr($this->plugin_name); ?>-use_js_powered_mode" 139 name="<?php echo esc_attr($this->plugin_name); ?>[use_js_powered_mode]" <?php checked($use_js_powered_mode, 1); ?> > 140 <span class="slider round"></span> 141 </label> 142 143 </td> 144 </tr> 145 <!-- Remove v7 --> 146 <tr id="remove-v7-section"> 147 <th scope="row" class="titledesc"> 148 <label for="<?php echo esc_attr($this->plugin_name); ?>-removes_v7"> 149 <?php esc_attr_e('Remove v7', 'cloudimage'); ?> 150 <div class="tooltip">? 151 <span class="tooltiptext"><?php esc_attr_e('Removes the "/v7" part in URL format. Activate for token created after October 20th 2021', 'cloudimage') ?></span> 152 </div> 153 </label> 154 </th> 155 156 <td class="forminp forminp-text"> 157 <label class="switch"> 158 <input type="checkbox" id="<?php echo esc_attr($this->plugin_name); ?>-removes_v7" 159 name="<?php echo esc_attr($this->plugin_name); ?>[removes_v7]" <?php checked($removes_v7, 1); ?> > 137 160 <span class="slider round"></span> 138 161 </label> … … 144 167 <tr id="use-for-logged-in-users"> 145 168 <th scope="row" class="titledesc"> 146 <label for="<?php echo $this->plugin_name; ?>-use_for_logged_in_users">169 <label for="<?php echo esc_attr($this->plugin_name); ?>-use_for_logged_in_users"> 147 170 <?php esc_attr_e('Use when logged in', 'cloudimage'); ?> 148 171 <div class="tooltip">? … … 154 177 <td class="forminp forminp-text"> 155 178 <label class="switch"> 156 <input type="checkbox" id="<?php echo $this->plugin_name; ?>-use_for_logged_in_users"157 name="<?php echo $this->plugin_name; ?>[use_for_logged_in_users]" <?php checked($use_for_logged_in_users, 1); ?> >179 <input type="checkbox" id="<?php echo esc_attr($this->plugin_name); ?>-use_for_logged_in_users" 180 name="<?php echo esc_attr($this->plugin_name); ?>[use_for_logged_in_users]" <?php checked($use_for_logged_in_users, 1); ?> > 158 181 <span class="slider round"></span> 159 182 </label> … … 173 196 <a href="?page=cloudimage-advanced" class="cloudimage-link"> 174 197 <strong> 175 <?php _e(' Plugin advanced settings', 'cloudimage'); ?>198 <?php _e('Open Advanced settings', 'cloudimage'); ?> 176 199 </strong> 177 200 </a> … … 191 214 <div class="cloudimg-box"> 192 215 <h4> 193 <?php _e(' Cloudimage advanced options:', 'cloudimage'); ?>216 <?php _e('To your Cloudimage administration panel for all configuration options:', 'cloudimage'); ?> 194 217 <a href="https://www.cloudimage.io/en/login" class="cloudimage-link" target="_blank"> 195 218 <?php _e('Cloudimage Admin ', 'cloudimage'); ?>
Note: See TracChangeset
for help on using the changeset viewer.