| 1 |
<h2><?php _e("Enable or disable compatibility with other plugins.", ud_get_stateless_media()->domain); ?></h2> |
| 2 |
|
| 3 |
<p><?php printf( |
| 4 |
__("Having an issue with another plugin? <a class='' target='_blank' href='%s' >Submit feedback</a> and let us know your issue!", ud_get_stateless_media()->domain), |
| 5 |
"https://wordpress.org/support/plugin/wp-stateless/" |
| 6 |
); ?></p> |
| 7 |
|
| 8 |
<form method="post" action=""> |
| 9 |
<input type="hidden" name="action" value="stateless_modules"> |
| 10 |
<?php wp_nonce_field('wp-stateless-modules', '_smnonce'); ?> |
| 11 |
|
| 12 |
<table class="form-table"> |
| 13 |
|
| 14 |
<?php foreach ($modules as $module) : ?> |
| 15 |
<tr> |
| 16 |
<th><label for="<?php echo $module->id; ?>"><?php echo $module->title; ?></label></th> |
| 17 |
|
| 18 |
<td> |
| 19 |
<?php |
| 20 |
$name = sprintf('stateless-modules[%s]', $module->id); |
| 21 |
|
| 22 |
$disabled = $module->is_constant || ($module->is_network_override || !$module->is_plugin_active || !$module->is_mode_supported) && !is_network_admin(); |
| 23 |
$disabled = $disabled ? 'disabled="true"' : ''; |
| 24 |
?> |
| 25 |
|
| 26 |
<select name="<?php echo $name; ?>" id="<?php echo $module->id; ?>" value="<?php echo $module->enabled; ?>" <?php echo $disabled; ?>> |
| 27 |
<?php if (is_network_admin()) : ?> |
| 28 |
<option value="" <?php selected( $module->enabled, '' ); ?>><?php _e("Don't override", ud_get_stateless_media()->domain); ?></option> |
| 29 |
<?php endif; ?> |
| 30 |
|
| 31 |
<?php if ( $module->enabled == 'inactive' ) : ?> |
| 32 |
<option value="inactive" <?php selected( $module->enabled, 'inactive' ); ?>><?php _e('Not Available', ud_get_stateless_media()->domain); ?></option> |
| 33 |
<?php endif; ?> |
| 34 |
|
| 35 |
<option value="false" <?php selected( $module->enabled, 'false' ); ?>><?php _e('Disable', ud_get_stateless_media()->domain); ?></option> |
| 36 |
<option value="true" <?php selected( $module->enabled, 'true' ); ?>><?php _e('Enable', ud_get_stateless_media()->domain); ?></option> |
| 37 |
</select> |
| 38 |
|
| 39 |
<p class="description"> |
| 40 |
<?php if ( !$module->is_plugin_active && $module->is_plugin && $module->is_mode_supported ) : ?> |
| 41 |
<strong><?php _e("Please activate the plugin first.", ud_get_stateless_media()->domain); ?></strong> |
| 42 |
<?php endif; ?> |
| 43 |
|
| 44 |
<?php if ( !$module->is_plugin_active && $module->is_theme && $module->is_mode_supported ) : ?> |
| 45 |
<strong><?php _e("Please activate the theme first.", ud_get_stateless_media()->domain); ?></strong> |
| 46 |
<?php endif; ?> |
| 47 |
|
| 48 |
<?php if ( !$module->is_mode_supported ) : ?> |
| 49 |
<strong><?php printf( __("This compatibility does not support %s mode.", ud_get_stateless_media()->domain), $module->mode ); ?></strong> |
| 50 |
<?php endif; ?> |
| 51 |
|
| 52 |
<?php if ( $module->is_constant ) : ?> |
| 53 |
<strong><?php _e("Currently configured via a constant.", ud_get_stateless_media()->domain); ?></strong> |
| 54 |
<?php endif; ?> |
| 55 |
|
| 56 |
<?php if ( $module->is_network_override ) : ?> |
| 57 |
<strong><?php _e("Currently configured via network settings.", ud_get_stateless_media()->domain); ?></strong> |
| 58 |
<?php endif; ?> |
| 59 |
|
| 60 |
<span><?php echo $module->description?></span> |
| 61 |
</p> |
| 62 |
</td> |
| 63 |
</tr> |
| 64 |
<?php endforeach; ?> |
| 65 |
</table> |
| 66 |
|
| 67 |
<?php submit_button(null, 'primary', 'submit', true, array('id' => 'save-compatibility')); ?> |
| 68 |
</form> |
| 69 |
|
| 70 |
|