I have made a class file in my plugin folder.
Then I wrote,
class Sample{
function footer_content(){
echo "show any data";
}
}
Then I added the function footer_content to wordpress footer by using add_action command. But it didn’t show anything. maybe I am missing something in this, as it is not working.
add_action('wp_footer', Sample::footer_content());
Here’s reference from Codex