Currently I am building an installation profile for Drupal 7. I make multiple fields and create instances for the fields at a specific content type.
Now I add a new node to the content type but I don't know how to add data into the fields I generated for this content type. This has to happen all in the installation profile so in code and no explanation for Drupal it self.
The node is generated like this:
$node = new stdClass();
$node->title = 'Test title';
node_save($node);
This is not the whole code of course but is just to give you an idea. Currently I add the type, status, uid, title, promote, created, timestamp, sticky, format, language, teaser, body and revision to the $node. Now I want to add my custom field data, anybody has an idea on how to do this?