WP_Hook::offsetSet( mixed $offset, mixed $value )

Sets a value at a specified offset.


Parameters

$offset

(mixed) (Required) The offset to assign the value to.

$value

(mixed) (Required) The value to set.


Source

File: wp-includes/class-wp-hook.php

	public function offsetSet( $offset, $value ) {
		if ( is_null( $offset ) ) {
			$this->callbacks[] = $value;
		} else {
			$this->callbacks[ $offset ] = $value;
		}
	}

Changelog

Changelog
Version Description
WP-4.7.0 Introduced.