namespace Hostinger\Admin;
use Hostinger\WpHelper\Utils;
defined( 'ABSPATH' ) || exit;
public function __construct( $utils ) {
$this->helper = new Helper();
$this->utils = $utils ?? new Utils();
add_action( 'admin_footer', array( $this, 'rate_plugin' ) );
add_filter( 'wp_kses_allowed_html', array( $this, 'custom_kses_allowed_html' ), 10, 1 );
public function rate_plugin(): void {
$admin_path = parse_url( admin_url(), PHP_URL_PATH );
if ( ! $this->utils->isThisPage( $admin_path . 'admin.php?page=' . Menu::MENU_SLUG ) ) {
require_once HOSTINGER_ABSPATH . 'includes/Admin/Views/Partials/RateUs.php';
public function custom_kses_allowed_html( $allowed ) {
$allowed['path'] = array(