Changeset 13983
- Timestamp:
- 07/27/2024 06:44:41 PM (11 months ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/admin/bp-core-admin-types.php
r13890 r13983 45 45 * @type string $taxonomy The Type's taxonomy. Required. 46 46 * @type string $bp_type_id Unique string identifier for the member type. Required. 47 * @type string $bp_type_singular_name Singular name for the member type. Required. 48 * @type string $bp_type_name Plural name for the member type. Required. 47 49 * @see keys of the array returned by bp_get_type_metadata_schema() for the other arguments. 48 50 * } 49 * @return int eger|WP_Error The Type's term ID on success. A WP_Error object otherwise.51 * @return int|WP_Error The Type's term ID on success. A WP_Error object otherwise. 50 52 */ 51 53 function bp_core_admin_insert_type( $args = array() ) { … … 53 55 'taxonomy' => '', 54 56 'bp_type_id' => '', 57 'bp_type_singular_name' => '', 58 'bp_type_name' => '', 55 59 ); 56 60 … … 67 71 __( 'The Type ID value is missing', 'buddypress' ), 68 72 array( 'message' => 1 ) 73 ); 74 } 75 76 if ( ! $args['bp_type_singular_name'] ) { 77 return new WP_Error( 78 'empty_field_singular', 79 __( 'The Singular Name value is missing', 'buddypress' ), 80 array( 81 'message' => 11, 82 ) 83 ); 84 } 85 86 if ( ! $args['bp_type_name'] ) { 87 return new WP_Error( 88 'empty_field_plural', 89 __( 'The Plural Name value is missing', 'buddypress' ), 90 array( 91 'message' => 12, 92 ) 69 93 ); 70 94 } … … 117 141 } 118 142 143 $type_term_id = reset( $type_term_id ); 144 119 145 /** 120 146 * Hook here to add code once the type has been inserted. -
trunk/src/bp-core/bp-core-functions.php
r13974 r13983 3381 3381 function bp_get_taxonomy_common_labels() { 3382 3382 return array( 3383 'bp_type_name' => _x( 'Plural Name ', 'BP Type name label', 'buddypress' ),3384 'bp_type_singular_name' => _x( 'Singular name', 'BP Type singular name label', 'buddypress' ),3383 'bp_type_name' => _x( 'Plural Name (required)', 'BP Type name label', 'buddypress' ), 3384 'bp_type_singular_name' => _x( 'Singular Name (required)', 'BP Type singular name label', 'buddypress' ), 3385 3385 'bp_type_has_directory' => _x( 'Has Directory View', 'BP Type has directory checkbox label', 'buddypress' ), 3386 3386 'bp_type_directory_slug' => _x( 'Custom type directory slug', 'BP Type slug label', 'buddypress' ), -
trunk/src/bp-groups/bp-groups-admin.php
r13974 r13983 1513 1513 9 => __( 'Group type successfully deleted.', 'buddypress' ), 1514 1514 10 => __( 'Group type could not be updated due to missing required information.', 'buddypress' ), 1515 11 => __( 'Please define the Group Type Singular Name field.', 'buddypress' ), 1516 12 => __( 'Please define the Group Type Plural Name field.', 'buddypress' ), 1515 1517 ); 1516 1518 -
trunk/src/bp-groups/bp-groups-functions.php
r13890 r13983 2840 2840 2841 2841 // Specific to BuddyPress. 2842 'bp_type_id_label' => _x( 'Group Type ID ', 'BP Member type ID label', 'buddypress' ),2842 'bp_type_id_label' => _x( 'Group Type ID (required)', 'BP Member type ID label', 'buddypress' ), 2843 2843 'bp_type_id_description' => _x( 'Lower-case string, no spaces or special characters. Used to identify the group type.', 'BP Group type ID description', 'buddypress' ), 2844 2844 'bp_type_show_in_create_screen' => _x( 'Show on Group Creation', 'BP Group type show in create screen', 'buddypress' ), -
trunk/src/bp-members/bp-members-admin.php
r13799 r13983 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 -
trunk/src/bp-members/bp-members-functions.php
r13982 r13983 2767 2767 2768 2768 // Specific to BuddyPress. 2769 'bp_type_id_label' => _x( 'Member Type ID ', 'BP Member type ID label', 'buddypress' ),2769 'bp_type_id_label' => _x( 'Member Type ID (required)', 'BP Member type ID label', 'buddypress' ), 2770 2770 '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' ), 2771 2771 'bp_type_show_in_list' => _x( 'Show on Member', 'BP Member type show in list', 'buddypress' ),
Note: See TracChangeset
for help on using the changeset viewer.