creating user upload page when plugin activate

I am new to wordpress plugin development (in fact, new to PHP too), so don’t roast me if this does not make sense.

I am developing a plugin where subscriber can upload and manage their uploaded images, and therefore a “user page” will need to be provided once the plugin is activated. images uploaded from all subscriber will be displayed by a custom shortcode in a specific way.

I have read other similar questions here, and I come up with following design and want to know if this is the right way to do.

  1. create a page template (e.g. user_upload.php) that will include all logic to check if user is logged in and contents for user to upload and manage their picture.
  2. create a page with custom slug (e.g. foo) when plugin is activated
  3. add to filter hook “template_include” and check is_page(“foo”), such the
    page_template is returned for only the foo page.

In that case what plugin user need to do is provides link to the foo page once the plugin is activated?

Read more here: creating user upload page when plugin activate

Leave a Reply

Your email address will not be published. Required fields are marked *