first
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget">
|
||||
<h3 class="webpcPage__widgetTitle">
|
||||
<?php echo esc_html( __( 'How does the plugin work?', 'webp-converter-for-media' ) ); ?>
|
||||
</h3>
|
||||
<div class="webpcContent">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
__( 'When a browser tries to download an image file, the plugin checks if it supports the AVIF format (if enabled in the plugin settings). If so, the browser will receive the equivalent of the original image in the AVIF format. If it does not support AVIF, but supports the WebP format, the browser will receive the equivalent of the original image in WebP format. In case the browser does not support either WebP or AVIF, the original image is loaded. This means full support for all browsers.', 'webp-converter-for-media' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
__( 'The plugin in default loading mode (via .htaccess) does not change file URLs, so there are no problems with saving the page to the cache and the page generation time does not increase.', 'webp-converter-for-media' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p class="center">
|
||||
<a href="https://url.mattplugins.com/converter-widget-about-button-instruction"
|
||||
target="_blank"
|
||||
class="webpcButton webpcButton--blue"
|
||||
>
|
||||
<?php echo esc_html( __( 'Find out more', 'webp-converter-for-media' ) ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @var string[][] $errors_messages Arrays with array of paragraphs.
|
||||
* @var string[] $errors_codes List of server configuration errors.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ( $errors_messages ) : ?>
|
||||
<div class="webpcPage__widget" id="server-error-notice">
|
||||
<h3 class="webpcPage__widgetTitle webpcPage__widgetTitle--error">
|
||||
<?php echo esc_html( __( 'Server configuration error', 'webp-converter-for-media' ) ); ?>
|
||||
</h3>
|
||||
<div class="webpcContent webpcContent--wide webpcContent--quotes">
|
||||
<?php foreach ( $errors_messages as $error_index => $error_lines ) : ?>
|
||||
<?php if ( $error_index > 0 ) : ?>
|
||||
<p>---</p>
|
||||
<?php endif; ?>
|
||||
<?php foreach ( $error_lines as $error_line ) : ?>
|
||||
<p><?php echo wp_kses_post( $error_line ); ?></p>
|
||||
<?php endforeach; ?>
|
||||
<?php endforeach; ?>
|
||||
<p>---</p>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open strong tag, %2$s: close strong tag, %3$s: errors codes */
|
||||
__( '%1$sError codes:%2$s %3$s', 'webp-converter-for-media' ),
|
||||
'<strong>',
|
||||
'</strong>',
|
||||
implode( ', ', $errors_codes )
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @var mixed[][] $menu_items Tabs on plugin settings page.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcMenu">
|
||||
<div class="webpcMenu__wrapper">
|
||||
<div class="webpcMenu__items">
|
||||
<?php foreach ( $menu_items as $menu_item ) : ?>
|
||||
<?php if ( $menu_item['url'] !== null ) : ?>
|
||||
<div class="webpcMenu__item">
|
||||
<a href="<?php echo esc_attr( $menu_item['url'] ); ?>"
|
||||
class="webpcMenu__itemLink <?php echo ( $menu_item['is_active'] ) ? 'webpcMenu__itemLink--active' : ''; ?>">
|
||||
<?php echo esc_attr( $menu_item['title'] ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed in sidebar on plugin settings page.
|
||||
*
|
||||
* @var mixed[] $form_sidebar_options Settings options in sidebar.
|
||||
* @var string $form_input_name Name of hidden field with form ID.
|
||||
* @var string $form_sidebar_input_value ID of settings form.
|
||||
* @var string $nonce_input_name Name of hidden field with WordPress Nonce value.
|
||||
* @var string $nonce_input_value WordPress Nonce value.
|
||||
* @var bool $token_valid_status Status of PRO version.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget webpcPage__widget--border">
|
||||
<h3 class="webpcPage__widgetTitle webpcPage__widgetTitle--logo">
|
||||
<?php echo esc_html( __( 'PRO version', 'webp-converter-for-media' ) ); ?>
|
||||
</h3>
|
||||
<form method="post" action="" class="webpcContent">
|
||||
<input type="hidden" name="<?php echo esc_attr( $form_input_name ); ?>"
|
||||
value="<?php echo esc_attr( $form_sidebar_input_value ); ?>">
|
||||
<input type="hidden" name="<?php echo esc_attr( $nonce_input_name ); ?>"
|
||||
value="<?php echo esc_attr( $nonce_input_value ); ?>">
|
||||
<?php foreach ( $form_sidebar_options as $index => $option ) : ?>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<ul class="webpcPage__widgetColumns">
|
||||
<li class="webpcPage__widgetColumn">
|
||||
<?php if ( $option['label'] ) : ?>
|
||||
<h4><?php echo esc_html( $option['label'] ); ?></h4>
|
||||
<?php endif; ?>
|
||||
<?php include dirname( __DIR__ ) . '/fields/' . $option['type'] . '.php'; ?>
|
||||
</li>
|
||||
<?php if ( $option['notice_lines'] ) : ?>
|
||||
<li class="webpcPage__widgetColumn">
|
||||
<div class="webpcPage__widgetNotice">
|
||||
<?php foreach ( $option['notice_lines'] as $line ) : ?>
|
||||
<p><?php echo wp_kses_post( $line ); ?></p>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<?php if ( ! $token_valid_status ) : ?>
|
||||
<button type="submit" class="webpcButton webpcButton--blue webpcButton--bg">
|
||||
<?php echo esc_html( __( 'Activate Token', 'webp-converter-for-media' ) ); ?>
|
||||
</button>
|
||||
<?php else : ?>
|
||||
<button type="submit" class="webpcButton webpcButton--red">
|
||||
<?php echo esc_html( __( 'Deactivate Token', 'webp-converter-for-media' ) ); ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed in main container on plugin settings page.
|
||||
*
|
||||
* @var mixed[] $form_options Settings options in main container.
|
||||
* @var string $form_input_name Name of hidden field with form ID.
|
||||
* @var string $form_input_value ID of settings form in main container.
|
||||
* @var string $nonce_input_name Name of hidden field with WordPress Nonce value.
|
||||
* @var string $nonce_input_value WordPress Nonce value.
|
||||
* @var bool $token_valid_status Status of access token.
|
||||
* @var bool $token_active_status Status of PRO version.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget">
|
||||
<form method="post" action="" class="webpcContent">
|
||||
<input type="hidden" name="<?php echo esc_attr( $form_input_name ); ?>"
|
||||
value="<?php echo esc_attr( $form_input_value ); ?>">
|
||||
<input type="hidden" name="<?php echo esc_attr( $nonce_input_name ); ?>"
|
||||
value="<?php echo esc_attr( $nonce_input_value ); ?>">
|
||||
<?php foreach ( $form_options as $index => $option ) : ?>
|
||||
<div class="webpcPage__widgetRow webpcPage__widgetRow--option <?php echo ( ! $option['label'] ) ? 'webpcPage__widgetRow--noBorder' : ''; ?>">
|
||||
<ul class="webpcPage__widgetColumns">
|
||||
<li class="webpcPage__widgetColumn">
|
||||
<?php if ( $option['label'] ) : ?>
|
||||
<h4><?php echo esc_html( $option['label'] ); ?></h4>
|
||||
<?php endif; ?>
|
||||
<?php include dirname( __DIR__ ) . '/fields/' . $option['type'] . '.php'; ?>
|
||||
</li>
|
||||
<?php if ( $option['notice_lines'] ) : ?>
|
||||
<li class="webpcPage__widgetColumn">
|
||||
<div class="webpcPage__widgetNotice">
|
||||
<?php foreach ( $option['notice_lines'] as $line ) : ?>
|
||||
<p><?php echo wp_kses_post( $line ); ?></p>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<button type="submit" class="webpcButton webpcButton--blue webpcButton--bg">
|
||||
<?php echo esc_html( __( 'Save Changes', 'webp-converter-for-media' ) ); ?>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* Pop-up displayed on plugin settings page.
|
||||
*
|
||||
* @var string $author_image_url Avatar of plugin author.
|
||||
* @var bool $token_active_status Status of PRO version.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ( ! $token_active_status ) : ?>
|
||||
<div class="webpcPopup" hidden data-popup="regeneration">
|
||||
<div class="webpcPopup__wrapper">
|
||||
<div class="webpcPopup__inner" data-popup-content>
|
||||
<button type="button" class="webpcPopup__close dashicons dashicons-no"
|
||||
data-popup-close></button>
|
||||
<div class="webpcPopup__sidebar">
|
||||
<div class="webpcPopup__sidebarInner">
|
||||
<img src="<?php echo esc_attr( $author_image_url ); ?>" alt="" class="webpcPopup__sidebarImage">
|
||||
<div class="webpcPopup__sidebarCover" style="background-image: url(https://mattplugins.com/images/matt-plugins-author-logo.png);"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="webpcPopup__content">
|
||||
<div class="webpcPopup__contentText">
|
||||
<?php
|
||||
echo esc_html(
|
||||
sprintf(
|
||||
/* translators: %1$s: author name, %2$s: format name, %3$s: percent value, %4$s: format name */
|
||||
__( 'Hi - I am %1$s, the author of this plugin. Did you know that by converting your images to the %2$s format as well, you can reduce the weight of your images by an additional about %3$s compared to using only the %4$s format?', 'webp-converter-for-media' ),
|
||||
'Mateusz',
|
||||
'AVIF',
|
||||
'50%',
|
||||
'WebP'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="webpcPopup__contentButton">
|
||||
<a href="https://url.mattplugins.com/converter-regeneration-popup-avif" target="_blank"
|
||||
class="webpcButton webpcButton--blue webpcButton--bg">
|
||||
<?php echo esc_html( __( 'Explore the opportunities for yourself', 'webp-converter-for-media' ) ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
@ -0,0 +1,233 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @var string $api_paths_url URL of REST API endpoint.
|
||||
* @var string $api_paths_nonce Authorization code of REST API endpoint.
|
||||
* @var string $api_regenerate_url URL of REST API endpoint.
|
||||
* @var string $api_regenerate_nonce Authorization code of REST API endpoint.
|
||||
* @var string[][] $output_formats Data about output formats for regeneration.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget">
|
||||
<h3 class="webpcPage__widgetTitle">
|
||||
<?php echo esc_html( __( 'Bulk Optimization of Images', 'webp-converter-for-media' ) ); ?>
|
||||
</h3>
|
||||
<div class="webpcLoader webpcContent"
|
||||
data-api-paths="<?php echo esc_url( $api_paths_url ); ?>|<?php echo esc_attr( $api_paths_nonce ); ?>"
|
||||
data-api-regenerate="<?php echo esc_url( $api_regenerate_url ); ?>|<?php echo esc_attr( $api_regenerate_nonce ); ?>"
|
||||
data-api-error-message="<?php echo esc_html( __( 'An error occurred while connecting to the REST API. Please, try again.', 'webp-converter-for-media' ) ); ?>"
|
||||
>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post( __( 'Optimize all your images with just one click!', 'webp-converter-for-media' ) );
|
||||
echo ' ';
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
||||
__( '%1$sClick here%2$s to learn more about how our plugin works.', 'webp-converter-for-media' ),
|
||||
'<a href="https://url.mattplugins.com/converter-regeneration-widget-tutorial-link" target="_blank">',
|
||||
'</a>'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<div class="webpcTree">
|
||||
<p class="webpcTree__headline">
|
||||
<span class="webpcTree__headlineTitle">
|
||||
<?php echo wp_kses_post( __( 'The list of files that can be optimized:', 'webp-converter-for-media' ) ); ?>
|
||||
</span>
|
||||
<a href="#" class="webpcTree__headlineButton" data-tree-toggle-button hidden>
|
||||
<?php echo esc_attr( __( 'Expand/collapse all', 'webp-converter-for-media' ) ); ?>
|
||||
</a>
|
||||
</p>
|
||||
<div class="webpcTree__output"
|
||||
data-tree
|
||||
data-tree-files-count="<?php /* translators: %s: files count */ echo esc_attr( __( '+%s other files', 'webp-converter-for-media' ) ); ?>"
|
||||
data-tree-input-tooltip="<?php echo esc_attr( __( 'Click to expand/collapse', 'webp-converter-for-media' ) ); ?>">
|
||||
<p class="webpcContent__loader" data-tree-loader>
|
||||
<?php echo wp_kses_post( sprintf( __( 'Loading, please wait', 'webp-converter-for-media' ) ) ); ?>
|
||||
</p>
|
||||
<div class="webpcTree__error" data-api-stats-error hidden></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<div class="webpcPage__widgetNotice">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open strong tag, %2$s: close strong tag */
|
||||
__( 'Converting images to WebP and AVIF simultaneously guarantees the lowest weight of your images and compatibility with all browsers. By using the AVIF format you will reduce the weight of your images even more compared to WebP.', 'webp-converter-for-media' ),
|
||||
'<strong>',
|
||||
'</strong>'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<div class="webpcLoader__columns">
|
||||
<?php foreach ( $output_formats as $format_key => $format_data ) : ?>
|
||||
<div class="webpcLoader__column"
|
||||
data-counter="<?php echo esc_attr( $format_key ); ?>">
|
||||
<div class="webpcLoader__columnInner">
|
||||
<svg class="webpcLoader__columnCircle" viewBox="0 0 200 200"
|
||||
preserveAspectRatio="xMinYMin meet">
|
||||
<g>
|
||||
<circle cx="50%" cy="50%" r="95" />
|
||||
</g>
|
||||
</svg>
|
||||
<div class="webpcLoader__columnOverlay">
|
||||
<div class="webpcLoader__columnOverlayTitle">
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %1$s: percent value, %2$s: output format */
|
||||
esc_html( __( '%1$s converted to %2$s', 'webp-converter-for-media' ) ),
|
||||
'<strong><span data-counter-percent>0</span>%</strong>',
|
||||
esc_html( $format_data['label'] )
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="webpcLoader__columnOverlayDesc webpcLoader__columnOverlayDesc--active">
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s: images count */
|
||||
esc_html( __( '%s images remaining', 'webp-converter-for-media' ) ),
|
||||
'<span data-counter-left>0</span>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
<div class="webpcLoader__columnOverlayDesc webpcLoader__columnOverlayDesc--loading"
|
||||
data-counter-loader>
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s: break line tag */
|
||||
esc_html( __( 'Calculating, %splease wait', 'webp-converter-for-media' ) ),
|
||||
'<br>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( $format_data['desc'] ) : ?>
|
||||
<div class="webpcLoader__columnDesc">
|
||||
<?php echo wp_kses_post( $format_data['desc'] ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( ! apply_filters( 'webpc_server_errors', [], true ) ) : ?>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<div class="webpcField">
|
||||
<input type="checkbox"
|
||||
name="regenerate_force"
|
||||
value="1"
|
||||
id="webpc-regenerate-force"
|
||||
class="webpcField__input webpcField__input--toggle">
|
||||
<label for="webpc-regenerate-force"></label>
|
||||
<span class="webpcField__label">
|
||||
<?php echo esc_html( __( 'Force the conversion of all images again', 'webp-converter-for-media' ) ); ?>
|
||||
<span class="webpcField__labelChecked">
|
||||
<?php echo esc_html( __( 'If you want to optimize only unconverted images, leave this option unchecked. Use only when needed.', 'webp-converter-for-media' ) ); ?>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" class="webpcLoader__button webpcButton webpcButton--blue webpcButton--bg" data-submit>
|
||||
<?php echo esc_html( __( 'Start Bulk Optimization', 'webp-converter-for-media' ) ); ?>
|
||||
</button>
|
||||
<div class="webpcLoader__status" data-status hidden>
|
||||
<div class="webpcLoader__statusContent webpcLoader__statusContent--small">
|
||||
<?php echo wp_kses_post( __( 'This is a process that can take from a few minutes to many hours, depending on the number of files. During this process, please, do not close your browser window.', 'webp-converter-for-media' ) ); ?>
|
||||
</div>
|
||||
<div class="webpcLoader__statusProgress" data-status-progress data-percent="0">
|
||||
<div class="webpcLoader__statusProgressCount"></div>
|
||||
</div>
|
||||
<div class="webpcLoader__statusContent">
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s progress value */
|
||||
wp_kses_post( __( 'Saving the weight of your images: %s', 'webp-converter-for-media' ) ),
|
||||
'<strong data-status-count-size>0 kB</strong>'
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s images count */
|
||||
wp_kses_post( __( 'Successfully converted files: %s', 'webp-converter-for-media' ) ),
|
||||
'<strong data-status-count-success>0</strong>'
|
||||
);
|
||||
?>
|
||||
<br>
|
||||
<?php
|
||||
echo sprintf(
|
||||
/* translators: %s images count */
|
||||
wp_kses_post( __( 'Failed or skipped file conversion attempts: %s', 'webp-converter-for-media' ) ),
|
||||
'<strong data-status-count-error>0</strong>'
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="webpcLoader__success" data-success hidden>
|
||||
<div class="webpcLoader__successInner">
|
||||
<div class="webpcLoader__successContent">
|
||||
<?php echo wp_kses_post( __( 'The process was completed successfully. Your images have been converted!', 'webp-converter-for-media' ) ); ?>
|
||||
<br>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
||||
__( 'Do you want to know how the plugin works and how to check if it is working properly? Please, read %1$sour manual%2$s.', 'webp-converter-for-media' ),
|
||||
'<a href="https://url.mattplugins.com/converter-regeneration-success-message-instruction" target="_blank">',
|
||||
'</a>'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="webpcLoader__errors" data-errors hidden>
|
||||
<div class="webpcLoader__errorsInner">
|
||||
<div class="webpcLoader__errorsTitle">
|
||||
<?php echo esc_html( __( 'Additional information about the process:', 'webp-converter-for-media' ) ); ?>
|
||||
</div>
|
||||
<div class="webpcLoader__errorsContent" data-errors-output></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<button type="button" class="webpcLoader__button webpcButton webpcButton--blue webpcButton--bg" disabled>
|
||||
<?php echo esc_html( __( 'Start Bulk Optimization', 'webp-converter-for-media' ) ); ?>
|
||||
</button>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open anchor tag, %2$s: close anchor tag */
|
||||
__( 'To start the process, please %1$sresolve the server configuration issue%2$s.', 'webp-converter-for-media' ),
|
||||
'<a href="#server-error-notice">',
|
||||
'</a>'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,64 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @var string[] $errors_codes List of server configuration errors.
|
||||
* @var string $size_png_path Size of file.
|
||||
* @var string $size_png2_path Size of file.
|
||||
* @var string $size_png_url Size of file.
|
||||
* @var string $size_png2_url Size of file.
|
||||
* @var string $size_png_as_webp_url Size of file.
|
||||
* @var string $size_png2_as_webp_url Size of file.
|
||||
* @var mixed[] $plugin_settings Option keys with values.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget">
|
||||
<div class="webpcContent">
|
||||
<div class="webpcPage__widgetRow">
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
sprintf(
|
||||
/* translators: %1$s: open anchor tag, %2$s: close anchor tag, %3$s: open anchor tag, %4$s: close anchor tag */
|
||||
__( 'Please, %1$scheck our FAQ%2$s before adding a thread with a technical problem. If you do not find help there, %3$scheck the support forum%4$s for similar problems. If you do not find a solution, please, %5$scontact us%6$s.', 'webp-converter-for-media' ),
|
||||
'<a href="https://url.mattplugins.com/converter-tab-server-message-faq" target="_blank">',
|
||||
'</a>',
|
||||
'<a href="https://url.mattplugins.com/converter-tab-server-message-support" target="_blank">',
|
||||
'</a>',
|
||||
'<a href="https://url.mattplugins.com/converter-tab-server-message-contact" target="_blank">',
|
||||
'</a>'
|
||||
)
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
echo wp_kses_post(
|
||||
__( 'Please attach to your message the configuration of your server (which is available below), e.g. as a screenshot.', 'webp-converter-for-media' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<div class="webpcPage__widgetRow">
|
||||
<div class="webpcServerInfo">
|
||||
<?php
|
||||
require_once dirname( __DIR__ ) . '/server/debug.php';
|
||||
require_once dirname( __DIR__ ) . '/server/filters.php';
|
||||
require_once dirname( __DIR__ ) . '/server/wordpress.php';
|
||||
require_once dirname( __DIR__ ) . '/server/sub-sizes.php';
|
||||
require_once dirname( __DIR__ ) . '/server/options.php';
|
||||
require_once dirname( __DIR__ ) . '/server/php.php';
|
||||
require_once dirname( __DIR__ ) . '/server/gd.php';
|
||||
require_once dirname( __DIR__ ) . '/server/imagick.php';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Widget displayed on plugin settings page.
|
||||
*
|
||||
* @var string $url_debug_page URL of debug tag in settings page.
|
||||
*
|
||||
* @package Converter for Media
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="webpcPage__widget">
|
||||
<h3 class="webpcPage__widgetTitle">
|
||||
<?php echo esc_html( __( 'We are waiting for your message', 'webp-converter-for-media' ) ); ?>
|
||||
</h3>
|
||||
<div class="webpcContent">
|
||||
<p>
|
||||
<?php
|
||||
echo esc_html(
|
||||
__( 'Do you have any technical problems or an idea for a new feature? Feel free to contact us.', 'webp-converter-for-media' )
|
||||
);
|
||||
?>
|
||||
</p>
|
||||
<p class="center">
|
||||
<a href="<?php echo esc_attr( $url_debug_page ); ?>"
|
||||
class="webpcButton webpcButton--blue"
|
||||
>
|
||||
<?php echo esc_html( __( 'Help Center', 'webp-converter-for-media' ) ); ?>
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user