- Timestamp:
- 04/28/2021 11:51:00 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/includes/functions.php
r12908 r12921 928 928 * 929 929 * @since 3.0.0 930 * @since 8.0.0 Adds the 'member-invites-none' feedback. 930 931 * 931 932 * @param string $feedback_id The ID of the message. … … 940 941 * 941 942 * @since 3.0.0 943 * @since 8.0.0 Adds the 'member-invites-none' feedback. 942 944 * 943 945 * @param array $value The list of feedback messages. 944 946 */ 945 $feedback_messages = apply_filters( 'bp_nouveau_feedback_messages', array( 946 'registration-disabled' => array( 947 'type' => 'info', 948 'message' => __( 'Member registration is currently not allowed.', 'buddypress' ), 949 'before' => 'bp_before_registration_disabled', 950 'after' => 'bp_after_registration_disabled' 951 ), 952 'request-details' => array( 953 'type' => 'info', 954 'message' => __( 'Registering for this site is easy. Just fill in the fields below, and we\'ll get a new account set up for you in no time.', 'buddypress' ), 955 'before' => false, 956 'after' => false, 957 ), 958 'completed-confirmation' => array( 959 'type' => 'info', 960 'message' => __( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ), 961 'before' => 'bp_before_registration_confirmed', 962 'after' => 'bp_after_registration_confirmed', 963 ), 964 'directory-activity-loading' => array( 965 'type' => 'loading', 966 'message' => __( 'Loading the community updates. Please wait.', 'buddypress' ), 967 ), 968 'single-activity-loading' => array( 969 'type' => 'loading', 970 'message' => __( 'Loading the update. Please wait.', 'buddypress' ), 971 ), 972 'activity-loop-none' => array( 973 'type' => 'info', 974 'message' => __( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ), 975 ), 976 'blogs-loop-none' => array( 977 'type' => 'info', 978 'message' => __( 'Sorry, there were no sites found.', 'buddypress' ), 979 ), 980 'blogs-no-signup' => array( 981 'type' => 'info', 982 'message' => __( 'Site registration is currently disabled.', 'buddypress' ), 983 ), 984 'directory-blogs-loading' => array( 985 'type' => 'loading', 986 'message' => __( 'Loading the sites of the network. Please wait.', 'buddypress' ), 987 ), 988 'directory-groups-loading' => array( 989 'type' => 'loading', 990 'message' => __( 'Loading the groups of the community. Please wait.', 'buddypress' ), 991 ), 992 'groups-loop-none' => array( 993 'type' => 'info', 994 'message' => __( 'Sorry, there were no groups found.', 'buddypress' ), 995 ), 996 'group-activity-loading' => array( 997 'type' => 'loading', 998 'message' => __( 'Loading the group updates. Please wait.', 'buddypress' ), 999 ), 1000 'group-members-loading' => array( 1001 'type' => 'loading', 1002 'message' => __( 'Requesting the group members. Please wait.', 'buddypress' ), 1003 ), 1004 'group-members-none' => array( 1005 'type' => 'info', 1006 'message' => __( 'Sorry, there were no group members found.', 'buddypress' ), 1007 ), 1008 'group-members-search-none' => array( 1009 'type' => 'info', 1010 'message' => __( 'Sorry, there was no member of that name found in this group.', 'buddypress' ), 1011 ), 1012 'group-manage-members-none' => array( 1013 'type' => 'info', 1014 'message' => __( 'This group has no members.', 'buddypress' ), 1015 ), 1016 'group-requests-none' => array( 1017 'type' => 'info', 1018 'message' => __( 'There are no pending membership requests.', 'buddypress' ), 1019 ), 1020 'group-requests-loading' => array( 1021 'type' => 'loading', 1022 'message' => __( 'Loading the members who requested to join the group. Please wait.', 'buddypress' ), 1023 ), 1024 'group-delete-warning' => array( 1025 'type' => 'warning', 1026 'message' => __( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back. Please be careful with this option.', 'buddypress' ), 1027 ), 1028 'group-avatar-delete-info' => array( 1029 'type' => 'info', 1030 'message' => __( 'If you\'d like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.', 'buddypress' ), 1031 ), 1032 'directory-members-loading' => array( 1033 'type' => 'loading', 1034 'message' => __( 'Loading the members of your community. Please wait.', 'buddypress' ), 1035 ), 1036 'members-loop-none' => array( 1037 'type' => 'info', 1038 'message' => __( 'Sorry, no members were found.', 'buddypress' ), 1039 ), 1040 'member-requests-none' => array( 1041 'type' => 'info', 1042 'message' => __( 'You have no pending friendship requests.', 'buddypress' ), 1043 ), 1044 'member-invites-none' => array( 1045 'type' => 'info', 1046 'message' => __( 'You have no outstanding group invites.', 'buddypress' ), 1047 ), 1048 'member-notifications-none' => array( 1049 'type' => 'info', 1050 'message' => __( 'This member has no notifications.', 'buddypress' ), 1051 ), 1052 'member-wp-profile-none' => array( 1053 'type' => 'info', 1054 /* translators: %s: member name */ 1055 'message' => __( '%s did not save any profile information yet.', 'buddypress' ), 1056 ), 1057 'member-delete-account' => array( 1058 'type' => 'warning', 1059 'message' => __( 'Deleting this account will delete all of the content it has created. It will be completely unrecoverable.', 'buddypress' ), 1060 ), 1061 'member-activity-loading' => array( 1062 'type' => 'loading', 1063 'message' => __( 'Loading the member\'s updates. Please wait.', 'buddypress' ), 1064 ), 1065 'member-blogs-loading' => array( 1066 'type' => 'loading', 1067 'message' => __( 'Loading the member\'s blogs. Please wait.', 'buddypress' ), 1068 ), 1069 'member-friends-loading' => array( 1070 'type' => 'loading', 1071 'message' => __( 'Loading the member\'s friends. Please wait.', 'buddypress' ), 1072 ), 1073 'member-groups-loading' => array( 1074 'type' => 'loading', 1075 'message' => __( 'Loading the member\'s groups. Please wait.', 'buddypress' ), 1076 ), 1077 'member-notifications-loading' => array( 1078 'type' => 'loading', 1079 'message' => __( 'Loading notifications. Please wait.', 'buddypress' ), 1080 ), 1081 'member-group-invites-all' => array( 1082 'type' => 'info', 1083 'message' => __( 'Currently every member of the community can invite you to join their groups. If you are not comfortable with it, you can always restrict group invites to your friends only.', 'buddypress' ), 1084 ), 1085 'member-group-invites-friends-only' => array( 1086 'type' => 'info', 1087 'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ), 1088 ), 1089 ) ); 947 $feedback_messages = apply_filters( 948 'bp_nouveau_feedback_messages', 949 array( 950 'registration-disabled' => array( 951 'type' => 'info', 952 'message' => __( 'Member registration is currently not allowed.', 'buddypress' ), 953 'before' => 'bp_before_registration_disabled', 954 'after' => 'bp_after_registration_disabled' 955 ), 956 'request-details' => array( 957 'type' => 'info', 958 'message' => __( 'Registering for this site is easy. Just fill in the fields below, and we\'ll get a new account set up for you in no time.', 'buddypress' ), 959 'before' => false, 960 'after' => false, 961 ), 962 'completed-confirmation' => array( 963 'type' => 'info', 964 'message' => __( 'You have successfully created your account! Please log in using the username and password you have just created.', 'buddypress' ), 965 'before' => 'bp_before_registration_confirmed', 966 'after' => 'bp_after_registration_confirmed', 967 ), 968 'directory-activity-loading' => array( 969 'type' => 'loading', 970 'message' => __( 'Loading the community updates. Please wait.', 'buddypress' ), 971 ), 972 'single-activity-loading' => array( 973 'type' => 'loading', 974 'message' => __( 'Loading the update. Please wait.', 'buddypress' ), 975 ), 976 'activity-loop-none' => array( 977 'type' => 'info', 978 'message' => __( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ), 979 ), 980 'blogs-loop-none' => array( 981 'type' => 'info', 982 'message' => __( 'Sorry, there were no sites found.', 'buddypress' ), 983 ), 984 'blogs-no-signup' => array( 985 'type' => 'info', 986 'message' => __( 'Site registration is currently disabled.', 'buddypress' ), 987 ), 988 'directory-blogs-loading' => array( 989 'type' => 'loading', 990 'message' => __( 'Loading the sites of the network. Please wait.', 'buddypress' ), 991 ), 992 'directory-groups-loading' => array( 993 'type' => 'loading', 994 'message' => __( 'Loading the groups of the community. Please wait.', 'buddypress' ), 995 ), 996 'groups-loop-none' => array( 997 'type' => 'info', 998 'message' => __( 'Sorry, there were no groups found.', 'buddypress' ), 999 ), 1000 'group-activity-loading' => array( 1001 'type' => 'loading', 1002 'message' => __( 'Loading the group updates. Please wait.', 'buddypress' ), 1003 ), 1004 'group-members-loading' => array( 1005 'type' => 'loading', 1006 'message' => __( 'Requesting the group members. Please wait.', 'buddypress' ), 1007 ), 1008 'group-members-none' => array( 1009 'type' => 'info', 1010 'message' => __( 'Sorry, there were no group members found.', 'buddypress' ), 1011 ), 1012 'group-members-search-none' => array( 1013 'type' => 'info', 1014 'message' => __( 'Sorry, there was no member of that name found in this group.', 'buddypress' ), 1015 ), 1016 'group-manage-members-none' => array( 1017 'type' => 'info', 1018 'message' => __( 'This group has no members.', 'buddypress' ), 1019 ), 1020 'group-requests-none' => array( 1021 'type' => 'info', 1022 'message' => __( 'There are no pending membership requests.', 'buddypress' ), 1023 ), 1024 'group-requests-loading' => array( 1025 'type' => 'loading', 1026 'message' => __( 'Loading the members who requested to join the group. Please wait.', 'buddypress' ), 1027 ), 1028 'group-delete-warning' => array( 1029 'type' => 'warning', 1030 'message' => __( 'WARNING: Deleting this group will completely remove ALL content associated with it. There is no way back. Please be careful with this option.', 'buddypress' ), 1031 ), 1032 'group-avatar-delete-info' => array( 1033 'type' => 'info', 1034 'message' => __( 'If you\'d like to remove the existing group profile photo but not upload a new one, please use the delete group profile photo button.', 'buddypress' ), 1035 ), 1036 'directory-members-loading' => array( 1037 'type' => 'loading', 1038 'message' => __( 'Loading the members of your community. Please wait.', 'buddypress' ), 1039 ), 1040 'members-loop-none' => array( 1041 'type' => 'info', 1042 'message' => __( 'Sorry, no members were found.', 'buddypress' ), 1043 ), 1044 'member-requests-none' => array( 1045 'type' => 'info', 1046 'message' => __( 'You have no pending friendship requests.', 'buddypress' ), 1047 ), 1048 'member-invites-none' => array( 1049 'type' => 'info', 1050 'message' => __( 'You have no outstanding group invites.', 'buddypress' ), 1051 ), 1052 'member-notifications-none' => array( 1053 'type' => 'info', 1054 'message' => __( 'This member has no notifications.', 'buddypress' ), 1055 ), 1056 'member-wp-profile-none' => array( 1057 'type' => 'info', 1058 /* translators: %s: member name */ 1059 'message' => __( '%s did not save any profile information yet.', 'buddypress' ), 1060 ), 1061 'member-delete-account' => array( 1062 'type' => 'warning', 1063 'message' => __( 'Deleting this account will delete all of the content it has created. It will be completely unrecoverable.', 'buddypress' ), 1064 ), 1065 'member-activity-loading' => array( 1066 'type' => 'loading', 1067 'message' => __( 'Loading the member\'s updates. Please wait.', 'buddypress' ), 1068 ), 1069 'member-blogs-loading' => array( 1070 'type' => 'loading', 1071 'message' => __( 'Loading the member\'s blogs. Please wait.', 'buddypress' ), 1072 ), 1073 'member-friends-loading' => array( 1074 'type' => 'loading', 1075 'message' => __( 'Loading the member\'s friends. Please wait.', 'buddypress' ), 1076 ), 1077 'member-groups-loading' => array( 1078 'type' => 'loading', 1079 'message' => __( 'Loading the member\'s groups. Please wait.', 'buddypress' ), 1080 ), 1081 'member-notifications-loading' => array( 1082 'type' => 'loading', 1083 'message' => __( 'Loading notifications. Please wait.', 'buddypress' ), 1084 ), 1085 'member-group-invites-all' => array( 1086 'type' => 'info', 1087 'message' => __( 'Currently every member of the community can invite you to join their groups. If you are not comfortable with it, you can always restrict group invites to your friends only.', 'buddypress' ), 1088 ), 1089 'member-group-invites-friends-only' => array( 1090 'type' => 'info', 1091 'message' => __( 'Currently only your friends can invite you to groups. Uncheck the box to allow any member to send invites.', 'buddypress' ), 1092 ), 1093 'member-invites-none' => array( 1094 'type' => 'info', 1095 'message' => __( 'There are no invitations to display.', 'buddypress' ), 1096 ), 1097 ) 1098 ); 1090 1099 1091 1100 if ( ! isset( $feedback_messages[ $feedback_id ] ) ) { … … 1230 1239 * 1231 1240 * @since 3.0.0 1241 * @since 8.0.0 Adds the 'member-send-invite' button. 1232 1242 * 1233 1243 * @param string $action The action requested. … … 1245 1255 * 1246 1256 * @since 3.0.0 1257 * @since 8.0.0 Adds the 'member-send-invite' button. 1247 1258 * 1248 1259 * @param array $value The list of submit buttons. … … 1250 1261 * @return array|false 1251 1262 */ 1252 $actions = apply_filters( 'bp_nouveau_get_submit_button', array( 1253 'register' => array( 1254 'before' => 'bp_before_registration_submit_buttons', 1255 'after' => 'bp_after_registration_submit_buttons', 1256 'nonce' => 'bp_new_signup', 1257 'attributes' => array( 1258 'name' => 'signup_submit', 1259 'id' => 'submit', 1260 'value' => __( 'Complete Sign Up', 'buddypress' ), 1261 ), 1262 ), 1263 'member-profile-edit' => array( 1264 'before' => '', 1265 'after' => '', 1266 'nonce' => 'bp_xprofile_edit', 1267 'attributes' => array( 1268 'name' => 'profile-group-edit-submit', 1269 'id' => 'profile-group-edit-submit', 1270 'value' => __( 'Save Changes', 'buddypress' ), 1271 ), 1272 ), 1273 'member-capabilities' => array( 1274 'before' => 'bp_members_capabilities_account_before_submit', 1275 'after' => 'bp_members_capabilities_account_after_submit', 1276 'nonce' => 'capabilities', 1277 'attributes' => array( 1278 'name' => 'capabilities-submit', 1279 'id' => 'capabilities-submit', 1280 'value' => __( 'Save', 'buddypress' ), 1281 ), 1282 ), 1283 'member-delete-account' => array( 1284 'before' => 'bp_members_delete_account_before_submit', 1285 'after' => 'bp_members_delete_account_after_submit', 1286 'nonce' => 'delete-account', 1287 'attributes' => array( 1288 'disabled' => 'disabled', 1289 'name' => 'delete-account-button', 1290 'id' => 'delete-account-button', 1291 'value' => __( 'Delete Account', 'buddypress' ), 1292 ), 1293 ), 1294 'members-general-settings' => array( 1295 'before' => 'bp_core_general_settings_before_submit', 1296 'after' => 'bp_core_general_settings_after_submit', 1297 'nonce' => 'bp_settings_general', 1298 'attributes' => array( 1299 'name' => 'submit', 1300 'id' => 'submit', 1301 'value' => __( 'Save Changes', 'buddypress' ), 1302 'class' => 'auto', 1303 ), 1304 ), 1305 'member-notifications-settings' => array( 1306 'before' => 'bp_members_notification_settings_before_submit', 1307 'after' => 'bp_members_notification_settings_after_submit', 1308 'nonce' => 'bp_settings_notifications', 1309 'attributes' => array( 1310 'name' => 'submit', 1311 'id' => 'submit', 1312 'value' => __( 'Save Changes', 'buddypress' ), 1313 'class' => 'auto', 1314 ), 1315 ), 1316 'members-profile-settings' => array( 1317 'before' => 'bp_core_xprofile_settings_before_submit', 1318 'after' => 'bp_core_xprofile_settings_after_submit', 1319 'nonce' => 'bp_xprofile_settings', 1320 'attributes' => array( 1321 'name' => 'xprofile-settings-submit', 1322 'id' => 'submit', 1323 'value' => __( 'Save Changes', 'buddypress' ), 1324 'class' => 'auto', 1325 ), 1326 ), 1327 'member-group-invites' => array( 1328 'nonce' => 'bp_nouveau_group_invites_settings', 1329 'attributes' => array( 1330 'name' => 'member-group-invites-submit', 1331 'id' => 'submit', 1332 'value' => __( 'Save', 'buddypress' ), 1333 'class' => 'auto', 1334 ), 1335 ), 1336 'activity-new-comment' => array( 1337 'after' => 'bp_activity_entry_comments', 1338 'nonce' => 'new_activity_comment', 1339 'nonce_key' => '_wpnonce_new_activity_comment', 1340 'wrapper' => false, 1341 'attributes' => array( 1342 'name' => 'ac_form_submit', 1343 'value' => _x( 'Post', 'button', 'buddypress' ), 1344 ), 1345 ), 1346 ) ); 1263 $actions = apply_filters( 1264 'bp_nouveau_get_submit_button', 1265 array( 1266 'register' => array( 1267 'before' => 'bp_before_registration_submit_buttons', 1268 'after' => 'bp_after_registration_submit_buttons', 1269 'nonce' => 'bp_new_signup', 1270 'attributes' => array( 1271 'name' => 'signup_submit', 1272 'id' => 'submit', 1273 'value' => __( 'Complete Sign Up', 'buddypress' ), 1274 ), 1275 ), 1276 'member-profile-edit' => array( 1277 'before' => '', 1278 'after' => '', 1279 'nonce' => 'bp_xprofile_edit', 1280 'attributes' => array( 1281 'name' => 'profile-group-edit-submit', 1282 'id' => 'profile-group-edit-submit', 1283 'value' => __( 'Save Changes', 'buddypress' ), 1284 ), 1285 ), 1286 'member-capabilities' => array( 1287 'before' => 'bp_members_capabilities_account_before_submit', 1288 'after' => 'bp_members_capabilities_account_after_submit', 1289 'nonce' => 'capabilities', 1290 'attributes' => array( 1291 'name' => 'capabilities-submit', 1292 'id' => 'capabilities-submit', 1293 'value' => __( 'Save', 'buddypress' ), 1294 ), 1295 ), 1296 'member-delete-account' => array( 1297 'before' => 'bp_members_delete_account_before_submit', 1298 'after' => 'bp_members_delete_account_after_submit', 1299 'nonce' => 'delete-account', 1300 'attributes' => array( 1301 'disabled' => 'disabled', 1302 'name' => 'delete-account-button', 1303 'id' => 'delete-account-button', 1304 'value' => __( 'Delete Account', 'buddypress' ), 1305 ), 1306 ), 1307 'members-general-settings' => array( 1308 'before' => 'bp_core_general_settings_before_submit', 1309 'after' => 'bp_core_general_settings_after_submit', 1310 'nonce' => 'bp_settings_general', 1311 'attributes' => array( 1312 'name' => 'submit', 1313 'id' => 'submit', 1314 'value' => __( 'Save Changes', 'buddypress' ), 1315 'class' => 'auto', 1316 ), 1317 ), 1318 'member-notifications-settings' => array( 1319 'before' => 'bp_members_notification_settings_before_submit', 1320 'after' => 'bp_members_notification_settings_after_submit', 1321 'nonce' => 'bp_settings_notifications', 1322 'attributes' => array( 1323 'name' => 'submit', 1324 'id' => 'submit', 1325 'value' => __( 'Save Changes', 'buddypress' ), 1326 'class' => 'auto', 1327 ), 1328 ), 1329 'members-profile-settings' => array( 1330 'before' => 'bp_core_xprofile_settings_before_submit', 1331 'after' => 'bp_core_xprofile_settings_after_submit', 1332 'nonce' => 'bp_xprofile_settings', 1333 'attributes' => array( 1334 'name' => 'xprofile-settings-submit', 1335 'id' => 'submit', 1336 'value' => __( 'Save Changes', 'buddypress' ), 1337 'class' => 'auto', 1338 ), 1339 ), 1340 'member-group-invites' => array( 1341 'nonce' => 'bp_nouveau_group_invites_settings', 1342 'attributes' => array( 1343 'name' => 'member-group-invites-submit', 1344 'id' => 'submit', 1345 'value' => __( 'Save', 'buddypress' ), 1346 'class' => 'auto', 1347 ), 1348 ), 1349 'member-send-invite' => array( 1350 'nonce' => 'bp_members_invitation_send_%d', 1351 'nonce_placeholder_value' => bp_displayed_user_id() ? bp_displayed_user_id() : bp_loggedin_user_id(), 1352 'attributes' => array( 1353 'name' => 'member-send-invite-submit', 1354 'id' => 'submit', 1355 'value' => __( 'Send', 'buddypress' ), 1356 'class' => 'auto', 1357 ), 1358 ), 1359 'activity-new-comment' => array( 1360 'after' => 'bp_activity_entry_comments', 1361 'nonce' => 'new_activity_comment', 1362 'nonce_key' => '_wpnonce_new_activity_comment', 1363 'wrapper' => false, 1364 'attributes' => array( 1365 'name' => 'ac_form_submit', 1366 'value' => _x( 'Post', 'button', 'buddypress' ), 1367 ), 1368 ), 1369 ) 1370 ); 1347 1371 1348 1372 if ( isset( $actions[ $action ] ) ) {
Note: See TracChangeset
for help on using the changeset viewer.