hlashbrooke/WordPress-Plugin-Template

Hook html content in frontend & backend footer

Closed this issue · 3 comments

I would like to use your template to develop a plugin with it.

I need to hook some html content every where in the frontend and backend footers of a wordpress installation.

How do you suggest me to do that and where to put the hooks in your template?

For the moment that is what I have:

In the constructor of class-wordpress-plugin-template.php just after Handle localisation

        // Handle footers
        add_action('wp_footer', array( $this, wpt_add_footer' ));
        add_action('admin_footer_text', array( $this, 'wpt_add_footer' ));

Then in the same class after the constructor, the following method is declared:

    function wpt_add_footer(){

        echo 'hello';

        return true;
    }

Should it be this way?

qant commented

Its all up to you how you do this, i dont think some one will waste his time on your code.

So if you dont know how or where or why just read documentation of wordpress standarts, read their own code to see how they do this etc...

I hope you understand and this is not an ISSUE...

Thanks Qant! As you can see I had 3 years to figure this out :)

This thread should be closed now.