Functions not working (2 posts)

  1. adamkb.balan
    Posted 4 years ago #

    Since the WP-Advanced forum section is closed to only mods I am not sure where this goes. So please move to where appropriate if this is not it.

    So here goes.

    Explanation before Code

    The idea of the two functions (the first is called on the options page of the theme options I created to start the whole thing) is simple:

    I have a folder - when you install the theme - called custom-sample. i then alert the user that "hey! you have a folder called - custom-sample, rename it to custom." with a link that states do it for me which will rename the folder at the given path to custom - called from the second link.

    It doesn't work (the second function doesn't work, the first works fine). I also need to just refresh the options page and then display the message "all done." which I don't know how to do - the refresh part -


    function folderError()
    	if (file_exists(TEMPLATEPATH . '/lib/custom-sample'))
    		echo "<div class='warning'><div class='centertext'>You need to change the folder in BLACKANDWHITE/lib/ from custom-sample to custom. This will allow you to edit the customFunction.php and custom.css in that folder. <br /><br /><a href='renameFolder();'>Do it for me!</a> </div></div>";
    function renameFolder()
    	$oldFolder = TEMPLATEPATH . '/lib/core/custom-sample';
    	$newFolder = TEMPLATEPATH . '/lib/core/custom';
    	rename($oldFolder, $newFolder);
    	echo "<div class='warning'><div class='centertext'>All done! File renamed!</a> </div></div>";

    Any thing else?

    Ya - how would I also be able to display this error message at the top of the admin section of word press assuming that this error hasn't been fixed?

  2. adamkb.balan
    Posted 4 years ago #


Topic Closed

This topic has been closed to new replies.

About this Topic