Linux 软件免费装
Banner图

Viström Media Library Categories

开发者 vistromdigital
更新时间 2024年2月9日 22:48
PHP版本: 7.4 及以上
WordPress版本: 6.3.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media categories category library bulk-edit

下载

1.2.0 1.0.0 1.0.1 1.1.0 1.1.1

详情介绍:

Vistrom Media Library Categories provides the ability to categorize and filter your files in the WordPress media library. You can use it in the grid view, list view and in the media modal. The plugin also provides bulk actions to add or remove categories for multiple attachments at once.

安装:

屏幕截图:

  • Filter by taxonomies in media library grid.
  • Bulk-edit attachments in list-view.
  • Bulk-edit attachments in library grid.
  • Filter by taxonomies when selecting media.

常见问题:

I have custom taxonomies for attachments in my theme, how do i hide them from being rendered via the plugin?

Using the filter below, you can prevent taxonomies from being rendered as a result of this plugin. add_filter('vistrom_media_unsupported_taxonomy_names', function () { return [ 'names-to-blacklist' // Your taxonomy name ]; });

How can i add custom fields to the bulk edit views?

Using the actions below it's possible to add your own custom fields to each respective bulk edit view. The views are located in the following folder /views/admin/media/ ` // Grid modal add_action('vistrom_media_bulk_edit_grid_start', 'render_my_field'); add_action('vistrom_media_bulk_edit_grid_end', 'render_my_field'); // List view add_action('vistrom_media_bulk_edit_list_start', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_left_column_start', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_left_column_end', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_center_column_start', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_center_column_end', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_right_column_start', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_right_column_end', 'render_my_field'); add_action('vistrom_media_bulk_edit_list_end', 'render_my_field'); function render_my_field() { echo ""; } `

How can i save my custom added fields?

To save the fields added to the bulk edit views, you can use the following actions. All supported taxonomies are saved automatically. ` add_action('vistrom_media_before_bulk_update', 'save_my_field', 10, 2); add_action('vistrom_media_after_bulk_update', 'save_my_field', 10, 2); function save_my_field($postIds, $postData) { foreach ($postIds as $id) { update_post_meta($id, 'custom_field', $postData['custom_field']); } } `

更新日志:

1.2.0 1.1.1 1.1.0 1.0.1