Function __global->cns_delete_poll

Definitions

sources/cns_polls_action2.php

  • Delete a forum poll.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$poll_id AUTO_LINK No No required parameter N/A N/A The ID of the poll we're deleting
$reason LONG_TEXT No No Blank (empty string) N/A N/A The reason for deleting the poll
$check_perms boolean No No True N/A N/A Whether to check permissions

Returns

  • The ID of the topic the poll is on
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Delete a forum poll.
 *
 * @param  AUTO_LINK $poll_id The ID of the poll we're deleting
 * @param  LONG_TEXT $reason The reason for deleting the poll
 * @param  boolean $check_perms Whether to check permissions
 * @return AUTO_LINK The ID of the topic the poll is on
 */

function cns_delete_poll(int $poll_id, string $reason = '', bool $check_perms = true) : int