You are here

function custom_pub_i18n_sync_options_alter in Custom Publishing Options 7

Implements hook_i18n_sync_options_alter().

Parameters

$fields:

$type:

File

./custom_pub.module, line 574
Adds the ability to add Custom publishing options to the node Add/Edit forms.

Code

function custom_pub_i18n_sync_options_alter(&$fields, $type) {

  // We are handling only nodes.
  if ($type != 'node') {
    return;
  }
  $pub_types = custom_pub_types();
  foreach ($pub_types as $machine_name => $pub_type) {
    $fields[$machine_name] = array(
      'title' => t($pub_type['name']),
    );
  }
}