Tribe__Tickets__Editor::hook()
Hooks actions from the editor into the correct places
Return
(bool)
Source
File: src/Tribe/Editor.php
public function hook() {
// Add Rest API support
add_filter( 'tribe_tickets_register_ticket_post_type_args', array( $this, 'add_rest_support' ) );
// Update Post content to use correct child blocks for tickets
add_filter( 'tribe_blocks_editor_update_classic_content', array( $this, 'update_tickets_block_with_childs' ), 10, 3 );
// Add RSVP and tickets blocks
add_action( 'admin_init', array( $this, 'add_tickets_block_in_editor' ) );
add_filter( 'tribe_events_editor_default_classic_template', array( $this, 'filter_default_template_classic_blocks' ), 15 );
add_action( 'tribe_events_tickets_post_capacity', tribe_callback( 'tickets.admin.views', 'template', 'editor/button-view-orders' ) );
add_action( 'tribe_events_tickets_metabox_edit_main', array( $this, 'filter_get_price_fields' ), 10, 2 );
add_action( 'tribe_events_tickets_capacity', tribe_callback( 'tickets.admin.views', 'template', 'editor/total-capacity' ) );
add_action( 'tribe_events_tickets_ticket_table_add_header_column', tribe_callback( 'tickets.admin.views', 'template', 'editor/column-head-price' ) );
add_action( 'tribe_events_tickets_ticket_table_add_tbody_column', array( $this, 'add_column_content_price' ), 10, 2 );
// Maybe add flag from classic editor
add_action( 'load-post.php', array( $this, 'flush_blocks' ), 0 );
add_action( 'tribe_tickets_update_blocks_from_classic_editor', array( $this, 'update_blocks' ) );
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |