Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security

Action & Filter Hooks for User Submitted Posts

The free version of my WordPress plugin User Submitted Posts is better than ever, with a wealth of new action and filter hooks, enabling developers to customize everything from shortcode output to post data, alert messages and more. Drop in for a quick summary of all new USP hooks.

USP Filter Hooks

Summary of all filter hooks available in User Submitted Posts.

  • usp_post_status — filters new post status
  • usp_post_type — filters new post type
  • usp_post_data — filters submitted post array before submission
  • usp_content_allowed — filters allowed tags in post content
  • usp_content_patterns — filters set of forbidden terms in post content
  • usp_content_replacements — filters set of replacements in post content
  • usp_editor_settings — filters wp_editor() parameters
  • usp_error_message — filters the returned error message
  • usp_post_moderate — filters post status for moderated posts
  • usp_post_publish — filters post status for published posts
  • usp_post_approve — filters submitted post status
  • usp_post_author — filters return value for replace author
  • usp_form_shortcode — filters shortcode form output
  • usp_mail_subject — filters email alert subject
  • usp_mail_message — filters email alert message
  • usp_new_post — filters new post array for submitted post
  • usp_input_validate — filters settings input validation
  • usp_post_draft — filters Draft Post Status
  • usp_image_args — filters auto-display get_posts() args
  • usp_image_title — filters auto-display image title
  • usp_image_thumb — filters auto-display thumb-size image
  • usp_image_medium — filters auto-display medium-size image
  • usp_image_large — filters auto-display large-size image
  • usp_image_full — filters auto-display full-size image
  • usp_image_custom_size — filters size for custom image size
  • usp_image_custom — filters auto-display custom-size image
  • usp_image_attachments — filters array of image attachments
  • usp_image_attachments_args — filters array of attachment arguments
  • usp_author_custom_field — filters auto-display post author
  • usp_email_custom_field — filters auto-display email address
  • usp_url_custom_field — filters auto-display submitted URL
  • usp_custom_custom_field — filters auto-display Custom Field
  • usp_default_title — filters the default Post Title
  • usp_require_login — filters the “login required” text
  • usp_editor_content — filters predefined content for the visual editor
  • usp_return_form — filters markup for custom-redirect error messages
  • usp_max_users — filters number of users for “Assigned Author” option
  • usp_post_type_options — filters post type options array
  • usp_require_login_url — filters URL for “login required” message
  • usp_file_name — filters uploaded file name
  • usp_unique_filename — filters string appended to duplicate file names
  • usp_meta_box_post_types — filters array of post types for USP Meta Box
  • usp_pll_set_post_language — toggles between “default” and “current” functions for Polylang’s pll_set_post_language() function
  • usp_filter_posts_link — filters output of “USP” sort-posts button

USP Action Hooks

Summary of all action hooks available in User Submitted Posts.

  • usp_submit_success — action fired after successful post-submission
  • usp_submit_error — action fired for any post-submission error
  • usp_insert_before — action fired immediately after post insertion
  • usp_insert_after — action fired immediately before post insertion
  • usp_files_before — action fired immediately before file upload
  • usp_files_after — action fired immediately after file upload

For advanced control over front-end form submission, check out the premium version of User Submitted Posts, USP Pro. It can do unlimited forms and features waay more functionality than the free version.

References and Resources

About the Author
Jeff Starr = Web Developer. Book Author. Secretly Important.
Banhammer: Protect your WordPress site against threats.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
Wizard’s SQL for WordPress: Over 300+ recipes! Check the Demo »
Thoughts
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Crazy that we’re almost halfway thru 2024.
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.