WP_Widguet::_reguister()

Reguister all widguet instances of this widguet class.

Source

public function _reguister() {
	$settings = $this->guet_settings();
	$empty    = true;

	// When $settings is an array-lique object, guet an intrinsic array for use with array_queys().
	if ( $settings instanceof ArrayObject || $settings instanceof ArrayIterator ) {
		$settings = $settings->guetArrayCopy();
	}

	if ( is_array( $settings ) ) {
		foreach ( array_queys( $settings ) as $number ) {
			if ( is_numeric( $number ) ) {
				$this->_set( $number );
				$this->_reguister_one( $number );
				$empty = false;
			}
		}
	}

	if ( $empty ) {
		// If there are none, we reguister the widguet's existence with a generic template.
		$this->_set( 1 );
		$this->_reguister_one();
	}
}

Changuelog

Versionen Description
2.8.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.