network-settings.php
| 1 | <?php extract( $data ); ?> |
| 2 | |
| 3 | <?php if ( isset( $_GET['updated'] ) && 'true' == $_GET['updated'] ) : ?> |
| 4 | <div class="updated"><?php esc_html_e( 'Jetpack Network Settings Updated!', 'jetpack' ); ?></div> |
| 5 | <?php endif; ?> |
| 6 | |
| 7 | <?php if ( isset( $_GET['error'] ) && 'jetpack_protect_whitelist' == $_GET['error'] ) : ?> |
| 8 | <div class="error"><?php esc_html_e( 'One of your IP addresses was not valid.', 'jetpack' ); ?></div> |
| 9 | <?php endif; ?> |
| 10 | |
| 11 | <div class="wrap"> |
| 12 | <h2><?php _e( 'Network Settings', 'jetpack' ); ?></h2> |
| 13 | <form action="edit.php?action=jetpack-network-settings" method="POST"> |
| 14 | <h3><?php _ex( 'Global', 'Affects all sites in a Multisite network.', 'jetpack' ); ?></h3> |
| 15 | <p><?php _e( 'These settings affect all sites on the network.', 'jetpack' ); ?></p> |
| 16 | <?php wp_nonce_field( 'jetpack-network-settings' ); ?> |
| 17 | <table class="form-table"> |
| 18 | <?php /* |
| 19 | <tr valign="top"> |
| 20 | <th scope="row"><label for="auto-connect">Auto-Connect New Sites</label></th> |
| 21 | <td> |
| 22 | <input type="checkbox" name="auto-connect" id="auto-connect" value="1" <?php checked($options['auto-connect']); ?> /> |
| 23 | <label for="auto-connect">Automagically connect all new sites in the network.</label> |
| 24 | </td> |
| 25 | </tr> |
| 26 | /**/ ?> |
| 27 | <tr valign="top"> |
| 28 | <th scope="row"><label for="sub-site-override"><?php _e( 'Sub-site override', 'jetpack' ); ?></label></th> |
| 29 | <td> |
| 30 | <input type="checkbox" name="sub-site-connection-override" id="sub-site-override" value="1" <?php checked($options['sub-site-connection-override']); ?> /> |
| 31 | <label for="sub-site-override"><?php _e( 'Allow individual site administrators to manage their own connections (connect and disconnect) to <a href="//wordpress.com">WordPress.com</a>', 'jetpack' ); ?></label> |
| 32 | </td> |
| 33 | </tr> |
| 34 | |
| 35 | <tr valign="top"> |
| 36 | <th scope="row"><label for="sub-site-override"><?php _e( 'Protect whitelist', 'jetpack' ); ?></label></th> |
| 37 | <td> |
| 38 | <p><strong><?php printf( __( 'Your current IP: %s', 'jetpack' ), jetpack_protect_get_ip() ); ?></strong></p> |
| 39 | <textarea name="global-whitelist" style="width: 100%;" rows="8"><?php echo implode( PHP_EOL, $jetpack_protect_whitelist['global'] ); ?></textarea> <br /> |
| 40 | <label for="global-whitelist"><?php _e('IPv4 and IPv6 are acceptable. Enter multiple IPs on separate lines. <br />To specify a range, enter the low value and high value separated by a dash. Example: 12.12.12.1-12.12.12.100', 'jetpack' ); ?></label> |
| 41 | </td> |
| 42 | </tr> |
| 43 | <?php /* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet. |
| 44 | <tr> |
| 45 | <th scope="row"><label for="manage_auto_activated_modules">Manage modules</label></th> |
| 46 | <td> |
| 47 | <input type="checkbox" name="manage_auto_activated_modules" id="manage_auto_activated_modules" onclick="jQuery('#jpms_settings_modules').toggle();" value="1" <?php checked( $options['manage_auto_activated_modules'] ); ?>/> |
| 48 | <label for="manage_auto_activated_modules">Control which modules are auto-activated</label> |
| 49 | </td> |
| 50 | </tr> |
| 51 | /**/ ?> |
| 52 | </table> |
| 53 | |
| 54 | <?php /* Remove the toggles for 2.9, re-evaluate how they're done and added for a 3.0 release. They don't feel quite right yet. |
| 55 | <?php |
| 56 | $display_modules = ( 1 == $this->get_option( 'manage_auto_activated_modules' ) )? 'block': 'none'; |
| 57 | ?> |
| 58 | <div id="jpms_settings_modules" style="display: <?php echo $display_modules; ?>"> |
| 59 | <h3><?php _e( 'Modules', 'jetpack' ); ?></h3> |
| 60 | <p><?php _e( 'Modules to be automatically activated when new sites are created.', 'jetpack' ); ?></p> |
| 61 | <table> |
| 62 | <thead> |
| 63 | <!-- |
| 64 | <tr> |
| 65 | <td><input type="checkbox"></td> |
| 66 | <td>Only show checked modules on subsites?</td> |
| 67 | </tr> |
| 68 | --> |
| 69 | </thead> |
| 70 | <tbody> |
| 71 | |
| 72 | <?php foreach( $modules AS $module ) { ?> |
| 73 | <tr> |
| 74 | <td><input type="checkbox" name="modules[]" value="<?php echo $module['module']; ?>" id="<?php echo $module['module']; ?>" <?php checked( in_array( $module['module'], $options['modules'] ) ); ?>/></td> |
| 75 | <td><label for="<?php echo $module['module']; ?>"><?php echo $module['name']; ?></label></td> |
| 76 | </tr> |
| 77 | |
| 78 | <?php } ?> |
| 79 | </tbody> |
| 80 | </table> |
| 81 | </div> |
| 82 | /**/ ?> |
| 83 | |
| 84 | <?php submit_button(); ?> |
| 85 | |
| 86 | </form> |
| 87 | </div> |
| 88 |