function DecadeSelect($field) {
$currentDecade = substr(date('Y'),0,3)*10;
BugFu::log($field);
// Create choices array
$field['choices'] = array();
// Add blank first selection; remove if unnecessary
$field['choices'][''] = '--Select Decade-- ';
// Loop through a range of years and add to field 'choices'. Change range as needed.
for ($decade = $currentDecade; $decade <= $currentDecade-150; $decade+10) {
BugFu::log("The decade is: $decade <br>");
$field['choices'][$decade] = $decade;
}
// Return the field
return $field;
}
add_filter(‘acf/load_field/key=field_63442a0323a13’, ‘DecadeSelect’);
Am I doing this the right way, and where would you expect the log to be?
]]>Whenever I try to add any kind of function in BugFu it breaks. I repeatedly get 500 server error or just a BugFu heading and no actual data output. Here is a very simple custom function for demonstration purposes:
$statusDict = [];
$rumble_url = "https://rumble.com";
function apple(){
echo "Apple";
}
apple();
$out = $statusDict;
BugFu::log($out);
return true;
As you can see, the apple() function simply prints the word “Apple”. But, it breaks BugFu. I also tried a function that update a PHP dictionary — also, to no avail.
]]>I try to log callback that I’ve registered using register_uninstall_hook previously. But I can’t do this using BugFu:log() function.
]]>I LOVE BugFu, but I’m seeing an activation error from v1.2.3, on a site running wp 4.6.8 (I’m unable to update this site’s WP to 4.9 yet).
]]>Plugin could not be activated because it triggered a fatal error
Parse error: syntax error, unexpected ‘.’, expecting ‘,’ or ‘;’ in /path/to/wordpress/wp-content/plugins/bugfu-console-debugger/bugfu-console-debugger.php on line 28
When I look at the Apache access.log, BugFu is spamming the log.
CPU is close to 100%.
After activate plugin WordPress inform about updates available for the plugin.
After “install updates” (actually the same version have been installed) – updates still available.
]]>