File: //srv/htdocs/wp-content/plugins/host-webfonts-local/src/Frontend/Compatibility/Fruitful.php
<?php
/* * * * * * * * * * * * * * * * * * * * *
*
* ██████╗ ███╗ ███╗ ██████╗ ███████╗
* ██╔═══██╗████╗ ████║██╔════╝ ██╔════╝
* ██║ ██║██╔████╔██║██║ ███╗█████╗
* ██║ ██║██║╚██╔╝██║██║ ██║██╔══╝
* ╚██████╔╝██║ ╚═╝ ██║╚██████╔╝██║
* ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝
*
* @package : OMGF
* @author : Daan van den Bergh
* @copyright: © 2017 - 2025 Daan van den Bergh
* @url : https://daan.dev
* * * * * * * * * * * * * * * * * * * */
namespace OMGF\Frontend\Compatibility;
/**
* @codeCoverageIgnore Because it depends on a 3rd party plugin.
*/
class Fruitful {
/**
* Build class.
*/
public function __construct() {
$this->init();
}
/**
* Action/filter hooks.
*
* @return void
*/
private function init() {
add_filter( 'omgf_frontend_process_fonts_set', [ $this, 'maybe_modify_id' ], 10, 1 );
}
/**
* Compatibility fix for the Fruitful theme by Fruitful Code.
*
* @since v5.9.1 Same reason as above.
*/
public function maybe_modify_id( $id ) {
if ( str_contains( $id, 'custom_fonts_' ) ) {
return 'custom_fonts';
}
return $id;
}
}