Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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!

share|improve this question
    
are the images still physically on your FTP server? –  Mild Fuzz Apr 19 '11 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? –  Evan Wondrasek Apr 19 '11 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 Apr 19 '11 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" –  onetrickpony Apr 19 '11 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 Apr 19 '11 at 15:14

1 Answer 1

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 :)

share|improve this answer
    
I think this is the second question like this about a ThemeForest template in less than a week... Probably a similar problem. –  Drew Gourley Apr 19 '11 at 15:56
    
Thanks @onetrickpony. I'll give this a try! –  noel saw Apr 19 '11 at 16:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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