HEX
Server: Apache
System: Linux sg241.singhost.net 2.6.32-896.16.1.lve1.4.51.el6.x86_64 #1 SMP Wed Jan 17 13:19:23 EST 2018 x86_64
User: honghock (909)
PHP: 8.0.30
Disabled: passthru,system,shell_exec,show_source,exec,popen,proc_open
Upload Files
File: /home/honghock/public_html/wp-content/plugins/easyjobs/admin/includes/Notice/Utils/Helper.php
<?php

namespace PriyoMukul\WPNotice\Utils;

use Exception;

trait Helper {

	public function is_installed( $plugin ) {
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}
		$plugins = get_plugins();

		return isset( $plugins[ $plugin ] ) ? $plugins[ $plugin ] : false;
	}

	/**
	 * Get current timestamp
	 * @return integer
	 */
	public function time() {
		return intval( current_time( 'timestamp' ) );
	}

	/**
	 * Make timestamp for a number
	 *
	 * @param string $time
	 *
	 * @return int
	 */
	public function strtotime( $time = '+7 day' ) {
		return intval( strtotime( date( 'r', $this->time() ) . " $time" ) );
	}

	public function date( $time ) {
		return date( 'd-m-Y h:i:s', $time );
	}

	/**
	 * @throws Exception
	 */
	private function error( $message ) {
		throw new Exception( $message );
	}
}