1

I bought a theme from Themeforest called Anan. I am currently hosting the site on Bluehost.

Here's the problem: every few days the theme settings keep getting erased (reset) so I have to re-upload logos and background images and it's driving me crazy. :)

Here's a copy of the functions.php file in a text file in my public dropbox folder if anyone can look at it: http://dl.dropbox.com/u/4016505/functions.txt

Thanks for the help!

6
  • are the images still physically on your FTP server?
    – Mild Fuzz
    Commented Apr 19, 2011 at 14:00
  • To add on to @Mild Fuzz's question, where are you storing the files that disappear? Are you uploading them to your server or hotlinking from somewhere else? Commented Apr 19, 2011 at 14:29
  • Sorry...It's not the files themselves that are disappearing. It's the theme settings that are stored in the theme control panel. The logos are stored in the media library but the pointers to the correct files get lost in the theme panel. I am guessing there is some code thats causing the theme settings stored in the database to get reset. Screenshot of theme panel: skitch.com/noelsaw/r49rx/…
    – noel saw
    Commented Apr 19, 2011 at 14:53
  • 3
    is it just me or anyone can delete any options they want from your site using $_POST['anything'] ? :) That code says "please hack my site" Commented Apr 19, 2011 at 14:59
  • @One Trick Pony - +1 on this! Haha! @noel saw - you really bought this one? I guess i'll have to sell some older stuff too ,)
    – kaiser
    Commented Apr 19, 2011 at 15:14

1 Answer 1

3

Try changing this line:

if(isset($_POST['field_id']) && !empty($_POST['field_id']))

to:

if(isset($_POST['field_id']) && !empty($_POST['field_id']) && current_user_can('update_core'))

and:

function pp_add_admin() {

to:

function pp_add_admin() {
if(!current_user_can('update_core')) return;

and ask for a refund :)

1
  • I think this is the second question like this about a ThemeForest template in less than a week... Probably a similar problem. Commented Apr 19, 2011 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.