install_plugins_upload

Upload from zip.

Description

install_plugins_upload(); 

Usage

  1. if ( !function_exists( 'install_plugins_upload' ) ) { 
  2. require_once ABSPATH . '/wp-admin/includes/plugin-install.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = install_plugins_upload(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-admin/includes/plugin-install.php  
  1. function install_plugins_upload() { 
  2. ?> 
  3. <div class="upload-plugin"> 
  4. <p class="install-help"><?php _e('If you have a plugin in a .zip format, you may install it by uploading it here.'); ?></p> 
  5. <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url('update.php?action=upload-plugin'); ?>"> 
  6. <?php wp_nonce_field( 'plugin-upload' ); ?> 
  7. <label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label> 
  8. <input type="file" id="pluginzip" name="pluginzip" /> 
  9. <?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?> 
  10. </form> 
  11. </div> 
  12. <?php