Developers
Last updated on Jun 22, 2026
Developer Reference
AllFeedback can be extended through standard WordPress hooks, a shortcode, WP-CLI commands, and a REST API. All data is stored in your site's own database, and no external services are required. This reference documents the available extension points.
Action Hooks
Actions let you run custom code in response to events in AllFeedback.
allfeedback_response_submitted
Fires immediately after a visitor's response is saved.
Parameters
$response_id (int) — ID of the saved response
$survey_id (int) — ID of the survey the response belongs to
$survey (object) — the survey the response was submitted to
Example
add_action( 'allfeedback_response_submitted', function ( $response_id, $survey_id, $survey ) {
// Run a custom workflow with the new response.
}, 10, 3 );allfeedback_survey_created
Fires after a new survey is created.
Parameters
$survey (object) — the newly created survey
allfeedback_survey_updated
Fires after an existing survey is saved.
Parameters
$survey (object) — the updated survey
allfeedback_survey_deleted
Fires after a survey is deleted.
Parameters
$id (int) — ID of the deleted survey
$survey (object) — the survey that was deleted
Filter Hooks
Filters let you modify values and behaviour without changing plugin code. Each filter must return a value.
allfeedback_required_capability
Filters the capability required to manage AllFeedback in the admin.
Parameters
$capability (string) — the required capability. Default manage_options.
Example
add_filter( 'allfeedback_required_capability', function ( $capability ) {
return 'edit_pages';
} );allfeedback_allow_response_submission
Filters whether a submission is accepted. Return false to reject it.
Parameters
$allowed (bool) — whether the submission is allowed. Default true.
$survey_id (int) — ID of the target survey
$survey (object) — the target survey
allfeedback_submit_rate_limit
Filters the maximum number of submissions allowed per IP within the rate-limit window.
Parameters
$limit (int) — the maximum number of submissions. Default 10.
allfeedback_duplicate_window_hours
Filters the time window used to detect duplicate submissions.
Parameters
$hours (int) — duplicate window in hours. Default 0 (disabled).
$survey_id (int) — ID of the target survey
allfeedback_shortcode_survey_id
Filters which survey ID a shortcode renders.
Parameters
$survey_id (int) — the survey ID to render
allfeedback_content_search_post_types
Filters the post types available when targeting surveys to content.
Parameters
$post_types (array) — list of post type slugs. Default ['page', 'post'].
Shortcode
[allfeedback_survey]
Renders a published survey inline.
Attributes
id (int, required) — the ID of the survey to display. The survey must be published.
[allfeedback_survey id="123"]WP-CLI
Commands are registered under the wp allfeedback namespace.
wp allfeedback migrate # run any pending migrations
wp allfeedback migrate status # show the status of all migrationsDatabase
AllFeedback stores all data in three tables, prefixed with your site's table prefix:
wp_af_surveys — surveys, including questions, settings, styling, and targeting
wp_af_responses — submitted responses and their metadata
wp_af_survey_sessions — survey view and session data used for analytics
REST API
AllFeedback exposes a REST API under the /wp-json/allfeedback/v1/ namespace. Write endpoints require the manage_options capability; public submission endpoints are protected by a nonce.
No documents yet
No documentation has been published in this section yet.