Astra_Target_Rules_Fields::get_user_selections()

Get user selection options.


Description


Return

(array)


Source

File: classes/modules/target-rule/class-astra-target-rules-fields.php

		public static function get_user_selections() {
			$selection_options = array(
				'basic'    => array(
					'label' => __( 'Basic', 'astra-addon' ),
					'value' => array(
						'all'        => __( 'All', 'astra-addon' ),
						'logged-in'  => __( 'Logged In', 'astra-addon' ),
						'logged-out' => __( 'Logged Out', 'astra-addon' ),
					),
				),

				'advanced' => array(
					'label' => __( 'Advanced', 'astra-addon' ),
					'value' => array(),
				),
			);

			/* User roles */
			$roles = get_editable_roles();

			foreach ( $roles as $slug => $data ) {
				$selection_options['advanced']['value'][ $slug ] = $data['name'];
			}

			/**
			 * Filter options displayed in the user select field of Display conditions.
			 *
			 * @since 1.5.0
			 */
			return apply_filters( 'astra_user_roles_list', $selection_options );
		}


User Contributed Notes

You must log in before being able to contribute a note or feedback.