Edit plugin functions within a declared class
-
Hello,
I have a plugin with a certain class and then a function which feeds a dropdown menu within the plugin shortcode builder.
Here below the snippet code:class WlaFigaSettings { <some other functions> public function SbattiName( $value ) { return $this->BocceAssurde( $value, array( array( 'dte', __( 'Date', 'bella-figa' ) ), 'ID', array( 'ahor', __( 'Author', 'bella-figa' ) ), array( 'tte', __( 'Title', 'bella-figa' ) ), array( 'vagi', __( 'Menu order', 'bella-figa' ) ), ) ); } <some other functions> }My task is really easy: add another option to that function causing an addition to the dropdown option menu within the plugin shortcode builder.
Obviously, I don’t want to modify the original file, so I need for some customization in the functions.php file or in another (my own) plugin.
Thank you.
Bye.
-
What plugin you are using for this ? Does they provide any kind of filters or hooks to customize the plugin ?
I had not thought it was so difficult getting an answer. So let’s detail my question: Is it possible extend a plugin using its class and methods, even if hooks are not available, or not in the position I wanna extend or modify?
I am sorry but it does not matter which plugin I referred to, it could name Pippolo, Plutolo, Bombolo or Crnerentolo.
In the case above, there are dozens of other methods along with the one I had showed. No do_action nor apply_filters there, only some add_action which refers to a function who collects all options established by the methods class.
Thank you, I think it is better to search elsewhere.Sure, everything in the WP environment shares the same namespace. As long as the “final” keyword is not used in the declaration, you can extend a plugin’s class from another plugin or theme.
The topic ‘Edit plugin functions within a declared class’ is closed to new replies.