Changeset 12776 for trunk/src/bp-members/bp-members-functions.php
- Timestamp:
- 11/09/2020 02:47:32 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r12768 r12776 2690 2690 'bp_get_member_type_tax_labels', 2691 2691 array( 2692 'name' => _x( 'Member types', 'Member type taxonomy name', 'buddypress' ), 2693 'singular_name' => _x( 'Member type', 'Member type taxonomy singular name', 'buddypress' ), 2694 'search_items' => _x( 'Search Member types', 'Member type taxonomy search items label', 'buddypress' ), 2695 'popular_items' => _x( 'Most used Member types', 'Member type taxonomy popular items label', 'buddypress' ), 2696 'all_items' => _x( 'All Member types', 'Member type taxonomy all items label', 'buddypress' ), 2697 'edit_item' => _x( 'Edit Member type', 'Member type taxonomy edit item label', 'buddypress' ), 2698 'view_item' => _x( 'View Member type', 'Member type taxonomy view item label', 'buddypress' ), 2699 'update_item' => _x( 'Update Member type', 'Member type taxonomy update item label', 'buddypress' ), 2700 'add_new_item' => _x( 'Add new Member type', 'Member type taxonomy add new item label', 'buddypress' ), 2701 'new_item_name' => _x( 'New Member type name', 'Member type taxonomy new item name label', 'buddypress' ), 2702 'separate_items_with_commas' => _x( 'Separate Member types with commas', 'Member type taxonomy separate items with commas label', 'buddypress' ), 2703 'add_or_remove_items' => _x( 'Add or remove Member types', 'Member type taxonomy add or remove items label', 'buddypress' ), 2704 'choose_from_most_used' => _x( 'Choose from the most used Member types', 'Member type taxonomy choose from most used label', 'buddypress' ), 2705 'not_found' => _x( 'No Member types found', 'Member type taxonomy not found label', 'buddypress' ), 2706 'no_terms' => _x( 'No Member types', 'Member type taxonomy no terms label', 'buddypress' ), 2707 'items_list_navigation' => _x( 'Member types list navigation', 'Member type taxonomy items list navigation label', 'buddypress' ), 2708 'items_list' => _x( 'Member types list', 'Member type taxonomy items list label', 'buddypress' ), 2709 'back_to_items' => _x( 'Back to all Member types', 'Member type taxonomy back to items label', 'buddypress' ), 2692 2693 // General labels 2694 'name' => _x( 'Member Types', 'Member type taxonomy name', 'buddypress' ), 2695 'singular_name' => _x( 'Member Type', 'Member type taxonomy singular name', 'buddypress' ), 2696 'search_items' => _x( 'Search Member Types', 'Member type taxonomy search items label', 'buddypress' ), 2697 'popular_items' => _x( 'Popular Member Types', 'Member type taxonomy popular items label', 'buddypress' ), 2698 'all_items' => _x( 'All Member Types', 'Member type taxonomy all items label', 'buddypress' ), 2699 'parent_item' => _x( 'Parent Member Type', 'Member type taxonomy parent item label', 'buddypress' ), 2700 'parent_item_colon' => _x( 'Parent Member Type:', 'Member type taxonomy parent item label', 'buddypress' ), 2701 'edit_item' => _x( 'Edit Member Type', 'Member type taxonomy edit item label', 'buddypress' ), 2702 'view_item' => _x( 'View Member Type', 'Member type taxonomy view item label', 'buddypress' ), 2703 'update_item' => _x( 'Update Member Type', 'Member type taxonomy update item label', 'buddypress' ), 2704 'add_new_item' => _x( 'Add New Member Type', 'Member type taxonomy add new item label', 'buddypress' ), 2705 'new_item_name' => _x( 'New Member Type Name', 'Member type taxonomy new item name label', 'buddypress' ), 2706 'separate_items_with_commas' => _x( 'Separate member types with commas', 'Member type taxonomy separate items with commas label', 'buddypress' ), 2707 'add_or_remove_items' => _x( 'Add or remove member types', 'Member type taxonomy add or remove items label', 'buddypress' ), 2708 'choose_from_most_used' => _x( 'Choose from the most used meber types', 'Member type taxonomy choose from most used label', 'buddypress' ), 2709 'not_found' => _x( 'No member types found.', 'Member type taxonomy not found label', 'buddypress' ), 2710 'no_terms' => _x( 'No member types', 'Member type taxonomy no terms label', 'buddypress' ), 2711 'items_list_navigation' => _x( 'Member Types list navigation', 'Member type taxonomy items list navigation label', 'buddypress' ), 2712 'items_list' => _x( 'Member Types list', 'Member type taxonomy items list label', 'buddypress' ), 2713 2714 /* translators: Tab heading when selecting from the most used terms. */ 2715 'most_used' => _x( 'Most Used', 'Member type taxonomy most used items label', 'buddypress' ), 2716 'back_to_items' => _x( '← Back to Member Types', 'Member type taxonomy back to items label', 'buddypress' ), 2717 2710 2718 // Specific to BuddyPress. 2711 2719 'bp_type_id_label' => _x( 'Member Type ID', 'BP Member type ID label', 'buddypress' ), … … 2735 2743 array_merge( 2736 2744 array( 2737 'description' => _x( 'BuddyPress Member types', 'Member type taxonomy description', 'buddypress' ),2745 'description' => _x( 'BuddyPress Member Types', 'Member type taxonomy description', 'buddypress' ), 2738 2746 'labels' => array_merge( bp_get_member_type_tax_labels(), bp_get_taxonomy_common_labels() ), 2739 2747 ), … … 2742 2750 ); 2743 2751 } 2752 2753 /** 2754 * Extend generic Type metadata schema to match Member Type needs. 2755 * 2756 * @since 7.0.0 2757 * 2758 * @param array $schema The generic Type metadata schema. 2759 * @param string $taxonomy The taxonomy name the schema applies to. 2760 * @return array The Member Type metadata schema. 2761 */ 2762 function bp_get_member_type_metadata_schema( $schema = array(), $taxonomy = '' ) { 2763 if ( bp_get_member_type_tax_name() === $taxonomy ) { 2764 2765 // Directory 2766 if ( isset( $schema['bp_type_has_directory']['description'] ) ) { 2767 $schema['bp_type_has_directory']['description'] = __( 'Make a list of members matching this type available on the members directory.', 'buddypress' ); 2768 } 2769 2770 // Slug 2771 if ( isset( $schema['bp_type_directory_slug']['description'] ) ) { 2772 $schema['bp_type_directory_slug']['description'] = __( 'Enter if you want the type slug to be different from its ID.', 'buddypress' ); 2773 } 2774 } 2775 2776 return $schema; 2777 } 2778 add_filter( 'bp_get_type_metadata_schema', 'bp_get_member_type_metadata_schema', 1, 2 ); 2744 2779 2745 2780 /**
Note: See TracChangeset
for help on using the changeset viewer.