I’m having some troubles.
I’ve followed yourvery clear instructions, but maybe I’m done something wrong.
this is what I’ve pasted in the spFunctions.php of my SP theme
add_filter('sph_user_class_meta', 'sph_addMetatoObj');
function sph_addMetatoObj($objList) {
$objList['cortesia'] = 'title';
}
add_action('sph_user_class', 'sph_insertMetaInDisplayBame');
function sph_insertMetaInDisplayBame($userObj) {
$userObj->display_name = $userObj->cortesia . $userObj->display_name;
}
I’m having 3 different error messages, first two repeats a lot of times and the page looks like hanging in an infinite loop, at the end loads the third message and the whole site (without the meta before the names)
Theese are the 3 errors:
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /web/problem-with-post-edit-buttontdocs/www.[…]/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php on line 131
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /web/problem-with-post-edit-buttontdocs/www.[…]/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php on line 142
Warning: Invalid argument supplied for foreach() in /web/problem-with-post-edit-buttontdocs/www.sviluppointergraf.it/problem-with-post-edit-buttonome/[…]/wp-content/plugins/simple-press/sp-api/sp-api-class-user.php on line 294
(I’ve added the […] to hide real URL)
THis happens in forum home, forum view and topic view