diff --git a/src/bp-core/admin/bp-core-admin-types.php b/src/bp-core/admin/bp-core-admin-types.php
index 80e9982b2..6a419d5f3 100644
a
|
b
|
function bp_core_admin_insert_type( $args = array() ) { |
54 | 54 | $default_args = array( |
55 | 55 | 'taxonomy' => '', |
56 | 56 | 'bp_type_id' => '', |
| 57 | 'bp_type_singular_name' => '', |
| 58 | 'bp_type_name' => '', |
57 | 59 | ); |
58 | 60 | |
59 | 61 | $args = array_map( 'wp_unslash', $args ); |
… |
… |
function bp_core_admin_insert_type( $args = array() ) { |
66 | 68 | if ( ! $args['bp_type_id'] || ! $args['taxonomy'] ) { |
67 | 69 | return new WP_Error( |
68 | 70 | 'invalid_type_taxonomy', |
69 | | __( 'The Type ID value is missing', 'buddypress' ), |
| 71 | __( 'Member Type ID value is missing', 'buddypress' ), |
70 | 72 | array( |
71 | 73 | 'message' => 1, |
72 | 74 | ) |
73 | 75 | ); |
74 | 76 | } |
75 | 77 | |
| 78 | if ( ! $args['bp_type_singular_name'] ) { |
| 79 | return new WP_Error( |
| 80 | 'empty_field_singular', |
| 81 | __( 'Member Type Singular Name value is missing', 'buddypress' ), |
| 82 | array( |
| 83 | 'message' => 11, |
| 84 | ) |
| 85 | ); |
| 86 | } |
| 87 | if ( ! $args['bp_type_name'] ) { |
| 88 | return new WP_Error( |
| 89 | 'empty_field_plural', |
| 90 | __( 'Member Type Plural Name value is missing', 'buddypress' ), |
| 91 | array( |
| 92 | 'message' => 12, |
| 93 | ) |
| 94 | ); |
| 95 | } |
| 96 | |
76 | 97 | $type_id = sanitize_title( $args['bp_type_id'] ); |
77 | 98 | $type_taxonomy = sanitize_key( $args['taxonomy'] ); |
78 | 99 | |
diff --git a/src/bp-core/bp-core-functions.php b/src/bp-core/bp-core-functions.php
index d98b73e1c..910f48465 100644
a
|
b
|
function bp_get_taxonomy_common_args() { |
3289 | 3289 | */ |
3290 | 3290 | function bp_get_taxonomy_common_labels() { |
3291 | 3291 | return array( |
3292 | | 'bp_type_name' => _x( 'Plural Name', 'BP Type name label', 'buddypress' ), |
3293 | | 'bp_type_singular_name' => _x( 'Singular name', 'BP Type singular name label', 'buddypress' ), |
| 3292 | 'bp_type_name' => _x( 'Plural Name (required)', 'BP Type name label', 'buddypress' ), |
| 3293 | 'bp_type_singular_name' => _x( 'Singular Name (required)', 'BP Type singular name label', 'buddypress' ), |
3294 | 3294 | 'bp_type_has_directory' => _x( 'Has Directory View', 'BP Type has directory checkbox label', 'buddypress' ), |
3295 | 3295 | 'bp_type_directory_slug' => _x( 'Custom type directory slug', 'BP Type slug label', 'buddypress' ), |
3296 | 3296 | ); |
diff --git a/src/bp-members/bp-members-admin.php b/src/bp-members/bp-members-admin.php
index 7bef5cd9b..5f1ab28d0 100644
a
|
b
|
function bp_members_type_admin_updated_messages( $messages = array() ) { |
107 | 107 | 8 => __( 'Sorry, there was an error while trying to delete this Member type.', 'buddypress' ), |
108 | 108 | 9 => __( 'Member type successfully deleted.', 'buddypress' ), |
109 | 109 | 10 => __( 'Member type could not be updated due to missing required information.', 'buddypress' ), |
| 110 | 11 => __( 'Please define the Member Type Singular Name field.', 'buddypress' ), |
| 111 | 12 => __( 'Please define the Member Type Plural Name field.', 'buddypress' ), |
110 | 112 | ); |
111 | 113 | |
112 | 114 | return $messages; |
diff --git a/src/bp-members/bp-members-functions.php b/src/bp-members/bp-members-functions.php
index 129a6f93d..e2fe05dd5 100644
a
|
b
|
function bp_get_member_type_tax_labels() { |
2740 | 2740 | 'back_to_items' => _x( '← Back to Member Types', 'Member type taxonomy back to items label', 'buddypress' ), |
2741 | 2741 | |
2742 | 2742 | // Specific to BuddyPress. |
2743 | | 'bp_type_id_label' => _x( 'Member Type ID', 'BP Member type ID label', 'buddypress' ), |
| 2743 | 'bp_type_id_label' => _x( 'Member Type ID (required)', 'BP Member type ID label', 'buddypress' ), |
2744 | 2744 | 'bp_type_id_description' => _x( 'Enter a lower-case string without spaces or special characters (used internally to identify the member type).', 'BP Member type ID description', 'buddypress' ), |
2745 | 2745 | 'bp_type_show_in_list' => _x( 'Show on Member', 'BP Member type show in list', 'buddypress' ), |
2746 | 2746 | ) |