Phase 6: WebP image conversion - Converter for Media plugin with Nginx rewrite rules

This commit is contained in:
Hanson.xyz Dev
2025-11-28 17:16:24 -06:00
parent 91de533da4
commit 78a744ef06
260 changed files with 21138 additions and 5 deletions
@@ -0,0 +1,29 @@
<?php
namespace WebpConverter\Service;
/**
* Manages required server configuration.
*/
class ServerConfigurator {
/**
* @param int $value .
*
* @return void
*/
public function set_memory_limit( int $value = 2 ) {
ini_set( 'memory_limit', sprintf( '%sG', $value ) ); // phpcs:ignore
}
/**
* @param int $seconds .
*
* @return void
*/
public function set_execution_time( int $seconds = 120 ) {
if ( strpos( ini_get( 'disable_functions' ) ?: '', 'set_time_limit' ) === false ) {
set_time_limit( $seconds );
}
}
}