From 4f7cfd164d8200d586334fdc5d6eada2a219565e Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Sat, 4 Sep 2021 10:40:08 +0200 Subject: Rename AdminPage::returnuser to assign_role_for_user_form. It did not return any users, but a form so name it for what it does. --- includes/admin/views/giglog_admin_page.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'includes/admin/views/giglog_admin_page.php') diff --git a/includes/admin/views/giglog_admin_page.php b/includes/admin/views/giglog_admin_page.php index dd21a32..7c77b2a 100644 --- a/includes/admin/views/giglog_admin_page.php +++ b/includes/admin/views/giglog_admin_page.php @@ -249,10 +249,10 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { $roles = $concert->roles(); - $content .= '' . $this->returnuser('photo1', $concert) . ''; - $content .= '' . $this->returnuser('photo2', $concert) . ''; - $content .= '' . $this->returnuser('rev1', $concert) . ''; - $content .= '' . $this->returnuser('rev2', $concert) . ''; + $content .= '' . $this->assign_role_for_user_form('photo1', $concert) . ''; + $content .= '' . $this->assign_role_for_user_form('photo2', $concert) . ''; + $content .= '' . $this->assign_role_for_user_form('rev1', $concert) . ''; + $content .= '' . $this->assign_role_for_user_form('rev2', $concert) . ''; $content .= '' . self::STATUS_LABELS[$concert->status()] . ''; @@ -409,7 +409,7 @@ if ( !class_exists( 'GiglogAdmin_AdminPage' ) ) { wp_mail( $to, $subject, $body, $headers ); } - private function returnuser(string $role, GiglogAdmin_Concert $concert) : ?string + private function assign_role_for_user_form(string $role, GiglogAdmin_Concert $concert) : ?string { $roles = $concert->roles(); $assigned_user = array_key_exists($role, $roles) ? $roles[$role] : NULL; -- cgit v1.2.3