Hey there, I wanted to future-proof a few modifications I have in wordpress.php. One example is the function: PHP: function getDisplayName(User $user) { switch ($this->getConfig('display_name', 'username')) { case 'name_f_name_l' : return $user->name_f . ' ' . $user->name_l; case 'username' : default: return $user->login; } } I'd like to modify this to create an option for Last, First. Can I do this in site.php somehow so that future upgrades will not overwrite the changes? Thanks!
I should add, the function is something like this, but I just want to not edit the code directly: Code: function getDisplayName(User $user) { switch ($this->getConfig('display_name', 'username')) { case 'name_f_name_l' : return $user->name_f . ' ' . $user->name_l; case 'name_l_name_f' : return $user->name_l . ', ' . $user->name_f; case 'username' : default: return $user->login; } }
I will admit I know nothing, absolutely nothing, about Wordpress but if that function is part of the Wordpress script I would think site.php - which is a part of aMember - will have no control over it.
Hi there, actually that function lives in /amember/application/default/plugins/protect/wordpress/wordpress.php - I'm just trying to find a way to modify the function slightly without editing the code directly. As I understand it, site.php for amember is for custom functions, can I add this there? Thanks-