Documentation

Filters reference


totalpoll/filters/admin/dashboard/polls#
/**
 * Filters the polls list sent to dashboard.
 *
 * @param Model[] $polls Array of poll models.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/entries/fetch#
/**
 * Filters the list of entries sent to entries browser.
 *
 * @param Model[] $entries  Array of entries models.
 * @param array   $criteria Array of criteria.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/entries/export/entries#
/**
 * Filters the list of entries to be exported.
 *
 * @param Model[] $entries Array of entries models.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/entries/export/fields#
/**
 * Filters the list of fields used in exported file of entries.
 *
 * @param array $fields Array of form fields.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/entries/export/row#
/**
 * Filters a row of exported entries.
 *
 * @param array $row   Array of values.
 * @param Model $entry Entry model.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/entries/export/writer/{$format}#
/**
 * Filters the file writer for a specific format when exporting form entries.
 *
 * @param Writer $writer Writer object.
 *
 * @since 4.0.0
 * @return Writer
 */
totalpoll/filters/admin/entries/polls#
/**
 * Filters the polls list sent to entries browser.
 *
 * @param Model[] $polls Array of poll models.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/insights/metrics#
/**
 * Filters the data sent to insights browser.
 *
 * @param Model[] $polls    Array of poll models.
 * @param array   $criteria Array of criteria.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/insights/polls#
/**
 * Filters the polls list sent to insights browser.
 *
 * @param Model[] $polls Array of poll models.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/log/fetch#
/**
 * Filters the list of log entries sent to log browser.
 *
 * @param Model[] $entries  Array of log entries models.
 * @param array   $criteria Array of criteria.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/log/export/entries#
/**
 * Filters the list of log entries to be exported.
 *
 * @param Model[] $entries Array of log entries models.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/log/export/writer/{$format}#
/**
 * Filters the file writer for a specific format when exporting log entries.
 *
 * @param Writer $writer Writer object.
 *
 * @since 4.0.0
 * @return Writer
 */
