Changeset 2995262
- Timestamp:
- 11/13/2023 03:49:33 PM (2 years ago)
- Location:
- admin-columns-for-acf-fields
- Files:
-
- 4 edited
-
tags/0.2.2/acf_admin_columns.php (modified) (1 diff)
-
tags/0.2.2/readme.txt (modified) (5 diffs)
-
trunk/acf_admin_columns.php (modified) (1 diff)
-
trunk/readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
admin-columns-for-acf-fields/tags/0.2.2/acf_admin_columns.php
r2994024 r2995262 4 4 * Plugin URI: https://wordpress.org/plugins/acf-admin-columns/ 5 5 * Description: Add columns for your ACF fields to post and taxonomy index pages in the WP backend. 6 * Version: 0.2. 16 * Version: 0.2.2 7 7 * Author: Florian Eickhorst 8 8 * Author URI: http://www.fleimedia.com/ -
admin-columns-for-acf-fields/tags/0.2.2/readme.txt
r2994024 r2995262 66 66 **Parameters** 67 67 68 $ fields - Array of all ACF fields to be shown in current screen.68 $acf_columns - Array of all ACF fields to be shown in current screen. Note that the column key is always prefixed with 'acf_'. 69 69 $field_groups - Array of all ACF field groups to be shown in current screen. 70 70 71 71 **Example:** 72 72 73 Remove 'my_field' from the columns of the post type 'my_custom_post_type', even if it is set to be shown in the field settings. 74 75 function my_admin_columns($ fields, $field_groups) {73 Remove 'my_field' from the columns of the post type 'my_custom_post_type', even if it is set to be shown in the field settings. Note that the column key is always prefixed with 'acf_'. 74 75 function my_admin_columns($acf_columns, $field_groups) { 76 76 77 77 $screen = get_current_screen(); 78 if (!empty($screen) && $screen->post_type == 'my_custom_post_type' && isset($ fields['my_field'])) {79 unset($ fields['my_field']);80 } 81 return $ fields;82 } 83 add_filter('acf/admin_columns/admin_columns','my_admin_columns', 10, 3);78 if (!empty($screen) && $screen->post_type == 'my_custom_post_type' && isset($acf_columns['acf_my_field'])) { 79 unset($acf_columns['acf_my_field']); // the key is always prefixed with 'acf_' 80 } 81 return $acf_columns; 82 } 83 add_filter('acf/admin_columns/admin_columns','my_admin_columns', 10, 2); 84 84 85 85 = "acf/admin_columns/sortable_columns" = … … 97 97 **Parameters** 98 98 99 $sort_order_type - The sort order type (either ' string' or 'numeric')99 $sort_order_type - The sort order type (either 'meta_value' or 'meta_value_num') 100 100 $field_properties - the ACF field properties 101 101 … … 160 160 = "acf/admin_columns/default_value" = 161 161 162 Allows you to override the default value for a certain field if it is empty. This only works, if the field has a default value set in the field settings.162 Allows you to override the default value for a certain field if it is empty. This only applies, if the field has a default value set in the field settings. 163 163 164 164 **Parameters** … … 335 335 add_filter('acf/admin_columns/exclude_field_types','my_exclude_field_types'); 336 336 337 = "acf/admin_columns/preview_image_url" =338 Allows for manipulation of the url of the preview image.339 340 **Parameters**341 $preview_image_url - string with image url342 343 344 337 == Installation == 345 338 … … 352 345 == Frequently Asked Questions == 353 346 354 = == How can I change the preview image size of image and gallery fields? ===347 = How can I change the preview image size of image and gallery fields? = 355 348 356 349 Use the filter "acf/admin_columns/preview_image_size" to change the preview image size. See "Filters" section above for details. -
admin-columns-for-acf-fields/trunk/acf_admin_columns.php
r2994022 r2995262 4 4 * Plugin URI: https://wordpress.org/plugins/acf-admin-columns/ 5 5 * Description: Add columns for your ACF fields to post and taxonomy index pages in the WP backend. 6 * Version: 0.2. 16 * Version: 0.2.2 7 7 * Author: Florian Eickhorst 8 8 * Author URI: http://www.fleimedia.com/ -
admin-columns-for-acf-fields/trunk/readme.txt
r2994023 r2995262 66 66 **Parameters** 67 67 68 $ fields - Array of all ACF fields to be shown in current screen.68 $acf_columns - Array of all ACF fields to be shown in current screen. Note that the column key is always prefixed with 'acf_'. 69 69 $field_groups - Array of all ACF field groups to be shown in current screen. 70 70 71 71 **Example:** 72 72 73 Remove 'my_field' from the columns of the post type 'my_custom_post_type', even if it is set to be shown in the field settings. 74 75 function my_admin_columns($ fields, $field_groups) {73 Remove 'my_field' from the columns of the post type 'my_custom_post_type', even if it is set to be shown in the field settings. Note that the column key is always prefixed with 'acf_'. 74 75 function my_admin_columns($acf_columns, $field_groups) { 76 76 77 77 $screen = get_current_screen(); 78 if (!empty($screen) && $screen->post_type == 'my_custom_post_type' && isset($ fields['my_field'])) {79 unset($ fields['my_field']);80 } 81 return $ fields;82 } 83 add_filter('acf/admin_columns/admin_columns','my_admin_columns', 10, 3);78 if (!empty($screen) && $screen->post_type == 'my_custom_post_type' && isset($acf_columns['acf_my_field'])) { 79 unset($acf_columns['acf_my_field']); // the key is always prefixed with 'acf_' 80 } 81 return $acf_columns; 82 } 83 add_filter('acf/admin_columns/admin_columns','my_admin_columns', 10, 2); 84 84 85 85 = "acf/admin_columns/sortable_columns" = … … 97 97 **Parameters** 98 98 99 $sort_order_type - The sort order type (either ' string' or 'numeric')99 $sort_order_type - The sort order type (either 'meta_value' or 'meta_value_num') 100 100 $field_properties - the ACF field properties 101 101 … … 160 160 = "acf/admin_columns/default_value" = 161 161 162 Allows you to override the default value for a certain field if it is empty. This only works, if the field has a default value set in the field settings.162 Allows you to override the default value for a certain field if it is empty. This only applies, if the field has a default value set in the field settings. 163 163 164 164 **Parameters** … … 335 335 add_filter('acf/admin_columns/exclude_field_types','my_exclude_field_types'); 336 336 337 = "acf/admin_columns/preview_image_url" =338 Allows for manipulation of the url of the preview image.339 340 **Parameters**341 $preview_image_url - string with image url342 343 344 337 == Installation == 345 338 … … 352 345 == Frequently Asked Questions == 353 346 354 = == How can I change the preview image size of image and gallery fields? ===347 = How can I change the preview image size of image and gallery fields? = 355 348 356 349 Use the filter "acf/admin_columns/preview_image_size" to change the preview image size. See "Filters" section above for details.
Note: See TracChangeset
for help on using the changeset viewer.