WP_Hook::offsetSet

Advertisement

Summery Summery

Sets a value at a specified offset.

Syntax Syntax

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

Parameters Parameters

$offset

(Required) The offset to assign the value to.

$value

(Required) The value to set.

Source 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;
		}
	}

Advertisement

Changelog Changelog

Changelog
Version Description
4.7.0 Introduced.

Advertisement

Leave a Reply