Skip to:
Content

BuddyPress.org

Changeset 8472


Ignore:
Timestamp:
06/04/2014 06:29:33 AM (11 years ago)
Author:
imath
Message:

Allow plugins to add a custom column in Signup WP_List_Tables

Thanks to a new "column_default()" function in "BP_Members_List_Table" and in "BP_Members_MS_List_Table" (multisite), plugins will be able to add data rows to the eventual custom columns they created using the filters "bp_members_signup_columns" and "bp_members_ms_signup_columns".

Fixes #5678

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/admin/bp-members-classes.php

    r8438 r8472  
    335335        echo absint( $signup_object->count_sent );
    336336    }
     337
     338    /**
     339     * Allow plugins to add their costum column.
     340     *
     341     * @since BuddyPress 2.1.0
     342     *
     343     * @param object $signup_object The signup data object.
     344     * @param string the column name.
     345     */
     346    function column_default( $signup_object = null, $column_name = '' ) {
     347        return apply_filters( 'bp_members_signup_custom_column', '', $column_name, $signup_object );
     348    }
    337349}
    338350
     
    660672        echo absint( $signup_object->count_sent );
    661673    }
     674
     675    /**
     676     * Allow plugins to add their costum column.
     677     *
     678     * @since BuddyPress 2.1.0
     679     *
     680     * @param object $signup_object The signup data object.
     681     * @param string the column name.
     682     */
     683    function column_default( $signup_object = null, $column_name = '' ) {
     684        return apply_filters( 'bp_members_ms_signup_custom_column', '', $column_name, $signup_object );
     685    }
    662686}
    663687
Note: See TracChangeset for help on using the changeset viewer.