Forums

Admin File Download (1 post)

  1. tbarsness
    Member
    Posted 2 years ago #

    I'm interested in providing a secure file download in the admin section.

    I've got it working by adding actions as such:

    if(is_admin())
    {
    	add_action('admin_menu', 'my_plugin_menu');
    	if($_GET['page'] == 'my-plugin-download')
    		add_action('admin_init', 'file_download_func');
    }

    I'm wondering if there is a better way to find out that the page is loaded, yet still send the content before http headers are sent. Any ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.