• I’m aiming to write a plugin to extend the code that runs on the appearance => custom header section in the admin area. I would like to do this because of the JS that’s already running, there is a great cropping tool and it’s going to be ideal for a client of mine, they will be able to update their main slider very fast.

    I have found two issues: 1) I can’t delete an image when it’s uploaded without going into media and doing it there. 2) When I query the DB to get the images, they have no menu_order value.

    Ideally I’d like to hook into this admin page an create my own code. I need a box next to each image, in this box I could enter the menu_order. I would need to save this value to the DB and I’m not sure how to do this. I assume it’s some kind of update. Secondly, I need a cross or something for each image, that when clicked, deletes the image. Or perhaps I could use a check box for each image and loop through them when saving the page, deleting any that are ticked.

    I’m aware this is quite a lot of help to ask for. My PHP isn’t shockingly bad, but I’m never actually written a plugin. I’ve been reading though the guides on the WP site, I’m not asking someone to do this for me, I want to learn this so I can do it myself with less issues.

    Feel free to contribute anything!

    Regards, Dan.

  • The topic ‘How would I write this plugin for use with the custom headers page?’ is closed to new replies.