Skip to content
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

Set empty action in bulk action dropdown #717

Merged
merged 2 commits into from
Feb 16, 2021
Merged

Set empty action in bulk action dropdown #717

merged 2 commits into from
Feb 16, 2021

Conversation

dhanendran
Copy link
Member

Description of the Change

We have the Pull action as the default action on the bulk dropdown, whenever we click the Apply button the page sends both top and bottom form to the server irrespective of the button we clicked. Since both action and action2 has values, WP always takes the value of `action'. Now I have added a empty option as like the post list page to fix this issue.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

#610

@@ -527,6 +527,7 @@ public function column_cb( $post ) {
public function get_bulk_actions() {
if ( empty( $_GET['status'] ) || 'new' === $_GET['status'] ) { // @codingStandardsIgnoreLine Nonce not required.
$actions = [
'-1' => esc_html__( 'Bulk Action', 'distributor' ),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change but I think the text here should be Bulk actions to match what WordPress uses elsewhere

@dkotter
Copy link
Collaborator

dkotter commented Feb 15, 2021

@dhanendran Left one minor comment but otherwise, this looks good. Thanks!

@dhanendran
Copy link
Member Author

@dkotter I have addressed your comment.

@jeffpaul jeffpaul merged commit ecdcff2 into develop Feb 16, 2021
@jeffpaul jeffpaul deleted the fix/issue-610 branch February 16, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants