first
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Accessibility settings meta box.
|
||||
*
|
||||
* @since 3.0
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var bool $accessible_colors High contrast mode status.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<p>
|
||||
<?php esc_html_e( 'Enable support for any accessibility enhancements available in the plugin interface.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'wp_smush_render_setting_row', 'accessible_colors', $accessible_colors ); ?>
|
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* Data settings meta box.
|
||||
*
|
||||
* @since 3.0
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var bool $keep_data Keep data during uninstall.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<p>
|
||||
<?php esc_html_e( 'Control what to do with your settings and data. Settings are each module’s configuration options. Data includes the compression savings, statistics and other pieces of information stored over time.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<div class="sui-box-settings-col-1">
|
||||
<span class="sui-settings-label"><?php esc_html_e( 'Data', 'wp-smushit' ); ?></span>
|
||||
<span class="sui-description">
|
||||
<?php esc_html_e( 'Choose how you want us to handle your plugin data.', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="sui-box-settings-col-2">
|
||||
<strong><?php esc_html_e( 'Uninstallation', 'wp-smushit' ); ?></strong>
|
||||
<span class="sui-description">
|
||||
<?php esc_html_e( 'When you uninstall the plugin, what do you want to do with your settings? You can save them for next time, or wipe them back to factory settings.', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
|
||||
<div class="sui-side-tabs">
|
||||
<div class="sui-tabs-menu">
|
||||
<label for="keep_data-true" class="sui-tab-item <?php echo $keep_data ? 'active' : ''; ?>">
|
||||
<input type="radio" name="keep_data" value="1" id="keep_data-true" <?php checked( $keep_data ); ?>>
|
||||
<?php esc_html_e( 'Keep', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
|
||||
<label for="keep_data-false" class="sui-tab-item <?php echo $keep_data ? '' : 'active'; ?>">
|
||||
<input type="radio" name="keep_data" value="0" id="keep_data-false" <?php checked( ! $keep_data ); ?>>
|
||||
<?php esc_html_e( 'Delete', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<strong><?php esc_html_e( 'Reset Factory Settings', 'wp-smushit' ); ?></strong>
|
||||
<span class="sui-description">
|
||||
<?php esc_html_e( 'Need to revert back to the default settings? This button will instantly reset your settings to the defaults.', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
|
||||
<button class="sui-button sui-button-ghost" data-modal-open="reset-settings-dialog" data-modal-open-focus="reset-setting-confirm" data-modal-mask="true">
|
||||
<i class="sui-icon-undo" aria-hidden="true"></i>
|
||||
<?php esc_html_e( 'Reset Settings', 'wp-smushit' ); ?>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<div class="sui-box-settings-col-1">
|
||||
<span class="sui-settings-label"><?php esc_html_e( 'API Status', 'wp-smushit' ); ?></span>
|
||||
<span class="sui-description">
|
||||
<?php esc_html_e( "If you're having issues with enabling pro features you can force the API to update your membership status here.", 'wp-smushit' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="sui-box-settings-col-2">
|
||||
<button type="button" class="sui-button sui-button-ghost" id="update-api-status">
|
||||
<span class="sui-loading-text">
|
||||
<i class="sui-icon-undo" aria-hidden="true"></i>
|
||||
<?php esc_html_e( 'Update API status', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
<i class="sui-icon-loader sui-loading" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,61 @@
|
||||
<?php
|
||||
/**
|
||||
* General settings meta box.
|
||||
*
|
||||
* @since 3.0
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var bool $detection Detection settings.
|
||||
* @var string $site_language Site language.
|
||||
* @var bool $tracking Tracking status.
|
||||
* @var string $translation_link Link to plugin translation page.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<p>
|
||||
<?php esc_html_e( 'Configure general settings for this plugin.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'wp_smush_render_setting_row', 'detection', $detection ); ?>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<div class="sui-box-settings-col-1">
|
||||
<span class="sui-settings-label "><?php esc_html_e( 'Translations', 'wp-smushit' ); ?></span>
|
||||
<span class="sui-description">
|
||||
<?php
|
||||
printf( /* translators: %1$s: opening a tag, %2$s: closing a tag */
|
||||
esc_html__( 'By default, Smush will use the language you’d set in your %1$sWordPress Admin Settings%2$s if a matching translation is available.', 'wp-smushit' ),
|
||||
'<a href="' . esc_html( admin_url( 'options-general.php' ) ) . '">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
<div class="sui-box-settings-col-2">
|
||||
<div class="sui-form-field">
|
||||
<label for="language-input" class="sui-label">
|
||||
<?php esc_html_e( 'Active Translation', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
<input type="text" id="language-input" class="sui-form-control" disabled="disabled" placeholder="<?php echo esc_attr( $site_language ); ?>">
|
||||
<span class="sui-description">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %1$s: opening a tag, %2$s: closing a tag */
|
||||
esc_html__( 'Not using your language, or have improvements? Help us improve translations by providing your own improvements %1$shere%2$s.', 'wp-smushit' ),
|
||||
'<a href="' . esc_html( $translation_link ) . '" target="_blank">',
|
||||
'</a>'
|
||||
);
|
||||
?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php do_action( 'wp_smush_render_setting_row', 'usage', $tracking ); ?>
|
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* Permissions settings meta box.
|
||||
*
|
||||
* @since 3.0
|
||||
* @package WP_Smush
|
||||
*
|
||||
* @var mixed $networkwide Network wide settings.
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
die;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="sui-box-settings-row">
|
||||
<div class="sui-box-settings-col-1">
|
||||
<span class="sui-settings-label">
|
||||
<?php esc_html_e( 'Subsite Controls', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
<span class="sui-description">
|
||||
<?php esc_html_e( 'By default, subsites will inherit your network settings. Choose which modules you want to allow subsite admins to override.', 'wp-smushit' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="sui-box-settings-col-2">
|
||||
<div class="sui-side-tabs sui-tabs">
|
||||
<div data-tabs>
|
||||
<?php $selected = is_array( $networkwide ) ? 'custom' : $networkwide; ?>
|
||||
<label for="access-none" class="sui-tab-item <?php echo ! $networkwide ? 'active' : ''; ?>">
|
||||
<input type="radio" name="wp-smush-subsite-access" value="0" id="access-none" <?php checked( $selected, false ); ?>>
|
||||
<?php esc_html_e( 'None', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
<label for="access-all" class="sui-tab-item <?php echo '1' === $networkwide ? 'active' : ''; ?>">
|
||||
<input type="radio" name="wp-smush-subsite-access" value="1" id="access-all" <?php checked( $selected, '1' ); ?>>
|
||||
<?php esc_html_e( 'All', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
<label for="access-custom" class="sui-tab-item <?php echo is_array( $networkwide ) ? 'active' : ''; ?>">
|
||||
<input type="radio" name="wp-smush-subsite-access" value="custom" id="access-custom" <?php checked( $selected, 'custom' ); ?>>
|
||||
<?php esc_html_e( 'Custom', 'wp-smushit' ); ?>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div data-panes>
|
||||
<div class="sui-notice sui-notice-info <?php echo ! $networkwide ? 'active' : ''; ?>">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
|
||||
<p><?php esc_html_e( "Subsite admins can't override any module settings and will always inherit your network settings.", 'wp-smushit' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sui-notice sui-notice-info <?php echo '1' === $networkwide ? 'active' : ''; ?>">
|
||||
<div class="sui-notice-content">
|
||||
<div class="sui-notice-message">
|
||||
<i class="sui-notice-icon sui-icon-info sui-md" aria-hidden="true"></i>
|
||||
<p><?php esc_html_e( 'Subsite admins can override all module settings.', 'wp-smushit' ); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sui-tab-boxed <?php echo is_array( $networkwide ) ? 'active' : ''; ?>">
|
||||
<p class="sui-description">
|
||||
<?php esc_html_e( 'Choose which modules settings subsite admins have access to.', 'wp-smushit' ); ?>
|
||||
</p>
|
||||
|
||||
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
|
||||
<input type="checkbox" id="module-bulk" name="wp-smush-access[]" value="bulk" <?php checked( ! is_array( $networkwide ) || in_array( 'bulk', $networkwide, true ) ); ?>>
|
||||
<span aria-hidden="true"> </span>
|
||||
<span><?php esc_html_e( 'Bulk Smush', 'wp-smushit' ); ?></span>
|
||||
</label>
|
||||
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
|
||||
<input type="checkbox" id="module-integrations" name="wp-smush-access[]" value="integrations" <?php checked( ! is_array( $networkwide ) || in_array( 'integrations', $networkwide, true ) ); ?>>
|
||||
<span aria-hidden="true"> </span>
|
||||
<span><?php esc_html_e( 'Integrations', 'wp-smushit' ); ?></span>
|
||||
</label>
|
||||
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
|
||||
<input type="checkbox" id="module-lazy_load" name="wp-smush-access[]" value="lazy_load" <?php checked( ! is_array( $networkwide ) || in_array( 'lazy_load', $networkwide, true ) ); ?>>
|
||||
<span aria-hidden="true"> </span>
|
||||
<span><?php esc_html_e( 'Lazy Load', 'wp-smushit' ); ?></span>
|
||||
</label>
|
||||
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
|
||||
<input type="checkbox" id="module-cdn" name="wp-smush-access[]" value="cdn" <?php checked( ! is_array( $networkwide ) || in_array( 'cdn', $networkwide, true ) ); ?>>
|
||||
<span aria-hidden="true"> </span>
|
||||
<span><?php esc_html_e( 'CDN', 'wp-smushit' ); ?></span>
|
||||
</label>
|
||||
<?php // Don't display if Dashboard's whitelabel is hiding documentation. ?>
|
||||
<?php if ( ! apply_filters( 'wpmudev_branding_hide_doc_link', false ) ) : ?>
|
||||
<label class="sui-checkbox sui-checkbox-stacked sui-checkbox-sm">
|
||||
<input type="checkbox" id="module-tutorials" name="wp-smush-access[]" value="tutorials" <?php checked( ! is_array( $networkwide ) || in_array( 'tutorials', $networkwide, true ) ); ?>>
|
||||
<span aria-hidden="true"> </span>
|
||||
<span><?php esc_html_e( 'Tutorials', 'wp-smushit' ); ?></span>
|
||||
</label>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user