WP Vote Lite 1.2.0 has 35 actions and 69 filters, read directly from its source code on Nov 19, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when WP Vote Lite fires an action
add_action( 'wp_vote_before_main_content', function() {
// Your code runs here.
}, 10, 1 );
// Change a value WP Vote Lite is about to use
add_filter( 'cmb2_meta_box_url', function( $url_scheme, $arg2 ) {
// Change $url_scheme here.
return $url_scheme;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * wp-vote_before_main_content hook. */ do_action( 'wp_vote_before_main_content' ); -
/** * Fires before fields have been processed/saved. */ do_action( "cmb2_{$this->object_type()}_process_fields_{$this->cmb_id}", $this, $this->object_id() ); -
/** * Fires on the admin side when CMB2 is included/loaded. */ do_action( 'cmb2_admin_init' ); -
/** * Hook after form form has been rendered */ do_action( "cmb2_after_{$object_type}_form_{$this->cmb_id}", $object_id, $this ); -
/** * Hook after form form has been rendered */ do_action( 'cmb2_after_form', $this->cmb_id, $object_id, $object_type, $this ); -
/** * Fires after CMB2 initiation process has been completed */ do_action( 'cmb2_after_init' ); -
/** * Hook before form table begins */ do_action( "cmb2_before_{$object_type}_form_{$this->cmb_id}", $object_id, $this ); -
/** * Hook before form table begins */ do_action( 'cmb2_before_form', $this->cmb_id, $object_id, $object_type, $this ); -
/** * Fires when CMB2 is included/loaded */ do_action( 'cmb2_init' ); -
/** * Hook during initiation of CMB2 object */ do_action( "cmb2_init_{$this->cmb_id}", $this ); -
/** * Fires after all CMB2 instances are created */ do_action( 'cmb2_init_before_hookup' ); -
/** * Filter the CMB location url */ apply_filters( 'cmb2_meta_box_url', set_url_scheme( $cmb2_url ), CMB2_VERSION ); -
/** * For back-compat. Does the dirtywork of instantiating all the CMB2 instances * for the cmb2_meta_boxes filter */ apply_filters( 'cmb2_meta_boxes', array() ); -
/** * Filter field types that are non-repeatable. */ apply_filters( 'cmb2_non_repeatable_fields', array() ); -
/** * Filter whether to override removing of meta value. */ apply_filters( "cmb2_override_{$a['field_id']}_meta_remove", $override, $a, $this->args(), $this ); -
/** * Filter and parameters are documented for 'cmb2_override_meta_save' filter * (above). */ apply_filters( "cmb2_override_{$a['field_id']}_meta_save", $override, $a, $this->args(), $this ); -
/** * Filter and parameters are documented for 'cmb2_override_meta_value' filter * (above). */ apply_filters( "cmb2_override_{$a['field_id']}_meta_value", $data, $this->object_id, $a, $this ); -
/** * Filter whether to override removing of meta value. Returning a non-null * value will effectively short-circuit the function. */ apply_filters( 'cmb2_override_meta_remove', null, $a, $this->args(), $this ); -
/** * Filter whether to override saving of meta value. Returning a non-null value * will effectively short-circuit the function. */ apply_filters( 'cmb2_override_meta_save', null, $a, $this->args(), $this ); -
/** * Filter whether to override getting of meta value. Returning a non * 'cmb2_field_no_override_val' value will effectively short-circuit the value * retrieval. */ apply_filters( 'cmb2_override_meta_value', 'cmb2_field_no_override_val', $this->object_id, $a, $this ); -
/** * Pass non-existent field types through an action */ do_action( "cmb2_render_{$name}", $this->field, $this->field->escaped_value(), $this->field->object_id, $this->field->object_type, $this ); -
/** * By default, 'text_url' and 'text' fields get table-like styling */ apply_filters( 'cmb2_repeat_table_row_types', array( 'text_url', 'text', ) ); -
/** * Globally filter row classes */ apply_filters( 'cmb2_row_classes', implode( ' ', $classes ), $this ); -
/** * Filter the value before it is saved. */ apply_filters( "cmb2_sanitize_{$this->field->type()}", null, $this->value, $this->field->object_id, $this->field->args(), $this ); -
/** * Fires after all fields have been saved. */ do_action( "cmb2_save_{$object_type}_fields", $object_id, $this->cmb_id, $this->updated, $this ); -
/** * Fires after all fields have been saved. */ do_action( "cmb2_save_{$object_type}_fields_{$this->cmb_id}", $object_id, $this->updated, $this ); -
/** * Filter to determine if metabox should show. Default is true */ apply_filters( 'cmb2_show_on', $show, $this->cmb->meta_box, $this->cmb ); -
/** * This exists for back-compatibility, but validation is not what happens here. */ apply_filters( "cmb2_validate_{$this->field->type()}", $override_value, $this->value, $this->field->object_id, $this->field->args(), $this ); -
/** * wp_vote_after_shop_loop_item_title hook. */ do_action( 'wp_vote_after_ballot_loop_item_title' ); -
/** * wp_vote_after_main_content hook. */ do_action( 'wp_vote_after_main_content' ); -
/** * wp_vote_after_question_loop_item_title hook. */ do_action( 'wp_vote_after_question_loop_item_title' ); -
/** * wp_vote_archive_description hook. */ do_action( 'wp_vote_archive_description' ); -
/** * wp_vote_shop_loop_item_title hook. */ do_action( 'wp_vote_ballot_loop_item_title' ); -
/** * wp-vote_before_shop_loop_item hook. */ do_action( 'wp_vote_before_ballot_loop_item' ); -
/** * wp_vote_before_shop_loop_item_title hook. */ do_action( 'wp_vote_before_ballot_loop_item_title' ); -
/** * wp-vote_before_shop_loop hook. */ do_action( 'wp_vote_before_ballots_loop' ); -
/** * wp-vote_before_question_loop_item hook. */ do_action( 'wp_vote_before_question_loop_item' ); -
/** * wp_vote_before_question_loop_item_title hook. */ do_action( 'wp_vote_before_question_loop_item_title' ); -
/** * wp_vote_question_loop_item_title hook. */ do_action( 'wp_vote_question_loop_item_title' ); -
/** * wp-vote_sidebar hook. */ do_action( 'wp_vote_sidebar' ); -
/** * wp_vote_after_shop_loop_item hook. */ do_action( 'wp-vote_after_ballot_item' ); -
/** * wp-vote_after_shop_loop hook. */ do_action( 'wp-vote_after_ballots_loop' ); -
/** * wp-vote_before_single_ballot_loop hook. */ do_action( 'wp-vote_after_content_single_ballot_loop', get_the_ID() ); -
/** * wp-vote_after_main_content hook. */ do_action( 'wp-vote_after_main_content' ); -
/** * wp_vote_after_question_loop_item hook. */ do_action( 'wp-vote_after_question_item' ); -
/** * wp-vote_after_single_ballot__loop hook. */ do_action( 'wp-vote_after_single_ballot_loop', get_the_ID() ); -
/** * vote_before_single_ballot hook. */ do_action( 'wp-vote_before_single_ballot' ); -
/** * wp-vote_before_single_ballot_loop hook. */ do_action( 'wp-vote_before_single_ballot_loop', get_the_ID() ); -
/** * Allows you to override the options on the settings page */ apply_filters( 'wp-vote_option_metabox_values', array( array( 'name' => __( 'Allow access to ballots by other roles', 'wp_vote' ), 'desc' => __( 'Select which roles can create, edit and delete ballots and voters. Administrators can always access ballots.', 'wp_vote' ), 'id' => 'allowed_roles', 'type' => 'multicheck', 'select_all_button' => false, 'options' => $roles, ), array( 'name' => __( 'From Email name', 'wp_vote' ), 'desc' => __( 'The ... ); -
apply_filters( 'the_content', $question_description ); -
apply_filters( "wp-vote_answer_options_{self::$slug}", array( 'for' => __( 'For', 'wp-vote' ), 'against' => __( 'Against', 'wp-vote' ), 'abstain' => __( 'Abstain', 'wp-vote' ), ) ); -
apply_filters( 'wp-vote_is_allowed_to_vote', false ); -
apply_filters( 'display_voters_stats_html_template', '<li class="clearfix"><strong>%s</strong><h4>%s</h4><div>%s</div></li>' ); -
apply_filters( 'wp-vote_archive_title_template', '<h2>%s</h2>' ); -
apply_filters( 'wp-vote_no_stats_message', __( 'no stats', 'wp-vote' ) ); -
apply_filters( 'wp-vote_questions_create_checkbox', sprintf( '<input required="required" type="text" id="%1$s_id" name="%2$s">', esc_attr( 'text_label_' . $question_index ), Ballot::get_prefix( get_the_ID() . '_' . $question_index ) ) ); -
apply_filters( "cmb2_{$element}_attributes", $this->field->maybe_set_attributes( $args ), $defaults, $this->field, $this ); -
apply_filters( "cmb2_{$this->field->id()}_is_valid_img_ext", $is_valid, $file, $file_ext ); -
apply_filters( 'cmb2_all_or_nothing_types', array( 'select', 'radio', 'radio_inline', 'taxonomy_select', 'taxonomy_radio', 'taxonomy_radio_inline' ), $this ); -
apply_filters( 'cmb2_default_filter', $args['default'], $this ); -
apply_filters( 'cmb2_enqueue_css', true ); -
apply_filters( 'cmb2_enqueue_js', true ); -
apply_filters( 'cmb2_get_metabox_form', $form, $object_id, $cmb ); -
apply_filters( 'cmb2_get_metabox_form_format', $args['form_format'], $object_id, $cmb ); -
apply_filters( 'cmb2_localized_data', $l10n ); -
apply_filters( "cmb2_override_option_get_{$this->key}", 'cmb2_no_override_option_get', $default, $this ); -
apply_filters( "cmb2_override_option_save_{$this->key}", 'cmb2_no_override_option_save', $this->options, $this ); -
apply_filters( 'cmb2_script_dependencies', self::$dependencies ); -
apply_filters( 'cmb2_style_dependencies', array() ); -
apply_filters( "cmb2_taxonomy_radio_{$this->_id()}_default_value", apply_filters( 'cmb2_taxonomy_radio_default_value', '' ) ); -
apply_filters( 'cmb2_taxonomy_radio_default_value', '' ); -
apply_filters( "cmb2_taxonomy_select_{$this->_id()}_default_value", $option_none_value ); -
apply_filters( 'cmb2_taxonomy_select_default_value', '' ); -
apply_filters( "cmb2_types_esc_{$this->type()}", null, $meta_value, $this->args(), $this ); -
apply_filters( 'cmb2_valid_img_types', array( 'jpg', 'jpeg', 'png', 'gif', 'ico', 'icon' ) ); -
apply_filters( 'did_not_vote_question_message', __( 'No vote recorded.', 'wp-vote' ) ); -
apply_filters( 'plugin_locale', get_locale(), 'cmb2' ); -
apply_filters( 'show_question_html_template', '<li class="question type-%s question-%s clearfix"><h4>%s</h4><div>%s</div><ul class="responses">%s</ul></li>' ); -
apply_filters( 'wp_vote_option_tabs', array( 'wp-vote-options' => 'Settings' ) ); -
apply_filters( 'wp_vote_template_path', 'wp-vote/' ); -
do_action( 'wp-vote_after_single_ballot' ); -
apply_filters( 'wp-vote_answer_options_html', implode( ' ', $answer_options ) ); -
apply_filters( 'wp-vote_ballot_is_public', $can_vote, $wp_query->queried_object_id ); -
apply_filters( 'wp-vote_ballot_link_text', __( 'Vote Now', 'wp-vote' ) ); -
apply_filters( 'wp-vote_get_question_types', self::$question_types ); -
apply_filters( 'wp-vote_get_template_part', $template, $slug, $name ); -
apply_filters( 'wp-vote_get_voter_types', self::$voter_types ); -
apply_filters( 'wp-vote_is_allowed_to_see_question', false ); -
apply_filters( 'wp-vote_pagination_args', array( 'format' => '', 'add_args' => '', 'current' => max( 1, get_query_var( 'paged' ) ), 'total' => $wp_query->max_num_pages, 'prev_text' => '←', 'next_text' => '→', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3 ) ); -
apply_filters( 'wp-vote_recorded_message', __( 'Vote recorded', 'wp-vote' ) ); -
apply_filters( 'wp-vote_register_question_types', self::$question_types ); -
apply_filters( 'wp-vote_register_voter_types', self::$voter_types ); -
apply_filters( 'wp-vote_required_conditions', __( 'I accept', 'wp-vote' ) ); -
apply_filters( 'wp-vote_required_conditions_title', __( 'Required Conditions', 'wp-vote' ) ); -
apply_filters( 'wp-vote_show_page_title', true ); -
apply_filters( 'wp-vote_show_stats', true ); -
apply_filters( 'wp-vote_state_closed_message', __( 'This Ballot is now closed. We did not save your votes.', 'wp-vote' ), $state ); -
apply_filters( 'wp-vote_state_failed_message', __( 'We fail to save your votes. Check that you set all the votes', 'wp-vote' ), $state ); -
apply_filters( 'wp-vote_state_success_message', __( 'Saved. Thank you for your vote.', 'wp-vote' ), $state ); -
apply_filters( 'wp-vote_Submit_button_text', __( 'Submit Ballot', 'wp-vote' ) ); -
apply_filters( 'wp-vote-add-signature-text-default', sprintf( __( "To complete your vote, please type out your name, which serves as your E-signature, and click '%s' ", 'wp-vote' ), Template_Actions::get_submit_button_text() ) ); -
apply_filters( 'wp-vote-allowed-question-types', array( 'For_Withhold_Question', 'For_Against_Question', 'For_Against_Abstain_Question', ) ); -
apply_filters( 'wp-vote-allowed-voter-types', array( 'Basic_Individual_Voter', 'Single_Rep_Organization_Voter', ) ); -
apply_filters( 'wp-vote-email-representative-vote_rocord', $vote_record );
Generated from WP Vote Lite's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: