Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
WPF_USERGROUP::load_options()

Contents


Return Return

(array[])


Source Source

File: src/integrations/wpforo/actions/wpf-usergroup.php

	public function load_options() {
		$usergroups = WPF()->usergroup->get_usergroups();
		$group_options = array();
		foreach ( $usergroups as $key => $group ) {
			$group_options[ $group['groupid'] ] = $group['name'];
		}
		$option = array(
			'option_code' => 'FOROGROUP',
			'label'       => esc_attr__( 'User groups', 'uncanny-automator' ),
			'input_type'  => 'select',
			'required'    => true,
			'options'     => $group_options,
		);
		return Automator()->utilities->keep_order_of_options(
			array(
				'options' => array(
					$option,
				),
			)
		);
	}