Tribe__Events__Organizer::edit_organizer_admin_bar_menu_link( WP_Admin_Bar $wp_admin_bar )

Add edit link to admin bar when viewing the tribe_organizer post type archive.


Parameters #

$wp_admin_bar

(WP_Admin_Bar) (Required) The admin bar object.


Top ↑

Source #

File: src/Tribe/Organizer.php

	public function edit_organizer_admin_bar_menu_link( $wp_admin_bar ) {
		global $wp_query;

		if ( ! is_admin() && $wp_query->tribe_is_event_organizer ) {

			$title = sprintf( esc_html__( 'Edit %s', 'the-events-calendar' ), $this->singular_organizer_label );

			$wp_admin_bar->add_menu([
				'id'    => 'edit',
				'title' => $title,
				'href'  => admin_url( 'post.php?post=' . $wp_query->queried_object->ID . '&action=edit' ),
			]);
		}
	}

Top ↑

Changelog #

Changelog
Version Description
5.16.3 Introduced.