BP_Invites_Component::register_post_types()

Description

Source

File: bp-invites/classes/class-bp-invites-component.php

	public function register_post_types() {

		// Register invite custom post type.
		register_post_type( bp_get_invite_post_type(),
			apply_filters( 'bp_invite_post_type',
				array(
					'description'        => __( 'BuddyBoss Invites', 'buddyboss' ),
					'labels'             => bp_get_invite_post_type_labels(),
					'public'             => false,
					'publicly_queryable' => bp_current_user_can( 'bp_moderate' ),
					'query_var'          => false,
					'rewrite'            => false,
					'show_in_admin_bar'  => false,
					'show_in_menu'       => false,
					'map_meta_cap'       => true,
					'menu_icon'          => 'dashicons-email',
					//'menu_position'      => 27,
					'show_in_rest'       => true,
					'capabilities'       => array(
						'create_posts' => 'do_not_allow', // false < WP 4.5, credit @Ewout
					),
					'show_ui'            => bp_current_user_can( 'bp_moderate' ),
					'supports'           => bp_get_invite_post_type_supports(),
				) ) );

		parent::register_post_types();
	}

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.