Skip to:
Content

BuddyPress.org

Changeset 6309


Ignore:
Timestamp:
09/06/2012 03:48:42 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Group Admin:

  • Only include group admin UI if in wp-admin.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-admin.php

    r6293 r6309  
    612612
    613613                <?php else : ?>
    614                         <p><?php printf( __( 'No activity found with this ID. <a href="%s">Go back and try again</a>.', 'buddypress' ), network_admin_url( 'admin.php?page=bp-activity' ) ); ?></p>
     614                        <p><?php printf( __( 'No activity found with this ID. <a href="%s">Go back and try again</a>.', 'buddypress' ), esc_url( bp_get_admin_url( 'admin.php?page=bp-activity' ) ) ); ?></p>
    615615                <?php endif; ?>
    616616
     
    875875                                                        <a href="#" class="save button-primary alignright"><?php _e( 'Reply', 'buddypress' ); ?></a>
    876876
    877                                                         <img class="waiting" style="display:none;" src="<?php echo esc_url( network_admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
     877                                                        <img class="waiting" style="display:none;" src="<?php echo esc_url( bp_get_admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" />
    878878                                                        <span class="error" style="display:none;"></span>
    879879                                                        <br class="clear" />
     
    12661266
    12671267                // Build actions URLs
    1268                 $base_url   = network_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
     1268                $base_url   = bp_get_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
    12691269                $spam_nonce = esc_html( '_wpnonce=' . wp_create_nonce( 'spam-activity_' . $item['id'] ) );
    12701270
     
    13251325                if ( empty( $item['item_id'] ) || ! in_array( $item['type'], apply_filters( 'bp_activity_admin_root_activity_types', array( 'activity_comment' ), $item ) ) ) {
    13261326                        $comment_count     = !empty( $item['children'] ) ? bp_activity_recurse_comment_count( (object) $item ) : 0;
    1327                         $root_activity_url = network_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
     1327                        $root_activity_url = bp_get_admin_url( 'admin.php?page=bp-activity&amp;aid=' . $item['id'] );
    13281328
    13291329                        // If the activity has comments, display a link to the activity's permalink, with its comment count in a speech bubble
    13301330                        if ( $comment_count ) {
    13311331                                $title_attr = sprintf( _n( '%s related activity', '%s related activities', $comment_count, 'buddypress' ), number_format_i18n( $comment_count ) );
    1332                                 printf( '<a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', esc_attr( $root_activity_url ), esc_attr( $title_attr ), number_format_i18n( $comment_count ) );
     1332                                printf( '<a href="%1$s" title="%2$s" class="post-com-count"><span class="comment-count">%3$s</span></a>', esc_url( $root_activity_url ), esc_attr( $title_attr ), number_format_i18n( $comment_count ) );
    13331333                        }
    13341334
  • trunk/bp-groups/bp-groups-admin.php

    r6293 r6309  
    507507
    508508                <?php else : ?>
    509                         <p><?php printf( __( 'No group found with this ID. <a href="%s">Go back and try again</a>.', 'buddypress' ), network_admin_url( 'admin.php?page=bp-groups' ) ); ?></p>
     509                        <p><?php printf( __( 'No group found with this ID. <a href="%s">Go back and try again</a>.', 'buddypress' ), esc_url( bp_get_admin_url( 'admin.php?page=bp-groups' ) ) ); ?></p>
    510510                <?php endif; ?>
    511511
     
    810810                'page' => 'bp-groups',
    811811                'gid'  => $item->id
    812         ), is_network_admin() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) );
    813 ?>
     812        ), bp_get_admin_url( 'admin.php' ) ); ?>
     813
    814814        <div id="submitcomment" class="submitbox">
    815815                <div id="major-publishing-actions">
     
    12011201
    12021202                // Build actions URLs
    1203                 $base_url   = network_admin_url( 'admin.php?page=bp-groups&amp;gid=' . $item['id'] );
     1203                $base_url   = bp_get_admin_url( 'admin.php?page=bp-groups&amp;gid=' . $item['id'] );
    12041204
    12051205                $delete_url = wp_nonce_url( $base_url . "&amp;action=delete", 'bp-groups-delete' );
     
    12101210
    12111211                // Visit
    1212                 $actions['visit'] = sprintf( '<a href="%s">%s</a>', $visit_url, __( 'Visit', 'buddypress' ) );
     1212                $actions['visit'] = sprintf( '<a href="%s">%s</a>', esc_url( $visit_url ), __( 'Visit', 'buddypress' ) );
    12131213
    12141214                // Edit
    1215                 $actions['edit'] = sprintf( '<a href="%s">%s</a>', $edit_url, __( 'Edit', 'buddypress' ) );
     1215                $actions['edit'] = sprintf( '<a href="%s">%s</a>', esc_url( $edit_url ), __( 'Edit', 'buddypress' ) );
    12161216
    12171217                // Delete
    1218                 $actions['delete'] = sprintf( '<a href="%s">%s</a>', $delete_url, __( 'Delete', 'buddypress' ) );
     1218                $actions['delete'] = sprintf( '<a href="%s">%s</a>', esc_url( $delete_url ), __( 'Delete', 'buddypress' ) );
    12191219
    12201220                // Other plugins can filter which actions are shown
Note: See TracChangeset for help on using the changeset viewer.