Provider::unregister()

Registers the implementations and filters required by the custom tables implementation to play nice with the existing code.

Contents


Source

File: src/Events_Pro/Custom_Tables/V1/Legacy_Compat/Provider.php

	public function unregister() {
		remove_action( 'init', [ $this, 'remove_legacy_init_hooks' ], 15 );
		remove_action( 'wp_before_admin_bar_render', [ $this, 'update_admin_bar' ] );
		remove_action( 'wp_ajax_gutenberg_events_pro_recurrence_queue', [ $this, 'no_queue' ], 1 );

		$pro            = Pro_Main::instance();
		$queue_realtime = $pro->queue_realtime;
		add_action( 'admin_head-post.php', [ $queue_realtime, 'post_editor' ] );
		add_action( 'wp_ajax_tribe_events_pro_recurrence_realtime_update', [ $queue_realtime, 'ajax' ] );

		if ( ! has_action( 'tribe_events_update_meta', [ Pro_Recurrence_Meta::class, 'updateRecurrenceMeta' ] ) ) {
			add_action( 'tribe_events_update_meta', [ Pro_Recurrence_Meta::class, 'updateRecurrenceMeta' ], 20, 2 );
		}

		add_action(
			'manage_' . TEC::POSTTYPE . '_posts_custom_column',
			[ Pro_Recurrence_Meta::class, 'populate_custom_list_table_columns' ],
			2
		);

		add_action(
			'manage_' . TEC::POSTTYPE . '_posts_columns',
			[ Pro_Recurrence_Meta::class, 'list_table_column_headers' ]
		);

		add_filter( 'wp', [ $pro, 'detect_recurrence_redirect' ] );
		add_filter( 'post_row_actions', [ Pro_Recurrence_Meta::class, 'edit_post_row_actions' ], 10, 2 );
		remove_filter( 'tribe_events_pro_editor_save_recurrence_meta', '__return_true' );
		add_action( 'tribe_events_pre_get_posts', [ $pro, 'setup_hide_recurrence_in_query' ] );
		remove_filter( 'tribe_settings_tab_fields', [ $this, 'rename_recurring_settings_on_admin' ] );
	}

Top ↑

Changelog

Changelog
Version Description
6.0.0 Introduced.