HEX
Server: nginx/1.18.0
System: Linux vcwordpress 5.15.0-174-generic #184-Ubuntu SMP Fri Mar 13 18:41:50 UTC 2026 x86_64
User: root (0)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/bharti-foundation.stgviitor.com/wp-content/themes/lifeline/includes/Classes/Lifeline.php
<?php
/**
 * @package     LifeLine
 * @author      webinane team <[email protected]>
 * @since       5.0.0
 */
namespace Lifeline\Classes;

use Lifeline\Classes\Arr;
use Lifeline\Helpers\Facade;
use Lifeline\Helpers\Common;

class Lifeline {

	use Common;

	static $instance;


	/**
	 * instance
	 *
	 * @return void
	 */
	static function instance() {
		if ( self::$instance == null ) { // phpcs:ignore WordPress
			self::$instance = new self;
		}

		return self::$instance;
	}

	/**
	 * [classes description]
	 * @return [type] [description]
	 */
	function classes() {
		return array(
			'array' => \Lifeline\Classes\Arr::class,
			'demos' => \Lifeline\Classes\Demos::class,
		);
	}
	/**
	 * Theme Options
	 * @param  string $key [description]
	 * @return [type]      [description]
	 */
	function options( $key = '' ) {
		global $lifeline_theme_options;

		if ( ! $lifeline_theme_options ) {
			$lifeline_theme_options = get_option( 'lifeline_theme_options' );
		}

		if ( $key ) {
			return Arr::get( $lifeline_theme_options, $key );
		}

		return $lifeline_theme_options;
	}

	/**
	 * __get
	 *
	 * @param  mixed $name
	 * @return void
	 */
	public function __get( $name ) {
		if ( property_exists( $this, $name ) ) {
			return $this->$name;
		} else {
			$classes = $this->classes();
			$class   = isset( $classes[ $name ] ) ? $classes[ $name ] : '';

			if ( $class && class_exists( $class ) ) {
				return new $class;
			}
		}
	}

	/**
	 * meta
	 *
	 * @param  mixed $id
	 * @return void
	 */
	function meta( $id = 0 ) {
		if ( ! $id ) {
			$id = get_the_id();
		}

		$meta = get_post_meta( $id );

		return $this->formatMeta( $meta );
	}

	/**
	 * formatMeta
	 *
	 * @param  mixed $meta
	 * @return void
	 */
	function formatMeta( $meta ) { // phpcs:ignore WordPress
		$formatted = array();
		if ( ! $meta ) {
			return;
		}
		foreach ( $meta as $key => $mt ) {
			$formatted[ $key ] = maybe_unserialize( $mt[0] );
		}

		return $formatted;
	}
}