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

How to use post-upload-ui action in WordPress

Sandeep Kumar Mishra
Sandeep Kumar Mishra
February 23, 2023
5 minutes read

post-upload-ui action

Fires on the post upload UI screen. Legacy (pre-3.5.0) media workflow hook.

    do_action( 'post-upload-ui' )
    

Description

This is an action hook that fires on the post upload UI screen. It consists of no parameters. It is used by media_upload_form() hook which generates the legacy media upload form and wp_print_media_templates() that print the templates used in the media manager.

Parameters

  • No parameters

Live Example

Running the Hook

To run the hook, copy the example below.

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

Adding a Hook Callback

The following example is for adding a hook callback.

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

Removing a Hook Callback

To remove a hook callback, use the example below.

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

Access Premium WordPress Plugins

Contact Us

If you need customization or have any questions, feel free to contact us.

Sandeep Kumar Mishra

Sandeep Kumar Mishra

Sandeep Kumar Mishra writes about WordPress and Artificial Intelligence, offering tips and guides to help you master your website and stay updated with the latest tech trends.

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.