src/class-wp-register.php
protected static function set_new_params( $type, $hash, $url, $extension ) {

		$data = [

			'name'    => self::$id,
			'url'     => $url . $hash . $extension,
			'deps'    => self::unify_params( $type, 'deps' ),
			'version' => self::unify_params( $type, 'version', '1.0.0' ),
		];

		switch ( $type ) {
			case 'style':
				$data['media'] = self::unify_params( $type, 'media', 'all' );
				break;

			case 'script':
				$data['params'] = self::unify_params( $type, 'params' );
				$data['footer'] = self::unify_params( $type, 'footer', false );

				$data['params']['nonce'] = wp_create_nonce( self::$id );
				break;

			default:
		}

		self::$data[ $type ] = [ $data['name'] => $data ];

		return true;
	}
protected static function set_new_params( $type, $hash, $url, $extension ) {

		$data = [

			'name'    => self::$id,
			'url'     => $url . $hash . $extension,
			'deps'    => self::unify_params( $type, 'deps' ),
			'version' => self::unify_params( $type, 'version', '1.0.0' ),
		];

		switch ( $type ) {
			case 'style':
				$data['media'] = self::unify_params( $type, 'media', 'all' );
				break;

			case 'script':
				$data['params'] = self::unify_params( $type, 'params' );
				$data['footer'] = self::unify_params( $type, 'footer', false );

				$data['params']['nonce'] = wp_create_nonce( self::$id );
				break;

			default:
		}

		self::$data[ $type ] = [ $data['name'] => $data ];

		return true;
	}
protected static function set_new_params ( $ type , $ hash , $ url , $ extension ) { $ data = [ 'name' => self :: $ id , 'url' => $ url . $ hash . $ extension , 'deps' => self :: unify_params ( $ type , 'deps' ) , 'version' => self :: unify_params ( $ type , 'version' , '1.0.0' ) , ] ; switch ( $ type ) { case 'style' : $ data [ 'media' ] = self :: unify_params ( $ type , 'media' , 'all' ) ; break ; case 'script' : $ data [ 'params' ] = self :: unify_params ( $ type , 'params' ) ; $ data [ 'footer' ] = self :: unify_params ( $ type , 'footer' , false ) ; $ data [ 'params' ] [ 'nonce' ] = wp_create_nonce ( self :: $ id ) ; break ; default : } self :: $ data [ $ type ] = [ $ data [ 'name' ] => $ data ] ; return true ; }
Set new parameters for the unified file.

@since 1.0.4

@param string $type      → script|style.
@param string $hash      → filename hash.
@param string $url       → path url.
@param string $extension → file extension.

@return boolean true
Set new parameters for the unified file .