The MU forums have moved to WordPress.org

Solved: Stick a video tab in your inline upload form (6 posts)

  1. drmike
    Member
    Posted 16 years ago #

    - Open up wp-admin/upload.php and find the following line:

    $wp_upload_tabs = array_merge($wp_upload_tabs, apply_filters( 'wp_upload_tabs', array() ));

    - Right before that line, copy in the following:

    $wp_upload_tabs['videos'] = array(__('Videos'), 'upload_files', 'wp_upload_tab_videos', 0);

    - Save the file.

    - Either as a plugin or add it directly into /wp-admin/upload-functions.php add in the following function:

    function wp_upload_tab_videos() {
                    echo "Test";
    }

    - Save again.

    - Go back to Dashboard -> Write and look at the pretty new tab in your upload iframe.

    - Go back to the wp_upload_tab_videos function and add in your demo code for all the videos you support. Use echo commands like I do with the test up above.

    Hope this helps,
    -drmike

    edit: Wasn't someone else going to do this? ;)

  2. lunabyte
    Member
    Posted 16 years ago #

    Um... No?

    <*whistles>

  3. drmike
    Member
    Posted 16 years ago #

    Hmm, must have been Andrea then. ;)

    Of course now, I have to FAQ all those video sites I've done support for and link to them. Give wp.com an excuse for them to do the same as I note they're still only listing three under their tab.

  4. lunabyte
    Member
    Posted 16 years ago #

    Hmmm... yeah.... Andrea.

    Sounds like a good reference to me. :D

  5. andrea_r
    Moderator
    Posted 16 years ago #

    Oh sure, blame me... :D This sounds *really* familiar. (the blaming part, not the was it on my list part. :P )

  6. lunabyte
    Member
    Posted 16 years ago #

    Heh. Somebody named Ron showed us the light. It's been much easier since then. :)

About this Topic