函数原型
media_upload_tabs(): string[]
函数描述
Defines the default media upload tabs.
是否弃用
未弃用
函数参数
无
函数返回值
string[] Default tabs.
函数位置
File: wp-admin/includes/media.php.
函数源码
function media_upload_tabs() {
$_default_tabs = array(
'type' => __( 'From Computer' ), // Handler action suffix => tab text.
'type_url' => __( 'From URL' ),
'gallery' => __( 'Gallery' ),
'library' => __( 'Media Library' ),
);
/**
* Filters the available tabs in the legacy (pre-3.5.0) media popup.
*
* @since 2.5.0
*
* @param string[] $_default_tabs An array of media tabs.
*/
return apply_filters( 'media_upload_tabs', $_default_tabs );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.5.0 | Introduced. |

