Function __global->feedback_fields

Definitions

sources/feedback2.php

  • Get the Tempcode for the manipulation of the feedback fields for some content, if they are enabled in the Admin Zone.
  • 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 string No No required parameter N/A N/A The content type
$allow_rating boolean No No required parameter N/A N/A Whether rating is currently/by-default allowed for this resource
$allow_comments boolean No No required parameter N/A N/A Whether comments are currently/by-default allowed for this resource
$allow_trackbacks ?boolean No No required parameter N/A N/A Whether trackbacks are currently/by-default allowed for this resource (null: this resource does not support trackbacks regardless)
$send_trackbacks boolean No No required parameter N/A N/A Whether we're allowed to send trackbacks for this resource
$notes LONG_TEXT No No required parameter N/A N/A The current/by-default notes for this content
$allow_reviews ?boolean No No Null N/A N/A Whether reviews are currently/by-default allowed for this resource (null: no reviews allowed here)
$default_off boolean No No False N/A N/A Whether the default values for the allow options is actually off (this determines how the tray auto-hides itself)
$has_notes boolean No No True N/A N/A If there's to be a notes field
$show_header boolean No No True N/A N/A Whether to show a header
$field_name_prefix string No No Blank (empty string) N/A N/A Field name prefix

Returns

  • The feedback editing fields
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the Tempcode for the manipulation of the feedback fields for some content, if they are enabled in the Admin Zone.
 *
 * @param  string $content_type The content type
 * @param  boolean $allow_rating Whether rating is currently/by-default allowed for this resource
 * @param  boolean $allow_comments Whether comments are currently/by-default allowed for this resource
 * @param  ?boolean $allow_trackbacks Whether trackbacks are currently/by-default allowed for this resource (null: this resource does not support trackbacks regardless)
 * @param  boolean $send_trackbacks Whether we're allowed to send trackbacks for this resource
 * @param  LONG_TEXT $notes The current/by-default notes for this content
 * @param  ?boolean $allow_reviews Whether reviews are currently/by-default allowed for this resource (null: no reviews allowed here)
 * @param  boolean $default_off Whether the default values for the allow options is actually off (this determines how the tray auto-hides itself)
 * @param  boolean $has_notes If there's to be a notes field
 * @param  boolean $show_header Whether to show a header
 * @param  string $field_name_prefix Field name prefix
 * @return Tempcode The feedback editing fields
 */

function feedback_fields(string $content_type, bool $allow_rating, bool $allow_comments, ?bool $allow_trackbacks, bool $send_trackbacks, string $notes, ?bool $allow_reviews = null, bool $default_off = false, bool $has_notes = true, bool $show_header = true, string $field_name_prefix = '') : object