Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Can you access functions.php?
Yes. Thanks for your quick response!
After receiving an error from a functions.php edit, i went to replace the problem functions.php file with the original from the theme (which has worked before) and may have inadvertently placed it in the wp-includes dir. I’ve made sure the original functions.php is in the theme directory and have tried to delete functions.php from the wp-includes dir but no luck.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
What’s line 100 of functions.php?
$dir = dir(TEMPLATEPATH.”/”);
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
can you var_dump($dir);exit; and paste here what it outputs?
Not quite sure how to execute that. Can you provide how-to?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
For example, on line 100,
$dir = dir(TEMPLATEPATH."/"); var_dump($dir);exit;
OK. Modified file per above, replaced existing file on site, re-downloaded but no dump result. Is there something I need to do to execute the command?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Sorry, on line 100 try;
var_dump(TEMPLATEPATH."/");exit; $dir = dir(TEMPLATEPATH."/");
Here is what I get.
function get_availableCss(){
$result = array();
$dir = dir(TEMPLATEPATH.”/”); var_dump($dir);exit;
while (false !== ($file = $dir->read())) {
if(ereg(“\.css”, $file, $r)){
$result[] = $file;
}
}
$dir->close();
return $result;
}
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Does it output anything on the webpage?
Not sure if the dump should appear in functions.php file or on the web page after the modified file is loaded. Here is from the file:
/*
Get Available CSS
*/
function get_availableCss(){
$result = array();
var_dump(TEMPLATEPATH.”/”);exit; $dir = dir(TEMPLATEPATH.”/”);
while (false !== ($file = $dir->read())) {
if(ereg(“\.css”, $file, $r)){
$result[] = $file;
}
}
$dir->close();
return $result;
}
Here is from the site with the modified file loaded.
Warning: dir(TEMPLATEPATH/) [function.dir]: failed to open dir: No such file or directory in /home/content/26/9196326/html/wp-includes/functions.php on line 100
bool(false)
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
I’m sorry, I can’t find the solution to this.
Remove the code I recommended you add.
I’m sure you’ll receive help from others.
Thanks very much Andrew. I appreciate your efforts.