{"action":"closed","issue":{"url":"https://api.github.com/repos/reduxframework/redux-framework/issues/2768","labels_url":"https://api.github.com/repos/reduxframework/redux-framework/issues/2768/labels{/name}","comments_url":"https://api.github.com/repos/reduxframework/redux-framework/issues/2768/comments","events_url":"https://api.github.com/repos/reduxframework/redux-framework/issues/2768/events","html_url":"https://github.com/reduxframework/redux-framework/issues/2768","id":123334423,"number":2768,"title":"How to Use Old PHP Code in Redux Framework","user":{"login":"TuxReports","id":6074038,"avatar_url":"https://avatars.githubusercontent.com/u/6074038?v=3","gravatar_id":"","url":"https://api.github.com/users/TuxReports","html_url":"https://github.com/TuxReports","followers_url":"https://api.github.com/users/TuxReports/followers","following_url":"https://api.github.com/users/TuxReports/following{/other_user}","gists_url":"https://api.github.com/users/TuxReports/gists{/gist_id}","starred_url":"https://api.github.com/users/TuxReports/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TuxReports/subscriptions","organizations_url":"https://api.github.com/users/TuxReports/orgs","repos_url":"https://api.github.com/users/TuxReports/repos","events_url":"https://api.github.com/users/TuxReports/events{/privacy}","received_events_url":"https://api.github.com/users/TuxReports/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-21T18:38:28Z","updated_at":"2015-12-21T18:40:27Z","closed_at":"2015-12-21T18:40:27Z","body":"I've asked this a year or two ago, but I gave up and am now back at looking at ways to get this to work.  I'd like to build a foreach loop that pulls the usergroup from a forum (external from WordPress) that allows a dropdown of the WordPress user roles. \r\n\r\nBelow is the old code, before changing over to Redux Framework.\r\n\t\t\t\t\t\r\n\t\t\t\t\t$UGModel    = $XF->getModelFromCache( 'XenForo_Model_UserGroup' );\r\n\t\t\t\t\t$usergroups = $UGModel->getAllUserGroups();\r\n\r\n\t\t\t\t\tforeach ($usergroups as $usergroup) {\r\n\t\t\t\t\t$id    = $usergroup['user_group_id'];\r\n\t\t\t\t\t$title = $usergroup['title'];\r\n\t\t\t\t\techo '<table><tr><td width=\"75%\">';\r\n\t\t\t\t\techo '<label for=\"xf_user_role_' . $id . '\">';\r\n\t\t\t\t\techo $title . ' has role ';\r\n\t\t\t\t\techo '</td><td>';\r\n\t\t\t\t\techo '<select name=\"xf_user_role_' . $id . '\" id=\"xf_user_role_' . $id . '\">';\r\n\t\t\t\t\twp_dropdown_roles( $xf_options['xf_user_role'][ $id ] );\r\n\t\t\t\t\t\r\n\r\nMy PHP skills are weak, as I learn more and more each day, but would like some direction. I've looked at building an extension to Redux but with the new config am not totally sure on the steps. \r\n\r\nYou have a method render() in the custom field example extension. Is this where I'd begin to get the foreach loop to show in the Options Panel built by Redux Framework?"}}