Richard,
I worked it out using this starting around line 130:
---------------------------------------------------------------------------------
public function promoted_courses($type) {
global $CFG, $OUTPUT, $DB, $PAGE, $USER;
$featuredcontent = '';
/* Get Featured courses id from DB */
$featuredids = theme_pioneer_get_setting('promotedcourses');
if ($type == 'tags') {
$sql = 'SELECT DISTINCT itemid FROM {tag_instance} WHERE itemtype = "course" AND tagid IN(SELECT tagid FROM {tag_instance} WHERE itemtype = "user" AND itemid = '.$USER->id.')';
$featuredidsarray = $DB->get_records_sql($sql, array());
$featuredids = '';
$promotedtitle = theme_pioneer_get_setting('promotedtag', 'format_text');
$promotedlinktext = theme_pioneer_get_setting('promotedtaglinktext', 'format_text');
$promotedlink = theme_pioneer_get_setting('promotedtaglink', 'format_text');
foreach ($featuredidsarray as $fid) {
$featuredids .= $fid->itemid.',';
}
}
if ($type == 'setting') {
$promotedtitle = theme_pioneer_get_setting('promotedtitle', 'format_text');
$promotedlinktext = theme_pioneer_get_setting('promotedlinktext', 'format_text');
$promotedlink = theme_pioneer_get_setting('promotedlink', 'format_text');
}
$featuredcontent = '';
/* Get Featured courses id from DB */
---------------------------------------------------------------------------------------
Moving the title, text and link url into the if statement and then removing those three items from the original location worked. Now I just have to add the theme admin settings for promotedtag items and it can utilize the same function with types.
Maybe this was what you were thinking???