function sp_find_group($atts = array()) { if (get_post_type() == 'section') { $i = sp_get_section_type(); $name = ScoutWP\Section::$names[$i]; $url = sp_find_section_uri(); } else { $name = __('Group or Unit', 'scoutwp_plugin'); $url = sp_find_group_uri(); } $name = sprintf(__('Find your local %s', 'scoutwp_plugin'), $name); return "<a href=\"{$url}\" class=\"button-link find-group icon-location\">{$name}</a>"; }
function sp_get_section_ages() { return ScoutWP\Definitions::age_range_text(sp_get_section_type()); }