我想添加新选项卡以上载管理器和内部列表图像
theme_folder/images/patterns
我尝试了这样的方法来添加选项卡,但它对我无效,因为它在media manager一侧添加选项卡,但在图像上载时,该选项卡不可见。function custom_media_upload_tab_name( $tabs ) {
$newtab = array( \'tab_slug\' => \'Patterns\' );
return array_merge( $tabs, $newtab );
}
add_filter( \'media_upload_tabs\', \'custom_media_upload_tab_name\' );
function custom_media_upload_tab_content() {
// Add you content here.
echo \'Hello content\';
}
add_action( \'media_upload_tab_slug\', \'custom_media_upload_tab_content\' );
确切地说,这是我想添加一个新选项卡的地方,在该选项卡中,我想列出主题文件夹中的图像。我知道media manager JS需要重写,但老实说,我不知道从哪里开始。看来我需要为media manager编写全新的模板才能实现这一点。
I went trough all suggestions but seems like no one is reading the question. As advised "I tried something like this to add a tab but it does not work for me since it is adding tabs on the side of media manager but on image upload that tab is not visible."
因此,目前还没有人能够找到解决方案。