Had a Drupal site that used the php filter module. After realizing the security risk I started the process of fixing things up.
Currently the last piece of code is a php snippet I embedded into a view to display the input fields of a content type (called post).
<?php
module_load_include('inc', 'node', 'node.pages');
$node_form = node_add('post');
print drupal_render($node_form);
$form['buttons']['submit']['#value'] = t('Save and add new');
?>
This is a view block embedded within a panel. Not 100% sure how to take this and make it a custom module that I suppose cloud be a block for me to embed on the panel page.
Update:
Attempted to make the module using hook_block_configure()
but when enabled it is not showing up as a block option for me to embed.
<?php
/**
* Implements hook_block_configure().
*/
function hook_block_configure($delta = '') {
module_load_include('inc', 'node', 'node.pages');
$node_form = node_add('post');
print drupal_render($node_form);
$form['buttons']['submit']['#value'] = t('Save and add new');
}
Is the correct command being used?