install_themes_upload

函数
install_themes_upload ( No parameters )

install_themes_upload: 这个函数用来显示WordPress安装的主题上传表格。它输出主题上传表格的HTML代码。

显示一个从压缩文件上传主题的表格。

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

常见问题

FAQs
查看更多 >