HEX
HEX
Server: Apache
System: Linux localhost.localdomain 4.18.0-348.7.1.el8_5.x86_64 #1 SMP Wed Dec 22 13:25:12 UTC 2021 x86_64
User: www (1001)
PHP: 8.1.32
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/ahmsolaiman.com/wp-content/plugins/types/application/controllers/page/abstract.php
<?php

use OTGS\Toolset\Types\Controller\Page\PageControllerInterface;

/**
 * Abstract admin page controller.
 *
 * @since 2.0
 */
abstract class Types_Page_Abstract implements PageControllerInterface {


	/** @var bool Whether to disable heartbeat. Default is true (disable). */
	protected $disable_heartbeat = true;


	/**
	 * Prepare the page controller for displaying a page.
	 *
	 * This should be the first time where any kind of preparation happens (it shouldn't happen during
	 * instantiating the class).
	 *
	 * By default, this disables the WordPress Heartbeat API in order to save resources and speed up AJAX calls.
	 *
	 * @since 2.0
	 */
	public function prepare() {
		// We'll need the GUI base for Twig and other things.
		$tcb = Toolset_Common_Bootstrap::get_instance();
		$tcb->register_gui_base();

		Toolset_Gui_Base::initialize();

		if ( $this->disable_heartbeat ) {
			wp_deregister_script( 'heartbeat' );
			wp_register_script( 'heartbeat', false );
		}
	}


	/**
	 * Title to be displayed on the menu as well in the page title.
	 *
	 * @return string
	 * @since 2.0
	 */
	abstract public function get_title();


	/**
	 * Callback for the page rendering action.
	 *
	 * @return callable
	 * @since 2.0
	 */
	abstract public function get_render_callback();


	/**
	 * Callback for the page load action (load-{$hook}).
	 *
	 * @return null|callable Optional.
	 * @since 2.0
	 */
	public function get_load_callback() {
		return null;
	}


	/**
	 * Page name slug.
	 *
	 * Should be taken directly from constants in Types_Admin_Menu.
	 *
	 * @return string
	 * @since 2.0
	 */
	abstract public function get_page_name();


	/**
	 * User capability required to display the submenu item and access the page.
	 *
	 * @return string
	 * @since 2.0
	 */
	abstract public function get_required_capability();

}