Skip to:
Content

BuddyPress.org

Ticket #6513: 6513.diff

File 6513.diff, 4.1 KB (added by pareshradadiya, 9 years ago)

patch using the span + filter method

  • src/bp-groups/bp-groups-widgets.php

     
    7272                 */
    7373                $title = apply_filters( 'widget_title', $instance['title'], $instance, $this->id_base );
    7474
     75                /**
     76                 * Filters the separator of the group list options
     77                 */
     78                $separator = apply_filters( 'bp_groups_widget_separator', '|' );
     79
    7580                echo $before_widget;
    7681
    7782                $title = !empty( $instance['link_title'] ) ? '<a href="' . bp_get_groups_directory_permalink() . '">' . $title . '</a>' : $title;
     
    8994
    9095                <?php if ( bp_has_groups( $group_args ) ) : ?>
    9196                        <div class="item-options" id="groups-list-options">
    92                                 <a href="<?php bp_groups_directory_permalink(); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a> |
    93                                 <a href="<?php bp_groups_directory_permalink(); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a> |
     97                                <a href="<?php bp_groups_directory_permalink(); ?>" id="newest-groups"<?php if ( $instance['group_default'] == 'newest' ) : ?> class="selected"<?php endif; ?>><?php _e("Newest", 'buddypress') ?></a>
     98                                <span class="bp-separator" role="separator"><?php echo esc_html( $separator ); ?></span>
     99                                <a href="<?php bp_groups_directory_permalink(); ?>" id="recently-active-groups"<?php if ( $instance['group_default'] == 'active' ) : ?> class="selected"<?php endif; ?>><?php _e("Active", 'buddypress') ?></a>
     100                                <span class="bp-separator" role="separator"><?php echo esc_html( $separator ); ?></span>
    94101                                <a href="<?php bp_groups_directory_permalink(); ?>" id="popular-groups" <?php if ( $instance['group_default'] == 'popular' ) : ?> class="selected"<?php endif; ?>><?php _e("Popular", 'buddypress') ?></a>
    95102                        </div>
    96103
  • src/bp-members/bp-members-widgets.php

     
    7676                $title = apply_filters( 'widget_title', $settings['title'], $settings, $this->id_base );
    7777                $title = $settings['link_title'] ? '<a href="' . bp_get_members_directory_permalink() . '">' . $title . '</a>' : $title;
    7878
     79                /**
     80                 * Filters the separator of the member list options
     81                 */
     82                $separator = apply_filters( 'bp_members_widget_separator', '|' );
     83
    7984                // Output before widget HTMl, title (and maybe content before & after it)
    8085                echo $args['before_widget']
    8186                   . $args['before_title']
     
    96101
    97102                        <div class="item-options" id="members-list-options">
    98103                                <a href="<?php bp_members_directory_permalink(); ?>" id="newest-members" <?php if ( 'newest' === $settings['member_default'] ) : ?>class="selected"<?php endif; ?>><?php esc_html_e( 'Newest', 'buddypress' ); ?></a>
    99                                 |  <a href="<?php bp_members_directory_permalink(); ?>" id="recently-active-members" <?php if ( 'active' === $settings['member_default'] ) : ?>class="selected"<?php endif; ?>><?php esc_html_e( 'Active', 'buddypress' ); ?></a>
     104                                <span class="bp-separator" role="separator"><?php echo esc_html( $separator ); ?></span>
     105                                <a href="<?php bp_members_directory_permalink(); ?>" id="recently-active-members" <?php if ( 'active' === $settings['member_default'] ) : ?>class="selected"<?php endif; ?>><?php esc_html_e( 'Active', 'buddypress' ); ?></a>
    100106
    101107                                <?php if ( bp_is_active( 'friends' ) ) : ?>
     108                                        <span class="bp-separator" role="separator"><?php echo esc_html( $separator ); ?></span>
     109                                        <a href="<?php bp_members_directory_permalink(); ?>" id="popular-members" <?php if ( 'popular' === $settings['member_default'] ) : ?>class="selected"<?php endif; ?>><?php esc_html_e( 'Popular', 'buddypress' ); ?></a>
    102110
    103                                         | <a href="<?php bp_members_directory_permalink(); ?>" id="popular-members" <?php if ( 'popular' === $settings['member_default'] ) : ?>class="selected"<?php endif; ?>><?php esc_html_e( 'Popular', 'buddypress' ); ?></a>
    104 
    105111                                <?php endif; ?>
    106112
    107113                        </div>