totalpoll/filters/admin/editor/settings#
/**
 * Filters the settings of poll passed to frontend controller.
 *
 * @param array $settings Array of settings.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/editor/actions#
/**
 * Filters the list of available action (side) in poll editor.
 *
 * @param array $actions Array of actions [id => [label, icon, url]].
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/before/admin/editor/save/settings#
/**
 * Filters the settings before saving the poll.
 *
 * @param array $settings Array of settings.
 * @param array $pollArgs Array of post args.
 * @param int   $pollId   Poll post ID.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/editor/save/settings#
/**
 * Filters the settings after validation to be saved.
 *
 * @param array $settings Array of settings.
 * @param array $pollArgs Array of post args.
 * @param int   $pollId   Poll post ID.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/editor/save/post#
/**
 * Filters the arguments that are passed back to wp_update_post to save the changes.
 *
 * @see   Check wp_update_post documentation for more details.
 *
 * @param array $pollArgs Array of post args.
 * @param array $settings Array of settings.
 * @param int   $pollId   Poll post ID.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/listing/columns-content/{$column}#
/**
 * Filters the content of a column in polls listing.
 *
 * @param array $content Column content.
 * @param array $id      Poll post ID.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/admin/listing/actions#
/**
 * Filters the list of available actions in polls listing (under each poll).
 *
 * @param array    $actions Array of actions [id => url].
 * @param \WP_Post $post    Poll post.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/admin/listing/states#
/**
 * Filters the list of states actions in polls listing (beside each title).
 *
 * @param array $states Array of states [id => label].
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/get/query#
/**
 * Filters the list of arguments used for get entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/get/results#
/**
 * Filters the results of get entries query.
 *
 * @param \TotalPoll\Contracts\Entry\Model[] $entryModels Entries models.
 * @param array                              $args        Arguments.
 * @param array                              $query       Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/insert/attributes#
/**
 * Filters the attributes of an entry model used for insertion.
 *
 * @param array $attributes Entry attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/insert/model#
/**
 * Filters the entry model attributes after insertion.
 *
 * @param array $entryModelAttributes Entry attributes.
 * @param array $attributes           Original insertion attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/count/query#
/**
 * Filters the list of arguments used for count entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/entries/anonymize/query#
/**
 * Filters the list of arguments used for anonymize entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/get/query#
/**
 * Filters the list of arguments used for get log entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/get/results#
/**
 * Filters the results of log repository get query.
 *
 * @param \TotalPoll\Contracts\Log\Model[] $logModels Log entries models.
 * @param array                            $args      Arguments.
 * @param array                            $query     Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/insert/attributes#
/**
 * Filters the attributes of an log entry model used for insertion.
 *
 * @param array $attributes Entry attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/insert/model#
/**
 * Filters the log entry model attributes after insertion.
 *
 * @param array $entryModel Log entry attributes.
 * @param array $attributes Original insertion attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/count/query#
/**
 * Filters the list of arguments used for count log entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/log/anonymize/query#
/**
 * Filters the list of arguments used for anonymize log entries query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/template/content/question#
/**
 * Filters the content of a question.
 *
 * @param string $content  Question content.
 * @param array  $question Question.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/template/content/choice#
/**
 * Filters the content of a choice label.
 *
 * @param string $label  Choice label content.
 * @param array  $choice Choice.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/template/content/user#
/**
 * Filters the content of user-defined fragments.
 *
 * @param string $content Fragment content.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/template/attributes/question/container#
/**
 * Filters the HTML attributes of question container.
 *
 * @param array $attributes Attributes [name => value].
 * @param array $question   Question.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/template/attributes/question/content#
/**
 * Filters the HTML attributes of question content.
 *
 * @param array $attributes Attributes [name => value].
 * @param array $question   Question.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/template/attributes/choice/container#
/**
 * Filters the HTML attributes of choice container.
 *
 * @param array $attributes Attributes [name => value].
 * @param array $question   Choice.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/template/attributes/choice/label#
/**
 * Filters the HTML attributes of choice label.
 *
 * @param array $attributes Attributes [name => value].
 * @param array $question   Choice.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/extensions/activated#
/**
 * Filters the list of activated extensions.
 *
 * @param array $activatedExtension Array of extensions information.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/form/pages#
/**
 * Filters the form pages.
 *
 * @param array                                           $pages Form pages.
 * @param \TotalPoll\Contracts\Poll\Model                 $poll  Poll model object.
 * @param \TotalPollVendors\TotalCore\Contracts\Form\Form $form  Form object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/form/buttons#
/**
 * Filters the form buttons.
 *
 * @param array                                           $buttons Form buttons.
 * @param \TotalPoll\Contracts\Poll\Model                 $poll    Poll model object.
 * @param \TotalPollVendors\TotalCore\Contracts\Form\Form $form    Form object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/attributes#
/**
 * Filters the poll attributes.
 *
 * @param array                           $attributes Poll model attributes.
 * @param \TotalPoll\Contracts\Poll\Model $poll       Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/settings#
/**
 * Filters the poll attributes.
 *
 * @param array                           $settings Poll settings.
 * @param \TotalPoll\Contracts\Poll\Model $poll     Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/settings-item/{$needle}#
/**
 * Filters the poll settings item.
 *
 * @param array                           $settings Poll settings.
 * @param string                          $default  Default value.
 * @param \TotalPoll\Contracts\Poll\Model $poll     Poll model object.
 *
 * @since 4.0.0
 * @return mixed
 */
totalpoll/filters/poll/seo#
/**
 * Filters the poll seo attributes.
 *
 * @param array                           $seo  SEO attributes.
 * @param \TotalPoll\Contracts\Poll\Model $poll Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/share#
/**
 * Filters the poll sharing attributes.
 *
 * @param array                           $attributes Sharing attributes.
 * @param \TotalPoll\Contracts\Poll\Model $poll       Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/thumbnail#
/**
 * Filters the poll thumbnail.
 *
 * @param array                           $attributes Poll model attributes.
 * @param \TotalPoll\Contracts\Poll\Model $poll       Poll model object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/poll/url#
/**
 * Filters the poll urls.
 *
 * @param string                          $url  URL.
 * @param array                           $args Arguments.
 * @param \TotalPoll\Contracts\Poll\Model $poll Poll model object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/poll/ajax-url#
/**
 * Filters the poll AJAX urls.
 *
 * @param string                          $url  URL.
 * @param array                           $args Arguments.
 * @param \TotalPoll\Contracts\Poll\Model $poll Poll model object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/poll/fields#
/**
 * Filters the poll custom fields.
 *
 * @param array                           $fields Poll custom fields.
 * @param \TotalPoll\Contracts\Poll\Model $poll   Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/has-voted#
/**
 * Filters whether current user has voted before.
 *
 * @param bool                            $hasVoted Whether current user has voted or not.
 * @param \TotalPoll\Contracts\Poll\Model $poll     Poll model object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/poll/accept-vote#
/**
 * Filters whether the poll is accepting new votes or not.
 *
 * @param bool                            $acceptVotes True when new votes are accepted otherwise false.
 * @param \TotalPoll\Contracts\Poll\Model $poll        Poll model object.
 *
 * @since 4.0.0
 * @return bool
 */
