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

Filterable dashboard widgets #3019

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

andrewlimaza
Copy link
Contributor

@andrewlimaza andrewlimaza commented Jun 21, 2024

  • ENHANCEMENT: Added new filter 'pmpro_dashboard_meta_boxes' which allows developers to hide dashboard widgets, as well as add their very own widgets to the dashboard area.

All Submissions:

Changes proposed in this Pull Request:

This resolves an issue where WooCommerce (and most likely other plugins) cause a fatal error when trying to view our dashboard page.

How to test the changes in this Pull Request:

To test this, you can add the following code - this will remove the welcome dashboard from the PMPro dashboard:

// Example to remove a meta box from the dashboard
function my_pmpro_remove_meta_box_from_dashboard( $meta_boxes_array ) {
	unset( $meta_boxes_array['pmpro_dashboard_welcome'] );
	return $meta_boxes_array;
}
add_filter( 'pmpro_dashboard_meta_boxes', 'my_pmpro_remove_meta_box_from_dashboard' );

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you successfully run tests with your changes locally?

* ENHANCEMENT: Added new filter 'pmpro_dashboard_meta_boxes' which allows developers to hide dashboard widgets, as well as add their very own widgets to the dashboard area.
@andrewlimaza andrewlimaza marked this pull request as ready for review June 21, 2024 13:23
@dparker1005 dparker1005 added this to the 3.1 milestone Jun 21, 2024
@dparker1005 dparker1005 merged commit 8d021d2 into strangerstudios:v3.1 Jun 21, 2024
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

2 participants