Exciting News! Flipper Code is now WePlugins! Same commitment to excellence, brand new identity.

How to use post-html-upload-ui action in WordPress

Sandeep Kumar Mishra
Sandeep Kumar Mishra
July 9, 2022
5 minutes read

post-html-upload-ui action

Fires after the upload button in the media upload interface.

do_action( 'post-html-upload-ui' )

Description

This is action hook , its fire after the upload button in the media upload interface.
Its consists of no parameter.
It is used by media_upload_form() hook which generate the legacy media upload form.

Parameters

  • No parameters

Live Example

To run the hook, copy the example below.

// run the action 
do_action( 'post-html-upload-ui',); 
  

The following example is for adding a hook callback.

// define the post-html-upload-ui callback 
function action_post_html_upload_ui(  ) { 
    // make action magic happen here... 
}; 
         
// add the action 
add_action( 'post-html-upload-ui', 'action_post_html_upload_ui', 10, 1 ); 

To remove a hook callback, use the example below.

// remove the action 
remove_action( 'post-html-upload-ui', 'action_post_html_upload_ui', 10, 1 ); 

Explore the latest in WordPress

Trying to stay on top of it all? Get the best tools, resources and inspiration sent to your inbox every Wednesday.