
內容簡介
Easy Featured Images 使您更有效地將特色圖片分配給文章,特別是當您需要處理大量文章時。通常,您必須訪問每篇文章的編輯頁面,開啟媒體視窗並上傳/分配圖像。
啟用此外掛後,您可以在文章列表屏幕上執行此操作。一切均通過 AJAX 處理,因此圖像會立即分配,而不必等待頁面加載。它使用常規的 WordPress 媒體方塊,使外掛程式完全符合 WordPress。
Easy Featured Images 也支援 WooCommerce,太棒了!
您可以使用 efi/post_types 過濾器修改外掛程式功能所分配到的文章類型陣列。返回您要將外掛程式應用到的最終文章類型列表:
add_filter( 'efi/post_types', 'my_post_type_images' );
function my_post_type_images( $post_types ) {
unset( $post_types['page'] );
}
自 1.2.0 版起,本外掛程式有一個 efi/settings 過濾器,允許開發人員更改一些設置。目前可用的唯一設置是 show_thumbnail_preview,它可以設置為 true 或 false。
add_filter( 'efi/settings', 'my_efi_settings' );
function my_efi_settings( $settings ) {
$settings['show_thumbnail_preview'] = false;
return $settings
}
致謝
Tom McFarlin 為啟動媒體上傳程序的 JavaScript 提供了基礎
Cole Patrick 為外掛程式特色圖像提供了優秀的照片
Thomas Meyer 提供了德語翻譯。
外掛標籤
開發者團隊
原文外掛簡介
Easy Featured Images allows you to assign featured images to posts much more efficiently, especially if you have a number of posts to go through. Normally you have to visit the edit page of each post, launch the media window and upload/assign the image.
With the plugin enabled you can do this from the post list screen. Everything words via AJAX so images are assigned instantly, without having to wait for pages to load. It uses the regular WordPress media box making the plugin 100% WordPress awesome.
Easy Featured Images also support WooCommerce, yay!
You can use the efi/post_types filter to modify the array of post types that the plugin’s functionality is assigned to. Return the final list of post types you want the plugin to be applied to:
add_filter( 'efi/post_types', 'my_post_type_images' );
function my_post_type_images( $post_types ) {
unset( $post_types['page'] );
}
As of 1.2.0 the plugin has an efi/settings filter which allows developers to change some settings. For now the only setting available is show_thumbnail_preview which can be set to true or false.
add_filter( 'efi/settings', 'my_efi_settings' );
function my_efi_settings( $settings ) {
$settings['show_thumbnail_preview'] = false;
return $settings
}
Thanks
Tom McFarlin for the basis of the Javascript that initiates the media uploader
Cole Patrick for the fantastic photo for the plugin’s featured image
Thomas Meyer for the German translation.
