Function __global->get_privacy_form_fields

Definitions

sources/content_privacy2.php

  • Get form fields for setting content privacy.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ?ID_TEXT No No required parameter N/A N/A The content type (null: could be multiple)
$content_id ?ID_TEXT No No Null N/A N/A The content ID (null: adding)
$show_header boolean No No True N/A N/A Whether to show a header to separate the settings out
$prefix string No No Blank (empty string) N/A N/A Prefix for field naming

Returns

  • The form fields
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get form fields for setting content privacy.
 *
 * @param  ?ID_TEXT $content_type The content type (null: could be multiple)
 * @param  ?ID_TEXT $content_id The content ID (null: adding)
 * @param  boolean $show_header Whether to show a header to separate the settings out
 * @param  string $prefix Prefix for field naming
 * @return Tempcode The form fields
 */

function get_privacy_form_fields(?string $content_type, ?string $content_id = null, bool $show_header = true, string $prefix = '') : object