redeclare a custom PHP function

I’m working on a wordpress child theme, I did not work on wordpress a lot but from what i know some function are added to WP them like

add_action( 'init', 'rd_share_panel' );

the function i want to edit ‘rd_share_panel’ is declared in theme files and call as a normal PHP function to output some HTML code, it does not have an add_action

I would like to override it in my child theme
I can’t just redeclare because i get an error

Fatal error: Cannot redeclare rd_share_panel()...

Any way to do it?


Source: wordpress

Leave a Reply