General developer forum

Overriding activity_navigation class in Boost child theme

 
Picture of Matt Donnelly
Overriding activity_navigation class in Boost child theme
 

  • Version: 3.5
  • File: /course/classes/output/activity_navigation.php
  • Parent theme: Boost

Hello, 

I'm a new developer. I notice that activity_navigation.php seems to contain an error on lines 75 & 91, in the $attributes arrays. I think 'classes' should be 'class'. 

You can see what I mean If you inspect element on the next-activity-link/prev-activity-link in Chrome: the <a> elements have a classes attribute. 

If someone with more knowledge than me can confirm that this is a bug, I can report it. 

But say I want to fix it now, and even add different Bootstrap classes to those links: my options are to (1) modify activity_navigation.php directly, and (2) override/extend the activity_navigation class in my theme, correct? Presumably with (2) being preferred. 

I've tried various permutations of namespace, filename, require(), etc, but no luck. I put the file in theme/child_theme/classes/output, and tried theme/child_theme/classes/output/core_course, like the way Boost does it. 

I'd love it if someone could outline or point to the process for overriding this. I've overridden renderers successfully, but this seems to be different to me. 

Thanks for the consideration, and best, 

matt


 
Average of ratings: -