@@ -18,37 +18,37 @@ discard block |
||
18 | 18 | <p><strong>Need help getting started?</strong> It's easy! Check out our <a href="https://github.com/imgix-wordpress/imgix-wordpress#getting-started" target="_blank">instructions.</a></p> |
19 | 19 | |
20 | 20 | <form method="post" action="options.php"> |
21 | - <?php settings_fields( 'imgix_settings_group' ); ?> |
|
21 | + <?php settings_fields('imgix_settings_group'); ?> |
|
22 | 22 | |
23 | 23 | <table class="form-table"> |
24 | 24 | |
25 | 25 | <tbody> |
26 | 26 | |
27 | 27 | <tr> |
28 | - <th><label class="description" for="imgix_settings[cdn_link]"><?php esc_html_e( 'imgix Source', 'imgix_domain' ); ?></th> |
|
29 | - <td><input id="imgix_settings[cdn_link]" type="url" name="imgix_settings[cdn_link]" placeholder="https://yourcompany.imgix.net" value="<?php echo isset( $imgix_options['cdn_link'] ) ? esc_url( $imgix_options['cdn_link'] ) : ''; ?>" class="regular-text code" /></td> |
|
28 | + <th><label class="description" for="imgix_settings[cdn_link]"><?php esc_html_e('imgix Source', 'imgix_domain'); ?></th> |
|
29 | + <td><input id="imgix_settings[cdn_link]" type="url" name="imgix_settings[cdn_link]" placeholder="https://yourcompany.imgix.net" value="<?php echo isset($imgix_options['cdn_link']) ? esc_url($imgix_options['cdn_link']) : ''; ?>" class="regular-text code" /></td> |
|
30 | 30 | </tr> |
31 | 31 | |
32 | 32 | <tr> |
33 | - <th><label class="description" for="imgix_settings[auto_format]"><?php esc_html_e( 'Auto Format Images', 'auto_format' ); ?></label></th> |
|
34 | - <td><input id="imgix_settings[auto_format]" type="checkbox" name="imgix_settings[auto_format]" value="1" <?php echo isset( $imgix_options['auto_format'] ) && '1' === $imgix_options['auto_format'] ? 'checked="checked"' : ''; ?> /></td> |
|
33 | + <th><label class="description" for="imgix_settings[auto_format]"><?php esc_html_e('Auto Format Images', 'auto_format'); ?></label></th> |
|
34 | + <td><input id="imgix_settings[auto_format]" type="checkbox" name="imgix_settings[auto_format]" value="1" <?php echo isset($imgix_options['auto_format']) && '1' === $imgix_options['auto_format'] ? 'checked="checked"' : ''; ?> /></td> |
|
35 | 35 | </tr> |
36 | 36 | |
37 | 37 | <tr> |
38 | - <th><label class="description" for="imgix_settings[auto_enhance]"><?php esc_html_e( 'Auto Enhance Images', 'auto_enhance' ); ?></label></th> |
|
39 | - <td><input id="imgix_settings[auto_enhance]" type="checkbox" name="imgix_settings[auto_enhance]" value="1" <?php echo isset( $imgix_options['auto_enhance'] ) && '1' === $imgix_options['auto_enhance'] ? 'checked="checked"' : ''; ?> /></td> |
|
38 | + <th><label class="description" for="imgix_settings[auto_enhance]"><?php esc_html_e('Auto Enhance Images', 'auto_enhance'); ?></label></th> |
|
39 | + <td><input id="imgix_settings[auto_enhance]" type="checkbox" name="imgix_settings[auto_enhance]" value="1" <?php echo isset($imgix_options['auto_enhance']) && '1' === $imgix_options['auto_enhance'] ? 'checked="checked"' : ''; ?> /></td> |
|
40 | 40 | </tr> |
41 | 41 | |
42 | 42 | <tr> |
43 | - <th><label class="description" for="imgix_settings[add_dpi2_srcset]"><?php esc_html_e( 'Automatically add retina images using srcset', 'add_dpi2_srcset' ); ?></label></th> |
|
44 | - <td><input id="imgix_settings[add_dpi2_srcset]" type="checkbox" name="imgix_settings[add_dpi2_srcset]" value="1" <?php echo isset( $imgix_options['add_dpi2_srcset'] ) && '1' === $imgix_options['add_dpi2_srcset'] ? 'checked="checked"' : ''; ?> /></td> |
|
43 | + <th><label class="description" for="imgix_settings[add_dpi2_srcset]"><?php esc_html_e('Automatically add retina images using srcset', 'add_dpi2_srcset'); ?></label></th> |
|
44 | + <td><input id="imgix_settings[add_dpi2_srcset]" type="checkbox" name="imgix_settings[add_dpi2_srcset]" value="1" <?php echo isset($imgix_options['add_dpi2_srcset']) && '1' === $imgix_options['add_dpi2_srcset'] ? 'checked="checked"' : ''; ?> /></td> |
|
45 | 45 | </tr> |
46 | 46 | |
47 | 47 | </tbody> |
48 | 48 | </table> |
49 | 49 | |
50 | 50 | <p class="submit"> |
51 | - <input type="submit" class="button-primary" value="<?php esc_html_e( 'Save Options', 'imgix_domain' ); ?>" /> |
|
51 | + <input type="submit" class="button-primary" value="<?php esc_html_e('Save Options', 'imgix_domain'); ?>" /> |
|
52 | 52 | </p> |
53 | 53 | </form> |
54 | 54 | |
@@ -63,15 +63,15 @@ discard block |
||
63 | 63 | * Adds link to options page in Admin > Settings menu. |
64 | 64 | */ |
65 | 65 | function imgix_add_options_link() { |
66 | - add_options_page( 'imgix', 'imgix', 'manage_options', 'imgix-options', 'imgix_options_page' ); |
|
66 | + add_options_page('imgix', 'imgix', 'manage_options', 'imgix-options', 'imgix_options_page'); |
|
67 | 67 | } |
68 | -add_action( 'admin_menu', 'imgix_add_options_link' ); |
|
68 | +add_action('admin_menu', 'imgix_add_options_link'); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Creates our settings in the options table. |
72 | 72 | */ |
73 | 73 | function imgix_register_settings() { |
74 | - register_setting( 'imgix_settings_group', 'imgix_settings' ); |
|
74 | + register_setting('imgix_settings_group', 'imgix_settings'); |
|
75 | 75 | } |
76 | 76 | |
77 | -add_action( 'admin_init', 'imgix_register_settings' ); |
|
77 | +add_action('admin_init', 'imgix_register_settings'); |