• Resolved No3x

    (@no3x)


    Hello I was wondering how you determine if you are on a page with post_type download in the admin section. In admin/downloads/metabox.php you just register add_action( ‘add_meta_boxes’, ‘edd_add_download_meta_box’ );
    Thought it must be shown when adding download, post and site as well.

    But why this is only shown on your download site? How do you achieve this programmatically?

    http://wordpress.org/extend/plugins/easy-digital-downloads/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author chriscct7

    (@chriscct7)

    Hi there,
    We don’t actually. What you’ll notice is that add_action, though hooking into the add_meta_boxes doesn’t actually add any metaboxes itself. It’s the add_action for metaboxes contained inside that function that tells the metaboxes when to appear by using the post type parameter.

    Does that make sense?

    Thread Starter No3x

    (@no3x)

    Hi chriscct7,

    thank you very much. I didn’t assumed that wp would handle the post_type for me.
    I just want to add additional js code on every download post in the admin section. I hooked into the post site and checked if post_type is download. This works very well for new downloads but if you are in the download overview list table and want to edit a download the argument post_type is not appended to the get parameters. There is just action=edit.
    Maybe there is a reason for this on your part.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Determine Download Page’ is closed to new replies.