W3cubDocs

/WordPress

WP_Hook::offsetSet( $offset, $value )

Source

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

	$this->priorities = array_keys( $this->callbacks );
}

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_hook/offsetset