Support » Plugins » Hacks » Modified Media-upload Link

  • I have a WordPress MU site with static pages that each contain an image gallery and nothing else – no text content. Each time a new user signs up they get a pre-populated site. Rather than having them navigate to the individual pages and click the small image-upload icon I have copied that link an attached it to an image map on the WordPress dashboard. It works fine. The user logs in, clicks the “Add an image to my Home page” icon on their dashboard, and up pops the media upload dialog box for that particular page. The problem is that the media-upload link uses the post_id, which changes each time a new site is created. I would like to use the post_slug instead. I have tried the following, but it does not work.

    The default link works -
    My link using post-slug does not -

    Does anyone have any advice?



Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    media-upload.php does not appear to understand any post identifying means other than ID. So when the link is built, you somehow have to get the correct ID. If the only thing you have is the slug, and nothing else is available, you could query for the page by slug and get the ID from the returned variables. I don’t think there’s a function that does this, so you’d have to build your own.

Viewing 1 replies (of 1 total)
  • The topic ‘Modified Media-upload Link’ is closed to new replies.