function node_unpublish_by_keyword_action_form
7.x node.module | node_unpublish_by_keyword_action_form($context) |
6.x node.module | node_unpublish_by_keyword_action_form($context) |
Generates settings form for node_unpublish_by_keyword_action().
Parameters
array $context: Array of additional information about what triggered this action.
Return value
array A form array.
See also
node_unpublish_by_keyword_action_submit()
File
- drupal-7.x/
modules/ node/ node.module, line 4046 - The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.
Code
function node_unpublish_by_keyword_action_form($context) {
$form['keywords'] = array(
'#title' => t('Keywords'),
'#type' => 'textarea',
'#description' => t('The content will be unpublished if it contains any of the phrases above. Use a case-sensitive, comma-separated list of phrases. Example: funny, bungee jumping, "Company, Inc."'),
'#default_value' => isset($context['keywords']) ? drupal_implode_tags($context['keywords']) : '',
);
return $form;
}