Skip to:
Content

BuddyPress.org

Ticket #4786: 4786.patch

File 4786.patch, 754 bytes (added by boonebgorges, 10 years ago)
  • bp-activity/bp-activity-admin.php

    diff --git bp-activity/bp-activity-admin.php bp-activity/bp-activity-admin.php
    index 4912da0..5a126f3 100644
    function bp_activity_admin_edit_metabox_type( $item ) { 
    762762        unset( $actions['friends_register_activity_action'] );
    763763
    764764        // Sort array by the human-readable value
    765         natsort( $actions ); ?>
     765        natsort( $actions );
     766
     767        // If the activity type is not registered properly (eg, a plugin has
     768        // not called bp_activity_set_action()), add the raw type to the end
     769        // of the list
     770        if ( ! isset( $actions[ $selected ] ) ) {
     771                $actions[ $selected ] = $selected;
     772        }
     773
     774        ?>
    766775
    767776        <select name="bp-activities-type">
    768777                <?php foreach ( $actions as $k => $v ) : ?>