PluginProbe
User Access Manager / 2.2.2
User Access Manager v2.2.2
2.3.20 2.3.19 2.3.18 2.3.17 2.3.16 2.3.15 2.3.14 2.3.13 trunk 0.6 0.6.1 0.6.2 0.7 0.7 Beta 0.7.0.1 0.8 0.8.0.1 0.8.0.2 0.9 0.9.1 0.9.1.1 0.9.1.2 0.9.1.3 0.9.1.4 1.0 All 136 releases
← All changes | src/View/UserGroups/UserGroupList.php +21 -11 2.3.152.2.2 View file →
@@ -1,6 +1,20 @@
1 1 <?php
2 2 /**
3 + * UserGroupList.php
4 + *
5 + * Shows the user group edit list at the admin panel.
6 + *
7 + * PHP versions 5
8 + *
9 + * @author Alexander Schneider <alexanderschneider85@gmail.com>
10 + * @copyright 2008-2017 Alexander Schneider
11 + * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2
12 + * @version SVN: $id$
13 + * @link http://wordpress.org/extend/plugins/user-access-manager/
14 + */
15 +
16 +/**
3 17 * @var UserGroupController $controller
4 18 */
5 19
6 20 /**
@@ -17,11 +31,11 @@
17 31 $isSorted = $controller->getRequestParameter('orderby') === $sortingParameter;
18 32 $class = $isSorted === true ? 'sorted' : 'sortable';
19 33 $sortOrder = $isSorted === true ? $controller->getRequestParameter('order') : 'asc';
20 34
21 - $inner = "<span>$name</span><span class=\"sorting-indicator\"></span>";
22 - $link = "<a href=\"{$controller->getSortUrl($sortingParameter)}\" >$inner</a>";
23 - return "<th scope=\"col\" class=\"$class $sortOrder\">$link</th>";
35 + $inner = "<span>{$name}</span><span class=\"sorting-indicator\"></span>";
36 + $link = "<a href=\"{$controller->getSortUrl($sortingParameter)}\" >{$inner}</a>";
37 + return "<th scope=\"col\" class=\"{$class} {$sortOrder}\">{$link}</th>";
24 38 }
25 39
26 40 ?>
27 41 <form method="post" action="<?php echo $controller->getRequestUrl(); ?>">
@@ -53,20 +67,16 @@
53 67 foreach ($userGroups as $userGroup) {
54 68 ?>
55 69 <tr class="alternate" id="group-<?php echo $userGroup->getId(); ?>">
56 70 <th class="check-column">
57 - <input id="uam-bulk-select"
58 - type="checkbox"
59 - value="<?php echo $userGroup->getId(); ?>"
60 - name="delete[]"/>
61 - <label for="uam-bulk-select">
62 - <span class="screen-reader-text"><?php echo TXT_UAM_DELETE; ?></span>
71 + <label>
72 + <input type="checkbox" value="<?php echo $userGroup->getId(); ?>" name="delete[]"/>
63 73 </label>
64 74 </th>
65 75 <td>
66 76 <strong>
67 77 <?php
68 - $link = "?page=$currentAdminPage&amp;uam_action=edit_user_group"
78 + $link = "?page={$currentAdminPage}&amp;uam_action=edit_user_group"
69 79 . "&amp;userGroupId={$userGroup->getId()}";
70 80 ?>
71 81 <a href="<?php echo $link; ?>">
72 82 <?php echo htmlentities($userGroup->getName()); ?>
@@ -106,9 +116,9 @@
106 116 <ul style="margin: 0;">
107 117 <?php
108 118 foreach ($groupRoles as $key => $role) {
109 119 ?>
110 - <li><?php echo $roleNames[$key] ?? $key; ?></li>
120 + <li><?php echo isset($roleNames[$key]) ? $roleNames[$key] : $key; ?></li>
111 121 <?php
112 122 }
113 123 ?>
114 124 </ul>