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()) . ' & Places ' . $sep . ' '; } else { return $title_and_sep; } }
function bp_checkins_load_gmap3() { if (bp_checkins_is_activity_or_friends() || bp_checkins_is_directory() || bp_checkins_is_group_checkins_area()) { wp_enqueue_script('google-maps', 'http://maps.google.com/maps/api/js?sensor=false'); wp_enqueue_script('gmap3', BP_CHECKINS_PLUGIN_URL_JS . '/gmap3.min.js', array('jquery')); wp_enqueue_style('bpcistyle', BP_CHECKINS_PLUGIN_URL_CSS . '/bpcinstyle.css'); if (!empty($_GET['map']) && $_GET['map'] == 1) { global $bpci_lat, $bpci_lng; $bpci_lat = bp_activity_get_meta(bp_current_action(), 'bpci_activity_lat'); $bpci_lng = bp_activity_get_meta(bp_current_action(), 'bpci_activity_lng'); if (!empty($bpci_lat) && !empty($bpci_lng)) { add_action('wp_head', 'bp_checkins_item_map'); } } elseif (bp_checkins_show_friends_checkins()) { wp_enqueue_script('bp-ckeckins-friends', BP_CHECKINS_PLUGIN_URL_JS . '/bp-checkins-friends.js'); } else { if (bp_checkins_is_directory() || bp_checkins_is_group_checkins_area()) { wp_enqueue_script('bp-ckeckins-dir', BP_CHECKINS_PLUGIN_URL_JS . '/bp-checkins-dir.js'); bp_checkins_localize_script('dir'); } else { wp_enqueue_script('bp-ckeckins', BP_CHECKINS_PLUGIN_URL_JS . '/bp-checkins.js'); bp_checkins_localize_script('activity'); } } if (bp_is_single_activity()) { add_action('wp_footer', 'bp_checkins_img_trick'); } } if (bp_displayed_user_id() && bp_is_settings_component() && bp_is_current_action('checkins-settings')) { wp_enqueue_style('bpcistyle', BP_CHECKINS_PLUGIN_URL_CSS . '/bpcinstyle.css'); } }