Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Custom Post Type Support for Activity

@caykimtien88

Participant
function plugin_registers_post_type() {
	$args = array(
		'public'   => true,
		'labels'   => array(
			'name'                     => __( 'Artikel', 'your-plugin-textdomain' ),
			'singular_name'            => __( 'Artikel', 'sozialdynamik' ),
			'bp_activity_admin_filter' => __( 'Neuer Artikel veröffentlicht', 'sozialdynamik' ),
			'bp_activity_front_filter' => __( 'Artikel', 'sozialdynamik' ),
 			'bp_activity_new_post'     => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>', 'sozialdynamik' ),
 			'bp_activity_new_post_ms'  => __( '%1$s hat den neuen <a href="%2$s">Artikel</a>, on the site %3$s', 'sozialdynamik' ),
		),
		'supports'    => array( 'title', 'editor', 'buddypress-activity' ),
		'bp_activity' => array(
			'component_id' => 'activity',
			'action_id'    => 'new_sd_article',
			'contexts'     => array( 'activity', 'member' ),
			'position'     => 100,
		),
	);
	register_post_type( 'sd_article', $args );
}
add_action( 'init', 'plugin_registers_post_type' );
Skip to toolbar