bp_member_type_changing_listing_label()
Adds the JS on profile type post type.
Description
Source
File: bp-members/bp-members-functions.php
function bp_member_type_changing_listing_label() { global $current_screen; $url_clip_board = buddypress()->plugin_url . 'bp-core/js/vendor/'; $url_member = buddypress()->plugin_url . 'bp-core/js/'; $bp_member_type_pages = array( 'edit-bp-member-type', 'bp-member-type', 'bp-group-type', 'edit-bp-group-type' ); // Check to make sure we're on a profile type's admin page if ( isset( $current_screen->id ) && in_array( $current_screen->id, $bp_member_type_pages ) ) { wp_enqueue_script('bp-clipboard',$url_clip_board.'clipboard.js',array(), bp_get_version() ); wp_enqueue_script('bp-member-type-admin-screen',$url_member.'bp-member-type-admin-screen.js',array('jquery'), bp_get_version() ); $strings = array( 'warnTrash' => __( 'You have {total_users} members with this profile type, are you sure you would like to trash it?', 'buddyboss' ), 'warnDelete' => __( 'You have {total_users} members with this profile type, are you sure you would like to delete it?', 'buddyboss' ), 'warnBulkTrash' => __( 'You have members with these profile types, are you sure you would like to trash it?', 'buddyboss' ), 'warnBulkDelete' => __( 'You have members with these profile types, are you sure you would like to delete it?', 'buddyboss' ), 'copied' => __( 'Copied', 'buddyboss' ), 'copytoclipboard' => __( 'Copy to clipboard', 'buddyboss' ), ); wp_localize_script( 'bp-member-type-admin-screen', '_bpmtAdminL10n', $strings ); } }
Changelog
Version | Description |
---|---|
BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.