Function __global->save_form_custom_fields

Definitions

sources/fields.php

  • Save custom fields to a content item.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ID_TEXT No No required parameter N/A N/A Content type hook codename
$id ID_TEXT No No required parameter N/A N/A Content entry ID
$old_id ?ID_TEXT No No Null N/A N/A Content entry ID (prior to possible rename) (null: definitely unchanged)

Preview

Code (PHP)

/**
 * Save custom fields to a content item.
 *
 * @param  ID_TEXT $content_type Content type hook codename
 * @param  ID_TEXT $id Content entry ID
 * @param  ?ID_TEXT $old_id Content entry ID (prior to possible rename) (null: definitely unchanged)
 */

function save_form_custom_fields(string $content_type, string $id, ?string $old_id = null)