bp_invite_hide_quick_edit( type $actions, type $post )
Hide quick edit link.
Description
Parameters
- $actions
-
(Required)
- $post
-
(Required)
Return
(type)
Source
File: bp-invites/bp-invites-admin.php
function bp_invite_hide_quick_edit( $actions, $post ) {
if ( empty( $post ) ) {
global $post;
}
if ( bp_get_invite_post_type() == $post->post_type )
unset( $actions['inline hide-if-no-js'] );
if ( bp_get_invite_post_type() == $post->post_type ) {
// Sender author id
$author_id = get_post_field ('post_author', $post->ID );
// Build edit links URL.
$edit_url = admin_url( 'user-edit.php?user_id=' . $author_id );
// Maybe put in some extra arguments based on the post status.
$edit_link = add_query_arg( array( 'action' => 'edit' ), $edit_url );
$inviter_link = bp_core_get_user_domain( $author_id );
$actions = array(
'edit' => sprintf( '<a href="%1$s">%2$s</a>',
esc_url( $edit_link ),
esc_html( __( 'Edit', 'buddyboss' ) ) ),
'view' => sprintf( '<a href="%1$s">%2$s</a>',
esc_url( $inviter_link ),
esc_html( __( 'View', 'buddyboss' ) ) )
);
}
return $actions;
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
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.