Link to home
Start Free TrialLog in
Avatar of Robert Granlund
Robert GranlundFlag for United States of America

asked on

Add Function to another class

I'm learning some stuff about PHP PDO and Wordpress functions, hooks and Classes.

I have an abstract question.  In Wordpress is it possible to add a function to a class in a plugin?

Meaning, Can I create a plugin that defines a function and then have that function be added to a specific class within another plugin?
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of eemit
eemit
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert Granlund

ASKER

Not sure I'm clear here.  What I want to do is create a plugin that adds a Method to a Class that is in another Plugin.

I know how to create a plugin, just not sure how to write the Action to add a method to a class.
Thanks to both of you.  After reading everything through for the umteeth time and feeling like I really understand, but can't figure out what was wrong, I finally realized.  In one of the functions it was calling the class and then the function and all I needed it to do was to call my new function instead.  Kind of an "Oh Geez " Moment.