Title: Accessing plugin class functions inside filter/hook
Last modified: June 25, 2024

---

# Accessing plugin class functions inside filter/hook

 *  Resolved [MarcGuay](https://wordpress.org/support/users/marcguay/)
 * (@marcguay)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/accessing-plugin-class-functions-inside-filter-hook/)
 * Hi. I utilize the `crp_list_link` filter/hook in order to modify the output. 
   I override the whole function because my output needs are siginificantly different
   from the default. Previously I could easily use functions made available by the
   plugin such as `crp_link_attributes` but these are now bound to classes and I’m
   unsure how to gain access to them. Any help appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [MarcGuay](https://wordpress.org/support/users/marcguay/)
 * (@marcguay)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/accessing-plugin-class-functions-inside-filter-hook/#post-17849976)
 * I found that you need to reference it by the full namespace path e.g. `$d = **
   new **WebberZone\Contextual_Related_Posts\Frontend\Display();`
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/accessing-plugin-class-functions-inside-filter-hook/#post-17850274)
 * This should be the cleanest way. Many of the functions in Display() are static.
   So those you can use directly as well.
 * \WebberZone\Contextual_Related_Posts\Frontend\Display::crp_link_attributes()

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Accessing plugin class functions inside filter/hook’ is closed to new
replies.

 * ![](https://ps.w.org/contextual-related-posts/assets/icon-256x256.png?rev=2985705)
 * [Contextual Related Posts](https://wordpress.org/plugins/contextual-related-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contextual-related-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contextual-related-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/contextual-related-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contextual-related-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contextual-related-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/accessing-plugin-class-functions-inside-filter-hook/#post-17850274)
 * Status: resolved