Tribe__Events__Pro__Editor::register_additional_fields_category( array<array> $categories, WP_Post $post )
Add the event custom fields on post that are events only
Contents
Parameters
- $categories
-
(<span class="array<arrayarray<array<string|>">string>>) (Required) An array of categories each an array in the format property => value.
- $post
-
(WP_Post) (Required) The post object we're editing.
Return
(array)
Source
File: src/Tribe/Editor.php
public function register_additional_fields_category( $categories, $post ) {
if ( ! tribe_is_event( $post ) ) {
return $categories;
}
return array_merge(
$categories,
array(
array(
'slug' => 'tribe-events-pro-additional-fields',
'title' => __( 'Additional Fields', 'events-pro' ),
),
)
);
}
Changelog
| Version | Description |
|---|---|
| 4.5 | Introduced. |