totalpoll/filters/poll/results-hidden#
/**
 * Filters the poll results visibility.
 *
 * @param bool                            $hidden True when hidden otherwise false.
 * @param \TotalPoll\Contracts\Poll\Model $poll   Poll model object.
 *
 * @since 4.0.0
 * @return bool
 */
totalpoll/filters/cpt/name#
/**
 * Filters the name of poll CPT.
 *
 * @param string $name CPT name.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/cpt/args#
/**
 * Filters the arguments of poll CPT.
 *
 * @param array $args CPT arguments.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/render/template#
/**
 * Filters the template used for poll rendering.
 *
 * @param Template  $template Template object.
 * @param PollModel $poll     Poll model object.
 * @param Renderer  $render   Renderer object.
 *
 * @since 4.0.0
 * @return Template
 */
totalpoll/filters/render/screen#
/**
 * Filters the poll screen when rendering.
 *
 * @param string    $screen Poll screen name.
 * @param PollModel $poll   Poll model object.
 * @param Renderer  $render Renderer object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/render/vars#
/**
 * Filters template variables passed to views.
 *
 * @param array     $templateVars Template variables.
 * @param PollModel $poll         Poll model object.
 * @param Renderer  $render       Renderer object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/render/classes#
/**
 * Filters css classes of poll container.
 *
 * @param array     $cssClasses Css classes.
 * @param PollModel $poll       Poll model object.
 * @param Renderer  $render     Renderer object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/render/output#
/**
 * Filters the rendered output.
 *
 * @param string    $rendered Rendered poll.
 * @param PollModel $poll     Poll model object.
 * @param Renderer  $render   Renderer object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/render/config#
/**
 * Filters poll config that will passed to frontend controller.
 *
 * @param array     $config Config variables.
 * @param PollModel $poll   Poll model object.
 * @param Renderer  $render Renderer object.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/render/css#
/**
 * Filters poll CSS.
 *
 * @param string    $css    CSS Code.
 * @param PollModel $poll   Poll model object.
 * @param Renderer  $render Renderer object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/render/js#
/**
 * Filters poll JS.
 *
 * @param string    $js     JS code.
 * @param PollModel $poll   Poll model object.
 * @param Renderer  $render Renderer object.
 *
 * @since 4.0.0
 * @return string
 */
totalpoll/filters/polls/get/query#
/**
 * Filters the list of arguments used for get polls query.
 *
 * @param array $wpQueryArgs WP_Query arguments.
 * @param array $args        Arguments.
 * @param array $query       Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/polls/get/results#
/**
 * Filters the results of get polls query.
 *
 * @param \TotalPoll\Contracts\Poll\Model[] $pollModels  Polls models.
 * @param array                             $wpQueryArgs WP_Query arguments.
 * @param array                             $args        Arguments.
 * @param array                             $query       Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/polls/get/attributes#
/**
 * Filters the poll model attributes after retrieving.
 *
 * @param array $attributes Entry attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/polls/get/model#
/**
 * Filters the poll model after creation and before adding it to container.
 *
 * @param \TotalPoll\Contracts\Poll\Model $model      Poll model object.
 * @param array                           $attributes Poll attributes.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/polls/votes/query#
/**
 * Filters the list of where clauses used in votes counting query.
 *
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */
totalpoll/filters/polls/votes/results#
/**
 * Filters the results of votes counting query.
 *
 * @param array $votes Array of choices [choiceUid => votes].
 * @param array $args  Arguments.
 * @param array $query Query.
 *
 * @since 4.0.0
 * @return array
 */