Tribe__Admin__Help_Page::get_plugins( string $plugin_name = null, boolean $is_active = true )

Get the list of plugins


Parameters

$plugin_name

(string) (Optional) If we should get only one plugin.

Default value: null

$is_active

(boolean) (Optional) If we only get active plugins.

Default value: true


Top ↑

Return

(array)


Top ↑

Source

File: src/Tribe/Admin/Help_Page.php

	public function get_plugins( $plugin_name = null, $is_active = true ) {
		$plugins = array();

		$plugins['the-events-calendar'] = array(
			'name'        => 'the-events-calendar',
			'title'       => esc_html__( 'The Events Calendar', 'tribe-common' ),
			'repo'        => 'https://wordpress.org/plugins/the-events-calendar/',
			'forum'       => 'https://wordpress.org/support/plugin/the-events-calendar/',
			'stars_url'   => 'https://wordpress.org/support/plugin/the-events-calendar/reviews/?filter=5',
			'description' => esc_html__( 'The Events Calendar is a carefully crafted, extensible plugin that lets you easily share your events.', 'tribe-common' ),
			'is_active'   => false,
			'version'     => null,
		);

		if ( class_exists( 'Tribe__Events__Main' ) ) {
			$plugins['the-events-calendar']['version'] = Tribe__Events__Main::VERSION;
			$plugins['the-events-calendar']['is_active'] = true;
		}

		$plugins['event-tickets'] = array(
			'name'        => 'event-tickets',
			'title'       => esc_html__( 'Event Tickets', 'tribe-common' ),
			'repo'        => 'https://wordpress.org/plugins/event-tickets/',
			'forum'       => 'https://wordpress.org/support/plugin/event-tickets',
			'stars_url'   => 'https://wordpress.org/support/plugin/event-tickets/reviews/?filter=5',
			'description' => esc_html__( 'Events Tickets is a carefully crafted, extensible plugin that lets you easily sell tickets for your events.', 'tribe-common' ),
			'is_active'   => false,
			'version'     => null,
		);

		if ( class_exists( 'Tribe__Tickets__Main' ) ) {
			$plugins['event-tickets']['version'] = Tribe__Tickets__Main::VERSION;
			$plugins['event-tickets']['is_active'] = true;
		}

		$plugins['advanced-post-manager'] = array(
			'name'        => 'advanced-post-manager',
			'title'       => esc_html__( 'Advanced Post Manager', 'tribe-common' ),
			'repo'        => 'https://wordpress.org/plugins/advanced-post-manager/',
			'forum'       => 'https://wordpress.org/support/plugin/advanced-post-manager/',
			'stars_url'   => 'https://wordpress.org/support/plugin/advanced-post-manager/reviews/?filter=5',
			'description' => esc_html__( 'Turbo charge your posts admin for any custom post type with sortable filters and columns, and auto-registration of metaboxes.', 'tribe-common' ),
			'is_active'   => false,
			'version'     => null,
		);

		if ( class_exists( 'Tribe_APM' ) ) {
			$plugins['advanced-post-manager']['version'] = 1;
			$plugins['advanced-post-manager']['is_active'] = true;
		}

		$plugins = (array) apply_filters( 'tribe_help_plugins', $plugins );

		// Only active ones?
		if ( true === $is_active ) {
			foreach ( $plugins as $key => $plugin ) {
				if ( true !== $plugin['is_active'] ) {
					unset( $plugins[ $key ] );
				}
			}
		}

		// Do the search
		if ( is_string( $plugin_name ) ) {
			if ( isset( $plugins[ $plugin_name ] ) ) {
				return $plugins[ $plugin_name ];
			} else {
				return false;
			}
		} else {
			return $plugins;
		}
	}

Top ↑

Changelog

Changelog
Version Description
4.0 Introduced.