-
Notifications
You must be signed in to change notification settings - Fork 41
Use delete link color for entry delete link in entry sidebar #3192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
24dd4e2
928db6e
72bf620
4f18975
78a8c13
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -762,6 +762,18 @@ private static function get_action_links( $id, $entry ) { | |
| $page = FrmAppHelper::get_param( 'frm_action' ); | ||
| $actions = array(); | ||
|
|
||
| $actions['frm_edit'] = array( | ||
| 'url' => '#', | ||
| 'label' => __( 'Edit Entry', 'formidable' ), | ||
| 'class' => 'frm_noallow', | ||
| 'data' => array( | ||
| 'upgrade' => __( 'Entry edits', 'formidable' ), | ||
| 'medium' => 'edit-entries', | ||
| 'content' => 'entry', | ||
| ), | ||
| 'icon' => 'frmfont frm_pencil_icon', | ||
| ); | ||
|
|
||
| if ( $page !== 'show' ) { | ||
| $actions['frm_view'] = array( | ||
| 'url' => admin_url( 'admin.php?page=formidable-entries&frm_action=show&id=' . $id . '&form=' . $entry->form_id ), | ||
|
|
@@ -770,18 +782,6 @@ private static function get_action_links( $id, $entry ) { | |
| ); | ||
| } | ||
|
|
||
| if ( current_user_can( 'frm_delete_entries' ) ) { | ||
| $actions['frm_delete'] = array( | ||
| 'url' => wp_nonce_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id ) ), | ||
| 'label' => __( 'Delete Entry', 'formidable' ), | ||
| 'icon' => 'frmfont frm_delete_icon', | ||
| 'data' => array( | ||
| 'frmverify' => __( 'Permanently delete this entry?', 'formidable' ), | ||
| 'frmverify-btn' => 'frm-button-red', | ||
| ), | ||
| ); | ||
| } | ||
|
|
||
| if ( $page === 'show' ) { | ||
| $actions['frm_print'] = array( | ||
| 'url' => '#', | ||
|
|
@@ -793,18 +793,6 @@ private static function get_action_links( $id, $entry ) { | |
| ); | ||
| } | ||
|
|
||
| $actions['frm_resend'] = array( | ||
| 'url' => '#', | ||
| 'label' => __( 'Resend Emails', 'formidable' ), | ||
| 'class' => 'frm_noallow', | ||
| 'data' => array( | ||
| 'upgrade' => __( 'Resend Emails', 'formidable' ), | ||
| 'medium' => 'resend-email', | ||
| 'content' => 'entry', | ||
| ), | ||
| 'icon' => 'frmfont frm_email_icon', | ||
| ); | ||
|
|
||
| if ( ! function_exists( 'frm_pdfs_autoloader' ) ) { | ||
| $actions['frm_download_pdf'] = array( | ||
| 'url' => '#', | ||
|
|
@@ -815,19 +803,43 @@ private static function get_action_links( $id, $entry ) { | |
| ); | ||
| } | ||
|
|
||
| $actions['frm_edit'] = array( | ||
| $actions['frm_resend'] = array( | ||
| 'url' => '#', | ||
| 'label' => __( 'Edit Entry', 'formidable' ), | ||
| 'label' => __( 'Resend Emails', 'formidable' ), | ||
| 'class' => 'frm_noallow', | ||
| 'data' => array( | ||
| 'upgrade' => __( 'Entry edits', 'formidable' ), | ||
| 'medium' => 'edit-entries', | ||
| 'upgrade' => __( 'Resend Emails', 'formidable' ), | ||
| 'medium' => 'resend-email', | ||
| 'content' => 'entry', | ||
| ), | ||
| 'icon' => 'frmfont frm_pencil_icon', | ||
| 'icon' => 'frmfont frm_email_icon', | ||
| ); | ||
|
|
||
| return apply_filters( 'frm_entry_actions_dropdown', $actions, compact( 'id', 'entry' ) ); | ||
| if ( current_user_can( 'frm_delete_entries' ) ) { | ||
| $actions['frm_delete'] = array( | ||
| 'url' => wp_nonce_url( admin_url( 'admin.php?page=formidable-entries&frm_action=destroy&id=' . $id . '&form=' . $entry->form_id ) ), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| 'label' => __( 'Delete Entry', 'formidable' ), | ||
| 'class' => 'frm_delete_entry', | ||
| 'icon' => 'frmfont frm_delete_icon', | ||
| 'data' => array( | ||
| 'frmverify' => __( 'Permanently delete this entry?', 'formidable' ), | ||
| 'frmverify-btn' => 'frm-button-red', | ||
| ), | ||
| ); | ||
| } | ||
|
|
||
| $actions = apply_filters( 'frm_entry_actions_dropdown', $actions, compact( 'id', 'entry' ) ); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| if ( ! isset( $actions['frm_delete'] ) ) { | ||
| return $actions; | ||
| } | ||
|
|
||
| // Make delete the last link. | ||
| $delete_action = $actions['frm_delete']; | ||
| unset( $actions['frm_delete'] ); | ||
| $actions['frm_delete'] = $delete_action; | ||
|
|
||
| return $actions; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property you are trying to access is not defined and will cause unexpected behavior when used.