Action hook 'install_plugins_pre_upload'

in WP Core File wp-admin/plugin-install.php at line 90

View Source

install_plugins_pre_upload

Action Hook
Description
Fires before each tab on the Install Plugins screen is loaded. The dynamic portion of the hook name, `$tab`, allows for targeting individual tabs. Possible hook names include: - `install_plugins_pre_beta` - `install_plugins_pre_favorites` - `install_plugins_pre_featured` - `install_plugins_pre_plugin-information` - `install_plugins_pre_popular` - `install_plugins_pre_recommended` - `install_plugins_pre_search` - `install_plugins_pre_upload` / do_action( "install_plugins_pre_{$tab}" ); /* Call the pre upload action on every non-upload plugin installation screen because the form is always displayed on these screens.

Hook Information

File Location wp-admin/plugin-install.php View on GitHub
Hook Type Action
Line Number 90

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into install_plugins_pre_upload
add_action('install_plugins_pre_upload', 'my_custom_function');

function my_custom_function() {
    // Your custom code here
}

Source Code Context

wp-admin/plugin-install.php:90 - How this hook is used in WordPress core
<?php
  85   * Call the pre upload action on every non-upload plugin installation screen
  86   * because the form is always displayed on these screens.
  87   */
  88  if ( 'upload' !== $tab ) {
  89  	/** This action is documented in wp-admin/plugin-install.php */
  90  	do_action( 'install_plugins_pre_upload' );
  91  }
  92  
  93  get_current_screen()->add_help_tab(
  94  	array(
  95  		'id'      => 'overview',

PHP Documentation

<?php
/**
 * Fires before each tab on the Install Plugins screen is loaded.
 *
 * The dynamic portion of the hook name, `$tab`, allows for targeting
 * individual tabs.
 *
 * Possible hook names include:
 *
 *  - `install_plugins_pre_beta`
 *  - `install_plugins_pre_favorites`
 *  - `install_plugins_pre_featured`
 *  - `install_plugins_pre_plugin-information`
 *  - `install_plugins_pre_popular`
 *  - `install_plugins_pre_recommended`
 *  - `install_plugins_pre_search`
 *  - `install_plugins_pre_upload`
 *
 * @since 2.7.0
 */
do_action( "install_plugins_pre_{$tab}" );

/*
 * Call the pre upload action on every non-upload plugin installation screen
 * because the form is always displayed on these screens.
 */
Quick Info
  • Hook Type: Action
  • Parameters: 0
  • File: wp-admin/plugin-install.php
Related Hooks

Related hooks will be displayed here in future updates.