Skip to content

Commit a3c6032

Browse files
committed
Removing the "edit member" panel cache
1 parent 04406ab commit a3c6032

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

adminpages/member-edit.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@
88
* @return array
99
*/
1010
function pmpro_member_edit_get_panels() {
11-
static $panels_cache = array();
12-
if ( ! empty( $panels_cache ) ) {
13-
// Use cached value.
14-
return $panels_cache;
15-
}
16-
1711
// Add default panels.
1812
$panels = array();
1913
$panels[] = new PMPro_Member_Edit_Panel_User_Info();
@@ -50,13 +44,13 @@ function pmpro_member_edit_get_panels() {
5044
*/
5145
$panels = apply_filters( 'pmpro_member_edit_panels', $panels );
5246

53-
// Add panels to cache with slug as key.
47+
// Build array to return with slug as key.
5448
foreach ( $panels as $panel ) {
55-
$panels_cache[ $panel->get_slug() ] = $panel;
49+
$panels_return[ $panel->get_slug() ] = $panel;
5650
}
5751

5852
// Return panels.
59-
return $panels_cache;
53+
return $panels_return;
6054
}
6155

6256
/**

0 commit comments

Comments
 (0)