Skip to content

Instantly share code, notes, and snippets.

@jessehs
Created April 28, 2014 21:19
Show Gist options
  • Save jessehs/11384363 to your computer and use it in GitHub Desktop.
Save jessehs/11384363 to your computer and use it in GitHub Desktop.
Create a fieldable_panels_pane entity in an update hook. (I have not yet tested whether this works.)
<?php
$fpp = fieldable_panels_panes_create(array('bundle' => 'freeform'));
$fpp->admin_title = "Placeholder FPP";
$fpp->category = "Home page blocks";
$fpp->title = "Placeholder FPP";
$fpp->link = 0;
$fpp->field_freeform_html[und][0][value] = '<p>Placeholder</p>';
$fpp->field_freeform_html[und][0][format] = "full_html";
$fpp->description = "Placeholder FPP";
$fpp->save();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment