HEX
Server: Apache
System: Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User: u112718762 (3890930)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //homepages/oneclick/WordPress/6.9/601/custom/wordpress/wp-content/plugins/ionos-sso/inc/Helper.php
<?php

namespace Ionos\SSO;

use Ionos\Sso\Config;

if ( ! defined( 'ABSPATH' ) ) {
	die();
}

/**
 * Helper class
 */
class Helper {

	/**
	 * Get the url of the css folder
	 *
	 * @param string $file // css file name.
	 *
	 * @return string
	 */
	public static function get_css_url( $file = '' ) {
		return plugins_url( 'css/' . $file, __DIR__ );
	}

	/**
	 * Returns path to css folder with optional file.
	 *
	 * @param string $file File name.
	 *
	 * @return string
	 */
	public static function get_css_path( $file = '' ) {
		return self::get_plugin_dir_path() . 'css/' . $file;
	}

	/**
	 * Returns plugin dir path.
	 *
	 * @return string
	 */
	public static function get_plugin_dir_path() {
		return plugin_dir_path( __DIR__ );
	}

	/**
	 * Is the SSO enabled/authorized?
	 */
	public static function is_enabled() {
		return '1' === Config::get( 'main.enabled' ) && is_ssl();
	}
}