Skip to content

Dashboard Courses action buttons#2356

Open
nur-alam wants to merge 13 commits into4.0.0-devfrom
courses-actions
Open

Dashboard Courses action buttons#2356
nur-alam wants to merge 13 commits into4.0.0-devfrom
courses-actions

Conversation

@nur-alam
Copy link
Collaborator

@nur-alam nur-alam commented Feb 5, 2026

No description provided.

…nify dashboard card buttons

- Introduce `tutor_course_loop_button_class` filter to allow customization of button classes across all course loop templates
- Replace hardcoded button classes in WooCommerce, EDD, Tutor, and course embed templates with the new filter
- Add `tutor_dashboard_course_card_buttons()` function to centralize button rendering for dashboard cards
- Update dashboard card templates to use the new function, removing duplicate buttons and improving consistency
- Adjust dashboard progress card CSS to properly display the unified button actions
- Ensure backward compatibility by maintaining default class values when filter is not used
@nur-alam nur-alam added the 4.0.0 Tutor v4.w0w label Feb 5, 2026
…on function

Replace the deprecated `tutor_dashboard_course_card_buttons` function with `tutor_course_action_button_backup` to provide consistent course action buttons. Remove the `tutor_course_loop_button_class` filter usage across templates and hardcode button classes for better performance and maintainability.

The new function determines appropriate button text and URL based on course progress and completion state, including certificate download links for completed courses.
Remove hardcoded tutor_course_action_button_backup function and replace direct calls with do_action('tutor_course_action_btn'). Add new render_course_action_btn method in Course class to handle button rendering via hook.
Unused imports were cluttering the file and potentially causing confusion. This cleanup improves code readability and maintainability by removing unnecessary dependencies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.0.0 Tutor v4.w0w

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant