Changeset 12921
- Timestamp:
- 04/28/2021 11:51:00 PM (3 years ago)
- Location:
- trunk/src/bp-templates/bp-nouveau
- Files:
-
- 6 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-nouveau/buddypress-functions.php
r12814 r12921 196 196 add_filter( 'bp_uri', array( $this, 'customizer_set_uri' ), 10, 1 ); 197 197 198 // Modify "registration disabled" and welcome message if invitations are enabled. 199 add_action( 'bp_nouveau_feedback_messages', array( $this, 'filter_registration_messages' ), 99 ); 200 198 201 /** Override **********************************************************/ 199 202 … … 677 680 return $path; 678 681 } 682 /** 683 * Modify "registration disabled" message in Nouveau template pack. 684 * Modify welcome message in Nouveau template pack. 685 * 686 * @since 8.0.0 687 * 688 * @param array $messages The list of feedback messages. 689 * 690 * @return array $messages 691 */ 692 function filter_registration_messages( $messages ) { 693 // Change the "registration is disabled" message. 694 $disallowed_message = bp_members_invitations_get_modified_registration_disabled_message(); 695 if ( $disallowed_message ) { 696 $messages['registration-disabled']['message'] = $disallowed_message; 697 } 698 // Add information about invitations to the welcome block. 699 $welcome_message = bp_members_invitations_get_registration_welcome_message(); 700 if ( $welcome_message ) { 701 $messages['request-details']['message'] = $welcome_message . $messages['request-details']['message']; 702 } 703 return $messages; 704 } 679 705 } 680 706 -
trunk/src/bp-templates/bp-nouveau/common-styles/_bp_filters.scss
r12571 r12921 182 182 } // close .subnav-filters 183 183 184 .notifications-options-nav { 185 186 input#notification-bulk-manage { 187 border: 0; 188 border-radius: 0; 189 line-height: 1.6; 190 } 184 .notifications-options-nav input#notification-bulk-manage, 185 .invitations-options-nav input#invitation-bulk-manage { 186 border: 0; 187 border-radius: 0; 188 line-height: 1.6; 191 189 } 192 190 -
trunk/src/bp-templates/bp-nouveau/common-styles/_bp_forms.scss
r12814 r12921 25 25 } 26 26 27 #notification-bulk-manage[disabled] { 27 #notification-bulk-manage[disabled], 28 #invitation-bulk-manage[disabled] { 28 29 display: none; 29 30 } … … 400 401 @include medium-small-up() { 401 402 402 .notifications-options-nav { 403 404 .select-wrap { 405 float: left; 406 } 403 .notifications-options-nav .select-wrap, 404 .invitations-options-nav .select-wrap { 405 float: left; 407 406 } 408 407 } -
trunk/src/bp-templates/bp-nouveau/common-styles/_bp_generic_and_typography.scss
r12814 r12921 256 256 } 257 257 258 #notification-select { 258 #notification-select, 259 #invitation-select { 259 260 260 261 @include responsive-font(14); -
trunk/src/bp-templates/bp-nouveau/css/buddypress-rtl.css
r12910 r12921 256 256 } 257 257 258 .buddypress-wrap #notification-select { 258 .buddypress-wrap #notification-select, 259 .buddypress-wrap #invitation-select { 259 260 font-size: 12px; 260 261 } 261 262 262 263 @media screen and (min-width: 46.8em) { 263 .buddypress-wrap #notification-select { 264 .buddypress-wrap #notification-select, 265 .buddypress-wrap #invitation-select { 264 266 font-size: 14px; 265 267 } … … 795 797 } 796 798 797 .buddypress-wrap .notifications-options-nav input#notification-bulk-manage { 799 .buddypress-wrap .notifications-options-nav input#notification-bulk-manage, 800 .buddypress-wrap .invitations-options-nav input#invitation-bulk-manage { 798 801 border: 0; 799 802 border-radius: 0; … … 3431 3434 } 3432 3435 3433 .buddypress-wrap #notification-bulk-manage[disabled] { 3436 .buddypress-wrap #notification-bulk-manage[disabled], 3437 .buddypress-wrap #invitation-bulk-manage[disabled] { 3434 3438 display: none; 3435 3439 } … … 3728 3732 3729 3733 @media screen and (min-width: 32em) { 3730 .buddypress-wrap .notifications-options-nav .select-wrap { 3734 .buddypress-wrap .notifications-options-nav .select-wrap, 3735 .buddypress-wrap .invitations-options-nav .select-wrap { 3731 3736 float: right; 3732 3737 } -
trunk/src/bp-templates/bp-nouveau/css/buddypress.css
r12910 r12921 256 256 } 257 257 258 .buddypress-wrap #notification-select { 258 .buddypress-wrap #notification-select, 259 .buddypress-wrap #invitation-select { 259 260 font-size: 12px; 260 261 } 261 262 262 263 @media screen and (min-width: 46.8em) { 263 .buddypress-wrap #notification-select { 264 .buddypress-wrap #notification-select, 265 .buddypress-wrap #invitation-select { 264 266 font-size: 14px; 265 267 } … … 795 797 } 796 798 797 .buddypress-wrap .notifications-options-nav input#notification-bulk-manage { 799 .buddypress-wrap .notifications-options-nav input#notification-bulk-manage, 800 .buddypress-wrap .invitations-options-nav input#invitation-bulk-manage { 798 801 border: 0; 799 802 border-radius: 0; … … 3431 3434 } 3432 3435 3433 .buddypress-wrap #notification-bulk-manage[disabled] { 3436 .buddypress-wrap #notification-bulk-manage[disabled], 3437 .buddypress-wrap #invitation-bulk-manage[disabled] { 3434 3438 display: none; 3435 3439 } … … 3728 3732 3729 3733 @media screen and (min-width: 32em) { 3730 .buddypress-wrap .notifications-options-nav .select-wrap { 3734 .buddypress-wrap .notifications-options-nav .select-wrap, 3735 .buddypress-wrap .invitations-options-nav .select-wrap { 3731 3736 float: left; 3732 3737 } -
trunk/src/bp-templates/bp-nouveau/css/twentytwentyone-rtl.css
r12846 r12921 155 155 } 156 156 157 #buddypress.twentytwentyone .notifications-options-nav { 157 #buddypress.twentytwentyone .notifications-options-nav, 158 #buddypress.twentytwentyone .invitations-options-nav { 158 159 margin-top: 1em; 159 160 } 160 161 161 #buddypress.twentytwentyone .notifications-options-nav input#notification-bulk-manage { 162 #buddypress.twentytwentyone .notifications-options-nav input#notification-bulk-manage, 163 #buddypress.twentytwentyone .invitations-options-nav input#invitation-bulk-manage { 162 164 line-height: 1.2; 163 165 } -
trunk/src/bp-templates/bp-nouveau/css/twentytwentyone.css
r12846 r12921 155 155 } 156 156 157 #buddypress.twentytwentyone .notifications-options-nav { 157 #buddypress.twentytwentyone .notifications-options-nav, 158 #buddypress.twentytwentyone .invitations-options-nav { 158 159 margin-top: 1em; 159 160 } 160 161 161 #buddypress.twentytwentyone .notifications-options-nav input#notification-bulk-manage { 162 #buddypress.twentytwentyone .notifications-options-nav input#notification-bulk-manage, 163 #buddypress.twentytwentyone .invitations-options-nav input#invitation-bulk-manage { 162 164 line-height: 1.2; 163 165 } -
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 ] ) ) { -
trunk/src/bp-templates/bp-nouveau/includes/members/functions.php
r12908 r12921 4 4 * 5 5 * @since 3.0.0 6 * @version 6.0.06 * @version 8.0.0 7 7 */ 8 8 … … 11 11 12 12 /** 13 * Register Scripts for the Members component 14 * 15 * @since 8.0.0 16 * 17 * @param array $scripts Optional. The array of scripts to register. 18 * @return array The same array with the specific members scripts. 19 */ 20 function bp_nouveau_members_register_scripts( $scripts = array() ) { 21 if ( ! isset( $scripts['bp-nouveau'] ) || ! bp_get_members_invitations_allowed() ) { 22 return $scripts; 23 } 24 25 return array_merge( $scripts, array( 26 'bp-nouveau-member-invites' => array( 27 'file' => 'js/buddypress-member-invites%s.js', 28 'dependencies' => array(), 29 'footer' => true, 30 ), 31 ) ); 32 } 33 34 /** 13 35 * Enqueue the members scripts 14 36 * … … 17 39 function bp_nouveau_members_enqueue_scripts() { 18 40 // Neutralize Ajax when using BuddyPress Groups & member widgets on default front page 19 if ( ! bp_is_user_front() || ! bp_nouveau_get_appearance_settings( 'user_front_page' ) ) { 20 return; 21 } 22 23 wp_add_inline_style( 24 'bp-nouveau', ' 25 #member-front-widgets #groups-list-options, 26 #member-front-widgets #members-list-options, 27 #member-front-widgets #friends-list-options { 28 display: none; 29 } 30 ' 31 ); 41 if ( bp_is_user_front() && bp_nouveau_get_appearance_settings( 'user_front_page' ) ) { 42 wp_add_inline_style( 43 'bp-nouveau', 44 '#member-front-widgets #groups-list-options, 45 #member-front-widgets #members-list-options, 46 #member-front-widgets #friends-list-options { 47 display: none; 48 }' 49 ); 50 } 51 52 if ( bp_is_user_members_invitations_list() ) { 53 wp_enqueue_script( 'bp-nouveau-member-invites' ); 54 } 32 55 } 33 56 -
trunk/src/bp-templates/bp-nouveau/includes/members/loader.php
r12619 r12921 89 89 // Add the default-front to User's front hierarchy if user enabled it (Enabled by default). 90 90 add_filter( 'bp_displayed_user_get_front_template', 'bp_nouveau_member_reset_front_template', 10, 1 ); 91 add_filter( 'bp_nouveau_register_scripts', 'bp_nouveau_members_register_scripts', 10, 1 ); 91 92 92 93 // The number formatting is done into the `bp_nouveau_nav_count()` template tag. -
trunk/src/bp-templates/bp-nouveau/includes/members/template-tags.php
r12908 r12921 4 4 * 5 5 * @since 3.0.0 6 * @version 6.0.06 * @version 8.0.0 7 7 */ 8 8 … … 661 661 } elseif ( bp_is_user_notifications() ) { 662 662 $template = 'notifications'; 663 } elseif ( bp_is_user_members_invitations() ) { 664 $template = 'invitations'; 663 665 } elseif ( bp_is_user_settings() ) { 664 666 $template = 'settings'; … … 1038 1040 return $field->data; 1039 1041 } 1042 1043 /** 1044 * Outputs the Invitations bulk actions dropdown list. 1045 * 1046 * @since 8.0.0 1047 */ 1048 function bp_nouveau_invitations_bulk_management_dropdown() { 1049 ?> 1050 <div class="select-wrap"> 1051 1052 <label class="bp-screen-reader-text" for="invitation-select"> 1053 <?php 1054 esc_html_e( 'Select Bulk Action', 'buddypress' ); 1055 ?> 1056 </label> 1057 1058 <select name="invitation_bulk_action" id="invitation-select"> 1059 <option value="" selected="selected"><?php esc_html_e( 'Bulk Actions', 'buddypress' ); ?></option> 1060 <option value="resend"><?php echo esc_html_x( 'Resend', 'button', 'buddypress' ); ?></option> 1061 <option value="cancel"><?php echo esc_html_x( 'Cancel', 'button', 'buddypress' ); ?></option> 1062 </select> 1063 1064 <span class="select-arrow"></span> 1065 1066 </div><!-- // .select-wrap --> 1067 1068 <input type="submit" id="invitation-bulk-manage" class="button action" value="<?php echo esc_attr_x( 'Apply', 'button', 'buddypress' ); ?>"> 1069 <?php 1070 } -
trunk/src/bp-templates/bp-nouveau/includes/template-tags.php
r12908 r12921 2642 2642 } 2643 2643 2644 $nonce = $submit_data['nonce']; 2645 if ( isset( $submit_data['nonce_placeholder_value'] ) ) { 2646 $nonce = sprintf( $nonce, $submit_data['nonce_placeholder_value'] ); 2647 } 2648 2644 2649 if ( empty( $submit_data['nonce_key'] ) ) { 2645 wp_nonce_field( $ submit_data['nonce']);2650 wp_nonce_field( $nonce ); 2646 2651 } else { 2647 2652 if ( $object_id ) { … … 2649 2654 } 2650 2655 2651 wp_nonce_field( $ submit_data['nonce'], $submit_data['nonce_key'] );2656 wp_nonce_field( $nonce, $submit_data['nonce_key'] ); 2652 2657 } 2653 2658 -
trunk/src/bp-templates/bp-nouveau/sass/twentytwentyone.scss
r12846 r12921 222 222 } 223 223 224 .notifications-options-nav { 224 .notifications-options-nav, 225 .invitations-options-nav { 225 226 margin-top: 1em; 226 227 input#notification-bulk-manage { 228 line-height: 1.2; 229 } 227 } 228 229 .notifications-options-nav input#notification-bulk-manage, 230 .invitations-options-nav input#invitation-bulk-manage { 231 line-height: 1.2; 230 232 } 231 233 }
Note: See TracChangeset
for help on using the changeset viewer.