protected function is_valid_type( Icon_Picker_Type $type ) {
		foreach ( array( 'id', 'controller' ) as $var ) {
			$value = $type->$var;

			if ( empty( $value ) ) {
				trigger_error( esc_html( sprintf( 'Icon Picker: "%s" cannot be empty.', $var ) ) );
				return false;
			}
		}

		if ( isset( $this->types[ $type->id ] ) ) {
			trigger_error( esc_html( sprintf( 'Icon Picker: Icon type %s is already registered. Please use a different ID.', $type->id ) ) );
			return false;
		}

		return true;
	}
protected function is_valid_type( Icon_Picker_Type $type ) {
		foreach ( array( 'id', 'controller' ) as $var ) {
			$value = $type->$var;

			if ( empty( $value ) ) {
				trigger_error( esc_html( sprintf( 'Icon Picker: "%s" cannot be empty.', $var ) ) );
				return false;
			}
		}

		if ( isset( $this->types[ $type->id ] ) ) {
			trigger_error( esc_html( sprintf( 'Icon Picker: Icon type %s is already registered. Please use a different ID.', $type->id ) ) );
			return false;
		}

		return true;
	}
protected function is_valid_type ( Icon_Picker_Type $ type ) { foreach ( array ( 'id' , 'controller' ) as $ var ) { $ value = $ type -> $ var ; if ( empty ( $ value ) ) { trigger_error ( esc_html ( sprintf ( 'Icon Picker: "%s" cannot be empty.' , $ var ) ) ) ; return false ; } } if ( isset ( $ this -> types [ $ type -> id ] ) ) { trigger_error ( esc_html ( sprintf ( 'Icon Picker: Icon type %s is already registered. Please use a different ID.' , $ type -> id ) ) ) ; return false ; } return true ; }
Check if icon type is valid

@since  0.1.0
@param  Icon_Picker_Type $type Icon type.
@return bool
Check if icon type is valid