Category: Wordpress

Home > Blog > ArchivesBlog > Wordpress

How To Copy Sub-site Media to Admin Site on Upload (WordPress Multisite)

July 16, 2014 by in category Programming, Wordpress tagged as , , , , ,

Jaysus, this one took me ages to understand. I spent so long doing all sorts of things to get it to work but in the end I think I’ve copped it. One important note though: do not remove the “restore_current_blog()” function at the end or move it within the if statement. You’ll end up in […]

0 1 Read more

How to add Custom Post Type menu to Admin Sub-menu WordPress

July 15, 2014 by in category Programming, Wordpress

After a lot of googling, I couldn’t find a solution to my problem. I finally figured it out and have decided to document it below. <?php define(“ICON_URL”, ‘/path/to/icons’); // First we sort out some submenu pages under our custom // menu page function my_add_submenu_pages() { add_submenu_page( ‘my-plugin’, __( ‘All Players’, ‘Players’ ), __( ‘All Players’, ‘Players’ […]

0 1 Read more

Multiple File Uploads In A WordPress Plugin

June 12, 2014 by in category PHP, Programming, Wordpress

In work today, I noticed a distinct lack of solutions for uploading multiple files through the ‘media_handle_upload’ function. Since it assumes that $_FILES is just the normal array of details, it isn’t really adaptable to multi-file uploads.   So, to get around this, you can de-make and re-make several $_FILE arrays and just feed them through the […]

0 1 Read more
© Evan Smith 2009 - 2017