Ejemplo n.º 1
0
/**
 * Output the members component slug.
 *
 * @since 1.5.0
 *
 * @uses bp_get_members_slug()
 */
function bp_members_slug()
{
    echo bp_get_members_slug();
}
Ejemplo n.º 2
0
 private function _expand_macro($macro)
 {
     $value = false;
     $user = wp_get_current_user();
     switch ($macro) {
         case 'BP_ACTIVITY_SLUG':
             if (function_exists('bp_get_activity_root_slug')) {
                 $value = bp_get_activity_root_slug();
             }
             break;
         case 'BP_GROUPS_SLUG':
             if (function_exists('bp_get_groups_slug')) {
                 $value = bp_get_groups_slug();
             }
             break;
         case 'BP_MEMBERS_SLUG':
             if (function_exists('bp_get_members_slug')) {
                 $value = bp_get_members_slug();
             }
             break;
     }
     return apply_filters('logout_redirect-macro_value', $value, $macro);
 }
Ejemplo n.º 3
0
function bebop_rss_buttons()
{
    global $bp;
    $count = 0;
    $rss_active_extensions = array();
    $extensions = bebop_extensions::bebop_get_active_extension_names();
    $user = $bp->displayed_user->userdata;
    echo '<div class="rss_feed_container">';
    foreach ($extensions as $extension) {
        if (bebop_tables::get_option_value('bebop_' . $extension . '_rss_feed') == 'on') {
            $extension = bebop_extensions::bebop_get_extension_config_by_name(strtolower($extension));
            if (bebop_tables::get_user_meta_value($user->ID, 'bebop_' . $extension['name'] . '_active_for_user') == 1) {
                echo '<a class="button bp-secondary-action" href="' . get_bloginfo('url') . '/' . bp_get_members_slug() . '/' . $user->user_nicename . '/' . bp_get_activity_slug() . '/' . $extension['name'] . '"><img style="vertical-align: text-top;"' . 'src="' . plugins_url() . '/bebop/core/resources/images/feed_14px.png"> ' . $extension['display_name'] . '</a>';
                $count++;
            }
        }
    }
    if ($count >= 2) {
        echo ' <a class="button bp-secondary-action" href="' . get_bloginfo('url') . '/' . bp_get_members_slug() . '/' . $user->user_nicename . '/' . bp_get_activity_slug() . '/all_oers"><img style="vertical-align: text-top;"' . 'src="' . plugins_url() . '/bebop/core/resources/images/feed_14px.png"> All</a>';
    }
    echo '</div>';
}
/**
 * Expands some basic supported BuddyPress macros.
 */
function wdfb_expand_buddypress_macros($str)
{
    if (!defined('BP_VERSION')) {
        return $str;
    }
    if (function_exists('bp_get_activity_root_slug')) {
        $str = preg_replace('/\\bBP_ACTIVITY_SLUG\\b/', bp_get_activity_root_slug(), $str);
    }
    if (function_exists('bp_get_groups_slug')) {
        $str = preg_replace('/\\bBP_GROUPS_SLUG\\b/', bp_get_groups_slug(), $str);
    }
    if (function_exists('bp_get_members_slug')) {
        $str = preg_replace('/\\bBP_MEMBERS_SLUG\\b/', bp_get_members_slug(), $str);
    }
    return $str;
}