wordpress / latest / classes / wp_hook / offsetset.html

WP_Hook::offsetSet( $offset, $value )

Source

File: wp-includes/class-wp-hook.php. View all references

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

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