Astra_Target_Rules_Fields::get_user_by_key( string $key )
Get user label by key.
Description
Parameters
- $key
-
(string) (Required) User option key.
Return
(string)
Source
File: classes/modules/target-rule/class-astra-target-rules-fields.php
public static function get_user_by_key( $key ) { if ( ! isset( self::$user_selection ) || empty( self::$user_selection ) ) { self::$user_selection = self::get_user_selections(); } $user_selection = self::$user_selection; if ( isset( $user_selection['basic']['value'][ $key ] ) ) { return $user_selection['basic']['value'][ $key ]; } elseif ( $user_selection['advanced']['value'][ $key ] ) { return $user_selection['advanced']['value'][ $key ]; } return $key; }
Expand full source code Collapse full source code View on Trac