User Post Collections 0.9.3 has 58 actions and 55 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 User Post Collections fires an action
add_action( 'mg_upc_after_archive_content', function() {
// Your code runs here.
}, 10, 1 );
// Change a value User Post Collections is about to use
add_filter( 'mg_upc_content_allowed_tags', function( $allowed_tags ) {
// Change $allowed_tags here.
return $allowed_tags;
}, 10, 1 );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
-
/** * Hook: mg_upc_after_single_list_summary. */ do_action( 'mg_upc_after_archive_content' ); -
/** * mg_upc_after_main_content hook. */ do_action( 'mg_upc_after_main_content' ); -
/** * mg_upc_before_main_content hook. */ do_action( 'mg_upc_before_main_content' ); -
/** * Hook: mg_upc_before_shortcode_404. */ do_action( 'mg_upc_before_shortcode_404' ); -
/** * Hook: mg_upc_after_empty_items. */ do_action( 'mg_upc_after_empty_items' ); -
/** * Hook: mg_upc_after_items_loop. */ do_action( 'mg_upc_after_items_loop' ); -
/** * Hook: mg_upc_after_single_list_summary. */ do_action( 'mg_upc_after_single_list_content' ); -
/** * Hook: mg_upc_after_single_list_summary. */ do_action( 'mg_upc_after_single_list_summary' ); -
/** * Hook: mg_upc_before_archive. */ do_action( 'mg_upc_before_archive' ); -
/** * Hook: mg_upc_before_archive_content. */ do_action( 'mg_upc_before_archive_content' ); -
/** * Hook: mg_upc_before_empty_items. */ do_action( 'mg_upc_before_empty_items' ); -
/** * Hook: mg_upc_before_item_loop. */ do_action( 'mg_upc_before_item_loop' ); -
/** * Hook: mg_upc_before_single_list. */ do_action( 'mg_upc_before_single_list' ); -
/** * Hook: mg_upc_before_single_list_content. */ do_action( 'mg_upc_before_single_list_content' ); -
/** * Add allowed html tags allowed for list content */ apply_filters( 'mg_upc_content_allowed_tags', $allowed_tags ); -
/** * Filters whether a list status is considered "viewable". */ apply_filters( 'mg_upc_is_list_status_viewable', $is_viewable, $list_status ); -
/** * Filters whether a post type is considered "viewable". */ apply_filters( 'mg_upc_is_list_type_viewable', $is_viewable, $list_type ); -
/** * Hook: mg_upc_items_loop. */ do_action( 'mg_upc_items_loop' ); -
/** * Hook: mg_upc_loop_empty. */ do_action( 'mg_upc_loop_empty' ); -
/** * Fires once the loop has ended. */ do_action_ref_array( 'mg_upc_loop_end', array( &$this ) ); -
/** * Fires if no results are found in a list query. */ do_action( 'mg_upc_loop_no_results', $this ); -
/** * Hook: mg_upc_loop_product_buttons. */ do_action( 'mg_upc_loop_product_buttons' ); -
/** * Hook: mg_upc_loop_single_list_content. */ do_action( 'mg_upc_loop_single_list_content' ); -
/** * Fires once the loop is started. */ do_action_ref_array( 'mg_upc_loop_start', array( &$this ) ); -
/** * Hook: mg_upc_no_items_found. */ do_action( 'mg_upc_no_items_found' ); -
/** * Fires after the main query vars have been parsed. */ do_action_ref_array( 'mg_upc_parse_query', array( &$this ) ); -
/** * Filter for item to save. If return WP_Error, the operation is canceled. */ apply_filters( 'mg_upc_pre_add_item', $to_save, $list_before, $request ); -
/** * Fires after a specific list type is registered. */ do_action( "mg_upc_registered_type_{$list_type}", $list_type, $list_type_object ); -
/** * Fires after a 404 is triggered. */ do_action_ref_array( 'mg_upc_set_404', array( $this ) ); -
/** * If return false dont print */ apply_filters( 'mg_upc_settings_pre_print', true ); -
/** * Hook: mg_upc_single_list_content. */ do_action( 'mg_upc_single_list_content' ); -
/** * Hook: mg_upc_single_list_item_action. */ do_action( 'mg_upc_single_list_item_action' ); -
/** * Hook: mg_upc_single_list_item_after_data. */ do_action( 'mg_upc_single_list_item_after_data' ); -
/** * Hook: mg_upc_single_list_item_after_description. */ do_action( 'mg_upc_single_list_item_after_description' ); -
/** * Hook: mg_upc_single_list_item_after_last_child. */ do_action( 'mg_upc_single_list_item_after_last_child' ); -
/** * Hook: mg_upc_single_list_item_after_title. */ do_action( 'mg_upc_single_list_item_after_title' ); -
/** * Hook: mg_upc_single_list_item_before_first_child. */ do_action( 'mg_upc_single_list_item_before_first_child' ); -
/** * Hook: mg_upc_single_product_buttons. */ do_action( 'mg_upc_single_product_buttons' ); -
/** * Filters the list content. */ apply_filters( 'mg_upc_the_content', $content ); -
/** * Fires once the list data has been set up. */ do_action_ref_array( 'mg_upc_the_list', array( &$collection, &$this ) ); -
/** * Fires after the query variable object is created, but before the actual * query is run. */ do_action_ref_array( 'pre_get_lists', array( &$this ) ); -
/** * Filters the arguments for registering a specific list type. */ apply_filters( "register_{$list_type}_list_type_args", $args, $this->name ); -
/** * Filters the arguments for registering a list type. */ apply_filters( 'register_list_type_args', $args, $this->name ); -
/** * Fires after a list type is registered. */ do_action( 'registered_list_type', $list_type, $list_type_object ); -
/** * This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_excerpt', $excerpt ); -
apply_filters( 'mg_upc_base_url', '' ); -
apply_filters( 'mg_upc_items_pagination_args', array( 'base' => $base, 'format' => $format, 'add_args' => false, 'current' => max( 1, $current ), 'total' => $total, 'prev_text' => is_rtl() ? '→' : '←', 'next_text' => is_rtl() ? '←' : '→', 'type' => 'list', 'end_size' => 3, 'mid_size' => 3, ) ); -
apply_filters( 'mg_upc_list_author_url', $list_data['user_link'], $user, $list_data ); -
apply_filters( 'woocommerce_empty_price_html', '', $this ); -
apply_filters( 'anh_enqueue_message', $message ); -
apply_filters( 'get_the_excerpt', $post->post_excerpt, $post ); -
apply_filters( 'initial_always_exist_list', $list, $always_exist_type ); -
apply_filters( "mg_post_item_{$post->post_type}_for_response", $data, $config ); -
apply_filters( 'mg_post_item_for_response', $data, $config ); -
apply_filters( 'mg_prepare_item_for_response', $data, $config ); -
do_action( 'mg_upc_add_item', $data, $ok ); -
do_action( 'mg_upc_add_vote', $data, $ok ); -
do_action( 'mg_upc_after_loop_empty' ); -
do_action( 'mg_upc_after_single_list' ); -
do_action( 'mg_upc_after_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] ); -
apply_filters( 'mg_upc_api_schema_item', $item_schema ); -
apply_filters( 'mg_upc_api_schema_list', $this->schema ); -
apply_filters( 'mg_upc_before_list_type_options_saved_set', $args, $this->name ); -
do_action( 'mg_upc_before_loop_empty' ); -
do_action( 'mg_upc_before_template_part', $action_args['template_name'], $action_args['template_path'], $action_args['located'], $action_args['args'] ); -
apply_filters( 'mg_upc_can_vote', $ret, $list_id ); -
apply_filters_ref_array( 'mg_upc_get_lists', array( $this->lists, &$this ) ); -
apply_filters( 'mg_upc_get_template', $template, $template_name, $args, $template_path, $default_path ); -
apply_filters( 'mg_upc_get_template_part', $template, $slug, $name ); -
apply_filters( 'mg_upc_get_the_permalink', '', $list ); -
apply_filters( 'mg_upc_grant_initial_to_all', $grant_listing, $role, $list_type ); -
do_action( 'mg_upc_item_move', $list_id, $post_id, $to ); -
apply_filters( 'mg_upc_list_author_img', $img, $this->user, (array) $this ); -
apply_filters( 'mg_upc_list_author_user_login', $user_login, $this->user, (array) $this ); -
apply_filters( 'mg_upc_list_doc_title_replace', $new_title, $old_title, $presentation ); -
apply_filters( 'mg_upc_list_support', $has_feature, $list, $feature ); -
apply_filters( 'mg_upc_list_url', null, $this ); -
do_action( 'mg_upc_loaded' ); -
apply_filters( 'mg_upc_locate_template', $template, $template_name, $template_path ); -
apply_filters( 'mg_upc_maintenance_hour', 1 ); -
apply_filters( 'mg_upc_pre_can_vote', $ret, $list_id ); -
do_action( 'mg_upc_pre_remove_item', $list_id, $post_id, $deleted_items ); -
do_action( 'mg_upc_remove_item', $list_id, $post_id, $deleted_count ); -
do_action( 'mg_upc_remove_votes', $filters, $deleted_count ); -
apply_filters( 'mg_upc_save_grant_edit', $grant_listing, $list_type, $role ); -
apply_filters( 'mg_upc_settings_array_can_remove_item', $args['can_remove'], $args, $item ); -
do_action( 'mg_upc_settings_array_end_item', $array_value, $item_index, $args ); -
do_action( 'mg_upc_settings_array_pre_item', $array_value, $item_index, $args ); -
do_action( 'mg_upc_settings_enqueue' ); -
apply_filters( 'mg_upc_settings_field_render_args', $args, $section_id, $option, $label, $option_input_name, $option_id, $type, $value ); -
apply_filters( 'mg_upc_settings_fields', $settings_fields ); -
apply_filters( 'mg_upc_settings_sections', $sections ); -
do_action( 'mg_upc_single_list_item_before_title' ); -
apply_filters( 'mg_upc_template_loader_files', array(), $default_file ); -
do_action( 'mg_upc_texts_loaded' ); -
apply_filters( 'mg_upc_the_permalink', mg_upc_get_the_permalink( $list ), $list ); -
apply_filters( 'mg_upc_the_title', $title, $id ); -
apply_filters( 'mg_upc_theme_slug_for_templates', get_option( 'template' ) ); -
apply_filters( "mg_upc_ttl_votes_{$list_type->name}", $this->helper->get_list_type_option( $list_type->name, 'ttl_votes', 365 ) ); -
do_action( "mg_upc_update_item_{$field}", $list_id, $post_id, $value ); -
do_action( 'mg_upc_vote', $list_id, $post_id ); -
apply_filters( 'mg_upc_vote_ip', $ip ); -
apply_filters( 'prepare_list_data_for_response', $list_data, $list, $config ); -
apply_filters( 'prepare_list_for_rest_response', $response, $list, $request ); -
apply_filters( 'rest_mg_upc_list_items_collection_params', $query_params ); -
apply_filters( 'rest_mg_upc_lists_collection_params', $query_params ); -
apply_filters( 'woocommerce_add_to_cart_fragments', array( 'div.widget_shopping_cart_content' => '<div class="widget_shopping_cart_content">' . $mini_cart . '</div>', ) ); -
apply_filters( 'woocommerce_add_to_cart_product_id', $product_id ); -
apply_filters( 'woocommerce_add_to_cart_validation', true, $product_id, $quantity ); -
do_action( 'woocommerce_ajax_added_to_cart', $product_id ); -
apply_filters( 'woocommerce_get_price_html', $price, $product ); -
do_action( "wsa_form_bottom_{$form['id']}", $form ); -
do_action( "wsa_form_top_{$form['id']}", $form );
Generated from User Post Collections'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: