コード例 #1
0
function bp_checkins_browser_header($title_and_sep, $title, $sep, $seplocation)
{
    if (bp_checkins_if_single_place()) {
        $place_title = ucfirst(bp_get_checkins_slug()) . ' ' . $sep . ' Place' . $title_and_sep;
        $place = wp_cache_get('single_query', 'bp_checkins_single');
        if (false === $place || is_null($place->query->post->ID)) {
            $place = new BP_Checkins_Place();
            $place->get(array('p' => bp_action_variable(0)));
        }
        $place_title = apply_filters('get_the_title', $place->query->post->post_title) . ' ' . $sep . ' Place' . $title_and_sep;
        return $place_title;
    } elseif (bp_checkins_if_category_place()) {
        return ucfirst(bp_get_checkins_places_term_info('name', bp_action_variable(1))) . $title_and_sep;
    } elseif (bp_checkins_if_place_home()) {
        return __('Browse or Search Places', 'bp-checkins') . $title_and_sep;
    } elseif (bp_checkins_is_directory()) {
        return ucfirst(bp_get_checkins_slug()) . ' &amp Places ' . $sep . ' ';
    } else {
        return $title_and_sep;
    }
}
コード例 #2
0
function bp_get_checkins_places_category_link($slug = false)
{
    if (empty($slug)) {
        $slug = bp_get_checkins_places_term_info('slug');
    }
    $permalink = bp_get_root_domain() . '/' . bp_get_checkins_root_slug() . '/place/category/' . $slug;
    return apply_filters('bp_get_checkins_places_category_link', $permalink);
}