How do you uninstall a plugin?

How can I insert HTML elements to an existent plugin's rendering a form in the admin panel?

  • I'm planning to write an addon plugin which adds a form field in the admin page of  another plugin. The existent plugin uses a class and its methods to render the form. How can I achieve this? I suppose: 1. the addon plugin must be loaded after the main plugin. 2. redeclaring the class is not possible in PHP. Here is the demo plugin. I'd like to create another plugin that adds text in the page that this plugin creates. <?php /* Plugin Name: Demo Admin Page */ add_action('admin_menu', array( new Admin_Page_Demo( 'Demo Admin Page Plugin' ), "admin_menu" ) ); class Admin_Page_Demo { function __construct( $pagetitle, $menutitle='', $privilege='manage_options', $pageslug='' ) { $this->pagetitle = $pagetitle; $this->menutitle = !empty( $menutitle ) ? $menutitle : $pagetitle; $this->privilege = $privilege; $this->pageslug = !empty( $pageslug ) ? $pageslug : basename( __FILE__, ".php" ); } function admin_menu() { add_options_page( $this->pagetitle, $this->menutitle, $this->privilege, $this->pageslug, array( $this, 'admin_page' ) ); } function admin_page() { ?> <div class="wrap"> <h1><?php echo $this->pagetitle; ?></h1> <p>Hello world!</p> </div> <?php } } According to this video, do_action() is used to embed extra output. But I'm not sure how to implement it. I'm guessing apply_filter() might be used but not sure how it is used either. 

  • Answer:

    You could override the methods of the plugin's class via inheritance.

Charles Coxhead at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.