LLMS_Admin_Post_Table_Forms::manage_post_row_actions( array $actions, $post )
Manage available bulk actions.
Parameters Parameters
- $actions
-
(array) (Required) Array of actions.
Return Return
(array)
Source Source
File: includes/admin/post-types/post-tables/class-llms-admin-post-table-forms.php
public function manage_post_row_actions( $actions, $post ) {
if ( 'llms_form' !== $post->post_type ) {
return $actions;
}
// Core forms cannot be deleted.
if ( LLMS_Forms::instance()->is_a_core_form( $post ) ) {
unset( $actions['trash'] );
}
unset( $actions['inline hide-if-no-js'] );
$link = get_permalink( $post );
if ( $link ) {
$label = sprintf( esc_attr__( 'View "%s"', 'lifterlms' ), $post->post_title );
$actions['view'] = sprintf( '<a href="%1$s" rel="bookmark" aria-label="%2$s">%3$s</a>', $link, $label, __( 'View', 'lifterlms' ) );
}
return $actions;
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 6.4.0 | Use LLMS_Forms::is_a_core_form() to determine whether a form is a core form and cannot be deleted. |
| 5.0.0 | Introduced. |