install_themes_upload

The WordPress Core install themes upload function.

Description

install_themes_upload(); 

Usage

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

Defined (1)

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

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