Changeset 10740
- Timestamp:
- 05/07/2016 07:38:27 PM (9 years ago)
- Location:
- trunk/src/bp-xprofile
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-actions.php
r10434 r10740 20 20 * 21 21 * The function will delete the active avatar for a user. 22 * 23 * @since 1.0.0 22 24 * 23 25 * @uses bp_core_delete_avatar() Deletes the active avatar for the logged in user. -
trunk/src/bp-xprofile/bp-xprofile-admin.php
r10657 r10740 18 18 * Creates the administration interface menus and checks to see if the DB 19 19 * tables are set up. 20 * 21 * @since 1.0.0 20 22 * 21 23 * @uses bp_current_user_can() returns true if the current user is a site admin, false if not. … … 39 41 * profile groups and fields. 40 42 * 43 * @since 1.0.0 44 * 41 45 * @param string $message Message to display. 42 46 * @param string $type Type of action to be displayed. … … 71 75 72 76 /** 73 * Output the main XProfile management screen 77 * Output the main XProfile management screen. 74 78 * 75 79 * @since 2.3.0 … … 243 247 * Handles the adding or editing of groups. 244 248 * 249 * @since 1.0.0 250 * 245 251 * @param int|null $group_id Group ID to manage. 246 252 */ … … 305 311 /** 306 312 * Handles the deletion of profile data groups. 313 * 314 * @since 1.0.0 307 315 * 308 316 * @param int $group_id ID of the group to delete. … … 337 345 * Handles the adding or editing of profile field data for a user. 338 346 * 347 * @since 1.0.0 348 * 339 349 * @param int $group_id ID of the group. 340 350 * @param int|null $field_id ID of the field being managed. … … 453 463 * 454 464 * @since 1.0.0 465 * 455 466 * @global string $message The feedback message to show. 456 467 * @global $type The type of feedback message to show. -
trunk/src/bp-xprofile/bp-xprofile-filters.php
r10557 r10740 83 83 * @since 2.3.0 84 84 * 85 * @param mixed $field_options Options to sanitize. 86 * 85 * @param mixed $field_options Options to sanitize. 87 86 * @return mixed 88 87 */ … … 100 99 * @since 2.3.0 101 100 * 102 * @param mixed $field_default Field defaults to sanitize. 103 * 101 * @param mixed $field_default Field defaults to sanitize. 104 102 * @return mixed 105 103 */ … … 115 113 * Run profile field values through kses with filterable allowed tags. 116 114 * 115 * @since 1.5.0 116 * 117 117 * @param string $content Content to filter. 118 118 * @param object|null $data_obj The BP_XProfile_ProfileData object. 119 *120 119 * @return string $content 121 120 */ … … 155 154 * Safely runs profile field data through kses and force_balance_tags. 156 155 * 156 * @since 1.2.6 157 * 157 158 * @param string $field_value Field value being santized. 158 159 * @param int $field_id Field ID being sanitized. 159 160 * @param bool $reserialize Whether to reserialize arrays before returning. Defaults to true. 160 161 * @param object|null $data_obj The BP_XProfile_ProfileData object. 161 *162 162 * @return string 163 163 */ … … 217 217 * @param string $field_value XProfile field_value to be filtered. 218 218 * @param string $field_type XProfile field_type to be filtered. 219 *220 219 * @return string $field_value Filtered XProfile field_value. False on failure. 221 220 */ … … 243 242 * @param string $field_type Field type. 244 243 * @param string|int $field_id Optional. ID of the field. 245 *246 244 * @return mixed 247 245 */ … … 394 392 * and swaps out user data with BP xprofile data, where available. 395 393 * 394 * @since 1.2.0 395 * 396 396 * @param array $comments Comments to filter in. 397 397 * @param int $post_id Post ID the comments are for. 398 *399 398 * @return array $comments 400 399 */ -
trunk/src/bp-xprofile/bp-xprofile-functions.php
r10434 r10740 25 25 * @since 2.1.0 26 26 * 27 * @param array $args See {@link BP_XProfile_Group::get()} for description of 28 * arguments. 27 * @param array $args See {@link BP_XProfile_Group::get()} for description of arguments. 29 28 * @return array $groups 30 29 */ … … 49 48 * @since 1.0.0 50 49 * 51 * @param array|string $args Array of arguments for field group insertion. 50 * @param array|string $args { 51 * Array of arguments for field group insertion. 52 * 53 * @type int|bool $field_group_id ID of the field group to insert into. 54 * @type string|bool $name Name of the group. 55 * @type string $description Field group description. 56 * @type bool $can_delete Whether or not the field group can be deleted. 57 * } 52 58 * @return boolean 53 59 */ … … 193 199 /** 194 200 * Insert or update an xprofile field. 201 * 202 * @since 1.1.0 195 203 * 196 204 * @param array|string $args { … … 274 282 * Get a profile field object. 275 283 * 284 * @since 1.1.0 285 * 276 286 * @param int|object $field ID of the field or object representing field data. 277 287 * @return BP_XProfile_Field|null Field object if found, otherwise null. … … 297 307 * Delete a profile field object. 298 308 * 309 * @since 1.1.0 310 * 299 311 * @param int|object $field_id ID of the field or object representing field data. 300 312 * @return bool Whether or not the field was deleted. … … 313 325 * When the field value is serialized, this function unserializes and filters 314 326 * each item in the array. 327 * 328 * @since 1.0.0 315 329 * 316 330 * @uses BP_XProfile_ProfileData::get_value_byid() Fetches the value based on the params passed. … … 374 388 * A simple function to set profile data for a specific field for a specific user. 375 389 * 390 * @since 1.0.0 391 * 376 392 * @uses xprofile_get_field_id_from_name() Gets the ID from the field based on the name. 377 393 * … … 455 471 * Set the visibility level for this field. 456 472 * 473 * @since 1.6.0 474 * 457 475 * @param int $field_id The ID of the xprofile field. 458 476 * @param int $user_id The ID of the user to whom the data belongs. … … 519 537 /** 520 538 * Delete XProfile field data. 539 * 540 * @since 1.1.0 521 541 * 522 542 * @param string $field Field to delete. … … 548 568 * Check if field is a required field. 549 569 * 570 * @since 1.1.0 571 * 550 572 * @param int $field_id ID of the field to check for. 551 573 * @return bool Whether or not field is required. … … 565 587 * Returns the ID for the field based on the field name. 566 588 * 567 * @package BuddyPress Core 589 * @since 1.0.0 590 * 568 591 * @param string $field_name The name of the field to get the ID for. 569 592 * @return int $field_id on success, false on failure. … … 575 598 /** 576 599 * Fetches a random piece of profile data for the user. 600 * 601 * @since 1.0.0 577 602 * 578 603 * @global BuddyPress $bp The one true BuddyPress instance. … … 612 637 * Formats a profile field according to its type. [ TODO: Should really be moved to filters ] 613 638 * 639 * @since 1.0.0 640 * 614 641 * @param string $field_type The type of field: datebox, selectbox, textbox etc. 615 642 * @param string $field_value The actual value. … … 634 661 /** 635 662 * Update the field position for a provided field. 663 * 664 * @since 1.1.0 636 665 * 637 666 * @param int $field_id ID of the field to update. … … 769 798 * Syncs Xprofile data to the standard built in WordPress profile data. 770 799 * 800 * @since 1.0.0 801 * 771 802 * @param int $user_id ID of the user to sync. 772 803 * @return bool … … 836 867 * usermeta table that this component uses. 837 868 * 869 * @since 1.0.0 870 * 838 871 * @param int $user_id The ID of the deleted user. 839 872 */ … … 849 882 /** 850 883 * Delete a piece of xprofile metadata. 884 * 885 * @since 1.5.0 851 886 * 852 887 * @param int $object_id ID of the object the metadata belongs to. … … 902 937 * underlying get_metadata() function. This is for backward compatibility. 903 938 * 939 * @since 1.5.0 940 * 904 941 * @param int $object_id ID of the object the metadata belongs to. 905 942 * @param string $object_type Type of object. 'group', 'field', or 'data'. … … 928 965 /** 929 966 * Update a piece of xprofile metadata. 967 * 968 * @since 1.5.0 930 969 * 931 970 * @param int $object_id ID of the object the metadata belongs to. … … 978 1017 * Updates the fieldgroup metadata. 979 1018 * 1019 * @since 1.5.0 1020 * 980 1021 * @param int $field_group_id Group ID for the group field belongs to. 981 1022 * @param string $meta_key Meta key to update. … … 990 1031 * Updates the field metadata. 991 1032 * 1033 * @since 1.5.0 1034 * 992 1035 * @param int $field_id Field ID to update. 993 1036 * @param string $meta_key Meta key to update. … … 1002 1045 * Updates the fielddata metadata. 1003 1046 * 1047 * @since 1.5.0 1048 * 1004 1049 * @param int $field_data_id Field ID to update. 1005 1050 * @param string $meta_key Meta key to update. … … 1088 1133 * Get visibility levels out of the $bp global. 1089 1134 * 1135 * @since 1.6.0 1136 * 1090 1137 * @return array 1091 1138 */ … … 1111 1158 * 1112 1159 * @since 1.6.0 1160 * 1113 1161 * @see BP_XProfile_Group::get() 1114 1162 * @uses apply_filters() Filter bp_xprofile_get_hidden_fields_for_user to modify visibility levels, … … 1158 1206 * 1159 1207 * @since 1.8.2 1208 * 1160 1209 * @see bp_xprofile_get_hidden_fields_for_user() 1161 1210 * … … 1204 1253 * 1205 1254 * @since 1.6.0 1255 * 1206 1256 * @see bp_xprofile_get_hidden_fields_for_user() 1207 1257 * -
trunk/src/bp-xprofile/bp-xprofile-loader.php
r10652 r10740 20 20 /** 21 21 * Bootstrap the XProfile component. 22 * 23 * @since 1.6.0 22 24 */ 23 25 function bp_setup_xprofile() { -
trunk/src/bp-xprofile/bp-xprofile-screens.php
r10434 r10740 18 18 * Handles the display of the profile page by loading the correct template file. 19 19 * 20 * @since 1.0.0 21 * 20 22 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename). 21 23 */ … … 45 47 * Handles the display of the profile edit page by loading the correct template file. 46 48 * Also checks to make sure this can only be accessed for the logged in users profile. 49 * 50 * @since 1.0.0 47 51 * 48 52 * @uses bp_is_my_profile() Checks to make sure the current user being viewed equals the logged in user. … … 203 207 /** 204 208 * Handles the uploading and cropping of a user avatar. Displays the change avatar page. 209 * 210 * @since 1.0.0 205 211 * 206 212 * @uses bp_is_my_profile() Checks to make sure the current user being viewed equals the logged in user. … … 297 303 * Displays the change cover image page. 298 304 * 299 * @package BuddyPress XProfile300 *301 305 * @since 2.4.0 302 306 */ -
trunk/src/bp-xprofile/bp-xprofile-template.php
r10712 r10740 84 84 * Start off the profile groups. 85 85 * 86 * @since 1.0.0 87 * 86 88 * @return mixed 87 89 */ … … 94 96 * Set up the profile groups. 95 97 * 98 * @since 1.0.0 99 * 96 100 * @return mixed 97 101 */ … … 104 108 * Whether or not the group has fields to display. 105 109 * 110 * @since 1.0.0 111 * 106 112 * @return mixed 107 113 */ … … 116 122 * @since 1.0.0 117 123 * 118 * @param array|string|false $class Extra classes to append to class attribute. 119 * Pass mutiple class names as an array or 120 * space-delimited string. 121 * @return string 124 * @param mixed $class Extra classes to append to class attribute. 125 * Pass mutiple class names as an array or 126 * space-delimited string. 122 127 */ 123 128 function bp_field_css_class( $class = false ) { … … 127 132 /** 128 133 * Return the class attribute for a field. 134 * 135 * @since 1.1.0 129 136 * 130 137 * @param string|bool $class Extra classes to append to class attribute. … … 187 194 * Whether or not the XProfile field has data to display. 188 195 * 196 * @since 1.0.0 197 * 198 * @global object $profile_template 199 * 189 200 * @return mixed 190 201 */ … … 197 208 * Whether or not the XProfile field has public data to display. 198 209 * 210 * @since 1.0.0 211 * 212 * @global object $profile_template 213 * 199 214 * @return bool 200 215 */ … … 211 226 /** 212 227 * Output the XProfile group ID. 228 * 229 * @since 1.0.0 213 230 */ 214 231 function bp_the_profile_group_id() { … … 219 236 * Return the XProfile group ID. 220 237 * 238 * @since 1.1.0 239 * 221 240 * @return mixed|void 222 241 */ … … 236 255 /** 237 256 * Output the XProfile group name. 257 * 258 * @since 1.0.0 238 259 */ 239 260 function bp_the_profile_group_name() { … … 244 265 * Return the XProfile group name. 245 266 * 267 * @since 1.0.0 268 * 246 269 * @return mixed|void 247 270 */ … … 261 284 /** 262 285 * Output the XProfile group slug. 286 * 287 * @since 1.1.0 263 288 */ 264 289 function bp_the_profile_group_slug() { … … 269 294 * Return the XProfile group slug. 270 295 * 296 * @since 1.1.0 297 * 271 298 * @return mixed|void 272 299 */ … … 286 313 /** 287 314 * Output the XProfile group description. 315 * 316 * @since 1.0.0 288 317 */ 289 318 function bp_the_profile_group_description() { … … 294 323 * Return the XProfile group description. 295 324 * 325 * @since 1.0.0 326 * 296 327 * @return mixed|void 297 328 */ … … 311 342 /** 312 343 * Output the XProfile group edit form action. 344 * 345 * @since 1.1.0 313 346 */ 314 347 function bp_the_profile_group_edit_form_action() { … … 319 352 * Return the XProfile group edit form action. 320 353 * 354 * @since 1.1.0 355 * 321 356 * @return mixed|void 322 357 */ … … 340 375 /** 341 376 * Output the XProfile group field IDs. 377 * 378 * @since 1.1.0 342 379 */ 343 380 function bp_the_profile_group_field_ids() { … … 347 384 /** 348 385 * Return the XProfile group field IDs. 386 * 387 * @since 1.1.0 349 388 * 350 389 * @return string … … 404 443 * Return the XProfile fields. 405 444 * 445 * @since 1.0.0 446 * 406 447 * @return mixed 407 448 */ … … 414 455 * Sets up the XProfile field. 415 456 * 457 * @since 1.0.0 458 * 416 459 * @return mixed 417 460 */ … … 423 466 /** 424 467 * Output the XProfile field ID. 468 * 469 * @since 1.1.0 425 470 */ 426 471 function bp_the_profile_field_id() { … … 430 475 /** 431 476 * Return the XProfile field ID. 477 * 478 * @since 1.1.0 479 * 432 480 * @return mixed|void 433 481 */ … … 447 495 /** 448 496 * Outputs the XProfile field name. 497 * 498 * @since 1.0.0 449 499 */ 450 500 function bp_the_profile_field_name() { … … 455 505 * Returns the XProfile field name. 456 506 * 507 * @since 1.0.0 508 * 457 509 * @return mixed|void 458 510 */ … … 472 524 /** 473 525 * Outputs the XProfile field value. 526 * 527 * @since 1.0.0 474 528 */ 475 529 function bp_the_profile_field_value() { … … 479 533 /** 480 534 * Returns the XProfile field value. 535 * 536 * @since 1.0.0 481 537 * 482 538 * @return mixed|void … … 501 557 /** 502 558 * Outputs the XProfile field edit value. 559 * 560 * @since 1.1.0 503 561 */ 504 562 function bp_the_profile_field_edit_value() { … … 508 566 /** 509 567 * Returns the XProfile field edit value. 568 * 569 * @since 1.1.0 510 570 * 511 571 * @return mixed|void … … 550 610 /** 551 611 * Outputs the XProfile field type. 612 * 613 * @since 1.1.0 552 614 */ 553 615 function bp_the_profile_field_type() { … … 558 620 * Returns the XProfile field type. 559 621 * 622 * @since 1.1.0 623 * 560 624 * @return mixed|void 561 625 */ … … 575 639 /** 576 640 * Outputs the XProfile field description. 641 * 642 * @since 1.1.0 577 643 */ 578 644 function bp_the_profile_field_description() { … … 583 649 * Returns the XProfile field description. 584 650 * 651 * @since 1.1.0 652 * 585 653 * @return mixed|void 586 654 */ … … 600 668 /** 601 669 * Outputs the XProfile field input name. 670 * 671 * @since 1.1.0 602 672 */ 603 673 function bp_the_profile_field_input_name() { … … 607 677 /** 608 678 * Retursn the XProfile field input name. 679 * 680 * @since 1.1.0 609 681 * 610 682 * @return mixed|void … … 706 778 /** 707 779 * Render whether or not a profile field is required. 780 * 781 * @since 1.1.0 708 782 */ 709 783 function bp_the_profile_field_is_required() { … … 713 787 /** 714 788 * Return whether or not a profile field is required. 789 * 790 * @since 1.1.0 791 * 715 792 * @return mixed|void 716 793 */ … … 736 813 /** 737 814 * Output the visibility level of this field. 815 * 816 * @since 1.6.0 738 817 */ 739 818 function bp_the_profile_field_visibility_level() { … … 743 822 /** 744 823 * Return the visibility level of this field. 824 * 825 * @since 1.6.0 745 826 * 746 827 * @return mixed|void … … 770 851 /** 771 852 * Echo the visibility level label of this field. 853 * 854 * @since 1.6.0 772 855 */ 773 856 function bp_the_profile_field_visibility_level_label() { … … 777 860 /** 778 861 * Return the visibility level label of this field. 862 * 863 * @since 1.6.0 779 864 * 780 865 * @return mixed|void … … 807 892 * Return unserialized profile field data. 808 893 * 894 * @since 1.0.0 895 * 809 896 * @param string $value Content to maybe unserialize. 810 897 * @return mixed|string … … 823 910 * Output XProfile field data. 824 911 * 825 * @param string|array $args Array of arguments for field data. 912 * @since 1.2.0 913 * 914 * @param string|array $args Array of arguments for field data. See {@link bp_get_profile_field_data} 826 915 */ 827 916 function bp_profile_field_data( $args = '' ) { … … 832 921 * Return XProfile field data. 833 922 * 834 * @param string|array $args Array of arguments for field data. 835 * @return mixed|void 923 * @since 1.2.0 924 * 925 * @param string|array $args { 926 * Array of arguments for field data. 927 * 928 * @type string|int|bool $field Field identifier. 929 * @type int $user_id ID of the user to get field data for. 930 * } 931 * @return mixed|void 836 932 */ 837 933 function bp_get_profile_field_data( $args = '' ) { … … 971 1067 * Output the XProfile group name. 972 1068 * 1069 * @since 1.0.0 1070 * 973 1071 * @param bool $deprecated Deprecated boolean parameter. 974 1072 * @return mixed|void … … 985 1083 * Return the XProfile group name. 986 1084 * 1085 * @since 1.0.0 1086 * 987 1087 * @return mixed|void 988 1088 */ … … 1010 1110 /** 1011 1111 * Render a formatted string displaying when a profile was last updated. 1112 * 1113 * @since 1.0.0 1012 1114 */ 1013 1115 function bp_profile_last_updated() { … … 1024 1126 /** 1025 1127 * Return a formatted string displaying when a profile was last updated. 1128 * 1129 * @since 1.0.0 1026 1130 * 1027 1131 * @return bool|mixed|void … … 1048 1152 /** 1049 1153 * Display the current profile group ID. 1154 * 1155 * @since 1.1.0 1050 1156 */ 1051 1157 function bp_current_profile_group_id() { … … 1080 1186 /** 1081 1187 * Render an avatar delete link. 1188 * 1189 * @since 1.1.0 1082 1190 */ 1083 1191 function bp_avatar_delete_link() { … … 1089 1197 * 1090 1198 * @since 1.1.0 1199 * 1091 1200 * @return mixed|void 1092 1201 */ … … 1105 1214 /** 1106 1215 * Render an edit profile button. 1216 * 1217 * @since 1.0.0 1107 1218 */ 1108 1219 function bp_edit_profile_button() { … … 1124 1235 * Echo the field visibility radio buttons. 1125 1236 * 1126 * @param array|string $args Args for the radio buttons. 1237 * @since 1.6.0 1238 * 1239 * @param array|string $args Args for the radio buttons. See {@link bp_profile_get_visibility_radio_buttons} 1127 1240 */ 1128 1241 function bp_profile_visibility_radio_buttons( $args = '' ) { … … 1132 1245 * Return the field visibility radio buttons. 1133 1246 * 1134 * @param array|string $args Args for the radio buttons. 1135 * @return string $retval 1247 * @since 1.6.0 1248 * 1249 * @param array|string $args { 1250 * Args for the radio buttons. 1251 * 1252 * @type int $field_id ID of the field to render. 1253 * @type string $before Markup to render before the field. 1254 * @type string $after Markup to render after the field. 1255 * @type string $before_radio Markup to render before the radio button. 1256 * @type string $after_radio Markup to render after the radio button. 1257 * @type string $class Class to apply to the field markup. 1258 * } 1259 * @return string $retval 1136 1260 */ 1137 1261 function bp_profile_get_visibility_radio_buttons( $args = '' ) { … … 1200 1324 * @since 2.0.0 1201 1325 * 1202 * @param array|string $args Args for the select list. 1326 * @param array|string $args Args for the select list. See {@link bp_profile_get_settings_visibility_select} 1203 1327 */ 1204 1328 function bp_profile_settings_visibility_select( $args = '' ) { … … 1210 1334 * @since 2.0.0 1211 1335 * 1212 * @param array|string $args Args for the select list. 1336 * @param array|string $args { 1337 * Args for the select list. 1338 * 1339 * @type int $field_id ID of the field to render. 1340 * @type string $before Markup to render before the field. 1341 * @type string $after Markup to render after the field. 1342 * @type string $class Class to apply to the field markup. 1343 * } 1213 1344 * @return string $retval 1214 1345 */ -
trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php
r10652 r10740 16 16 /** 17 17 * Creates our XProfile component. 18 * 19 * @since 1.5.0 18 20 */ 19 21 class BP_XProfile_Component extends BP_Component { … … 31 33 * 32 34 * @see bp_xprofile_get_visibility_levels() 35 * 33 36 * @since 1.6.0 34 37 * @var array … … 56 59 /** 57 60 * Include files. 61 * 62 * @since 1.5.0 58 63 * 59 64 * @param array $includes Array of files to include. … … 179 184 * Set up navigation. 180 185 * 186 * @since 1.5.0 187 * 181 188 * @global BuddyPress $bp The one true BuddyPress instance 182 189 * … … 302 309 * Set up the Admin Bar. 303 310 * 311 * @since 1.5.0 312 * 304 313 * @param array $wp_admin_nav Admin Bar items. 305 314 */ … … 374 383 /** 375 384 * Sets up the title for pages and <title>. 385 * 386 * @since 1.5.0 376 387 */ 377 388 public function setup_title() { -
trunk/src/bp-xprofile/classes/class-bp-xprofile-data-template.php
r10525 r10740 104 104 * @see BP_XProfile_Group::get() for more details about parameters. 105 105 * 106 * @since 1.5.0 106 107 * @since 2.4.0 Introduced `$member_type` argument. 107 108 * … … 167 168 * Whether or not the loop has field groups. 168 169 * 170 * @since 1.0.0 171 * 169 172 * @return bool 170 173 */ … … 179 182 /** 180 183 * Increments to the next group of fields. 184 * 185 * @since 1.0.0 181 186 * 182 187 * @return object … … 207 212 /** 208 213 * Rewinds to the start of the groups list. 214 * 215 * @since 1.0.0 209 216 */ 210 217 public function rewind_groups() { … … 217 224 /** 218 225 * Kicks off the profile groups. 226 * 227 * @since 1.0.0 219 228 * 220 229 * @return bool … … 242 251 /** 243 252 * Sets up the profile group. 253 * 254 * @since 1.0.0 244 255 */ 245 256 public function the_profile_group() { … … 266 277 * Increments to the next field. 267 278 * 279 * @since 1.0.0 280 * 268 281 * @return int 269 282 */ … … 278 291 /** 279 292 * Rewinds to the start of the fields. 293 * 294 * @since 1.0.0 280 295 */ 281 296 public function rewind_fields() { … … 289 304 * Whether or not the loop has fields. 290 305 * 306 * @since 1.0.0 307 * 291 308 * @return bool 292 309 */ … … 307 324 /** 308 325 * Kick off the profile fields. 326 * 327 * @since 1.0.0 309 328 * 310 329 * @return bool … … 323 342 /** 324 343 * Set up the profile fields. 344 * 345 * @since 1.0.0 325 346 */ 326 347 public function the_profile_field() { -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-radiobutton.php
r10713 r10740 19 19 20 20 /** 21 * Constructor for the radio button field type 21 * Constructor for the radio button field type. 22 22 * 23 23 * @since 2.0.0 -
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r10657 r10740 13 13 /** 14 14 * Class to help set up XProfile fields. 15 * 16 * @since 1.0.0 15 17 */ 16 18 class BP_XProfile_Field { … … 134 136 * 135 137 * @since 2.5.0 136 *137 138 * @var bool 138 139 */ … … 215 216 /** 216 217 * Retrieve a `BP_XProfile_Field` instance. 218 * 219 * @since 2.4.0 217 220 * 218 221 * @static -
trunk/src/bp-xprofile/classes/class-bp-xprofile-group.php
r10720 r10740 13 13 /** 14 14 * Class to help set up XProfile Groups. 15 * 16 * @since 1.0.0 15 17 */ 16 18 class BP_XProfile_Group { … … 20 22 * 21 23 * @since 1.1.0 22 * @var int ID of field group 24 * @var int ID of field group. 23 25 */ 24 26 public $id = null; … … 28 30 * 29 31 * @since 1.1.0 30 * @var string Name of field group 32 * @var string Name of field group. 31 33 */ 32 34 public $name; … … 36 38 * 37 39 * @since 1.1.0 38 * @var string Description of field group 40 * @var string Description of field group. 39 41 */ 40 42 public $description; … … 52 54 * 53 55 * @since 1.1.0 54 * @var int Group order relative to other groups 56 * @var int Group order relative to other groups. 55 57 */ 56 58 public $group_order; … … 60 62 * 61 63 * @since 1.1.0 62 * @var array Fields of group 64 * @var array Fields of group. 63 65 */ 64 66 public $fields; … … 85 87 * 86 88 * @param int $id Field group ID. 87 *88 89 * @return boolean 89 90 */ … … 232 233 /** 233 234 * Populates the BP_XProfile_Group object with profile field groups, fields, 234 * and field data 235 * and field data. 236 * 237 * @since 1.2.0 235 238 * 236 239 * @global object $wpdb WordPress DB access object. -
trunk/src/bp-xprofile/classes/class-bp-xprofile-meta-query.php
r10418 r10740 33 33 * 34 34 * @param array $query Meta query arguments. 35 *36 35 * @return bool Whether the query clause is a first-order clause. 37 36 */ … … 41 40 42 41 /** 43 * Constructs a meta query based on 'meta_*' query vars 42 * Constructs a meta query based on 'meta_*' query vars. 44 43 * 45 44 * @since 2.3.0 … … 101 100 * @param string $primary_id_column ID column for the filtered object in $primary_table. 102 101 * @param object|null $context Optional. The main query object. 103 *104 102 * @return array { 105 103 * Array containing JOIN and WHERE SQL clauses to append to the main query. … … 160 158 * @param string $clause_key Optional. The array key used to name the clause in the original `$meta_query` 161 159 * parameters. If not provided, a key will be generated automatically. 162 *163 160 * @return array { 164 161 * Array containing JOIN and WHERE SQL clauses to append to a first-order query. -
trunk/src/bp-xprofile/classes/class-bp-xprofile-profiledata.php
r10434 r10740 21 21 * XProfile ID. 22 22 * 23 * @since 1.6.0 23 24 * @var int $id 24 25 */ … … 28 29 * User ID. 29 30 * 31 * @since 1.6.0 30 32 * @var int $user_id 31 33 */ … … 35 37 * XProfile field ID. 36 38 * 39 * @since 1.6.0 37 40 * @var int $field_id 38 41 */ … … 42 45 * XProfile field value. 43 46 * 47 * @since 1.6.0 44 48 * @var string $value 45 49 */ … … 49 53 * XProfile field last updated time. 50 54 * 55 * @since 1.6.0 51 56 * @var string $last_updated 52 57 */ … … 56 61 * BP_XProfile_ProfileData constructor. 57 62 * 58 * @param null $field_id Field ID to instantiate. 59 * @param null $user_id User ID to instantiate for. 63 * @since 1.5.0 64 * 65 * @param int|null $field_id Field ID to instantiate. 66 * @param int|null $user_id User ID to instantiate for. 60 67 */ 61 68 public function __construct( $field_id = null, $user_id = null ) { … … 67 74 /** 68 75 * Populates the XProfile profile data. 76 * 77 * @since 1.0.0 69 78 * 70 79 * @param int $field_id Field ID to populate. … … 105 114 * Check if there is data already for the user. 106 115 * 116 * @since 1.0.0 117 * 107 118 * @global object $wpdb 108 119 * @global array $bp 120 * 109 121 * @return bool 110 122 */ … … 137 149 * Check if this data is for a valid field. 138 150 * 151 * @since 1.0.0 152 * 139 153 * @global object $wpdb 154 * 140 155 * @return bool 141 156 */ … … 160 175 /** 161 176 * Save the data for the XProfile field. 177 * 178 * @since 1.0.0 162 179 * 163 180 * @return bool … … 219 236 * Delete specific XProfile field data. 220 237 * 238 * @since 1.0.0 239 * 221 240 * @global object $wpdb 241 * 222 242 * @return boolean 223 243 */ … … 257 277 /** 258 278 * Get a user's profile data for a set of fields. 279 * 280 * @since 2.0.0 259 281 * 260 282 * @param int $user_id ID of user whose data is being queried. … … 324 346 * Get all of the profile information for a specific user. 325 347 * 348 * @since 1.2.0 349 * 326 350 * @param int $user_id ID of the user. 327 351 * @return array … … 369 393 * Get the user's field data id by the id of the xprofile field. 370 394 * 395 * @since 1.6.0 396 * 371 397 * @param int $field_id Field ID being queried for. 372 398 * @param int $user_id User ID associated with field. … … 398 424 * 399 425 * Supports multiple user IDs. 426 * 427 * @since 1.0.0 400 428 * 401 429 * @param int $field_id ID of the field. … … 479 507 * Get profile field values by field name and user ID. 480 508 * 509 * @since 1.0.0 510 * 481 511 * @param array|string $fields Field(s) to get. 482 512 * @param int|null $user_id User ID to get field data for. … … 541 571 * Delete field. 542 572 * 573 * @since 1.0.0 574 * 543 575 * @param int $field_id ID of the field to delete. 544 576 * @return bool … … 559 591 * Get time for last XProfile field data update by user. 560 592 * 593 * @since 1.0.0 594 * 561 595 * @param int $user_id User ID to get time for. 562 596 * @return null|string … … 575 609 * Delete all data for provided user ID. 576 610 * 611 * @since 1.0.0 612 * 577 613 * @param int $user_id User ID to remove data for. 578 614 * @return false|int … … 588 624 /** 589 625 * Get random field type by user ID. 626 * 627 * @since 1.0.0 590 628 * 591 629 * @param int $user_id User ID to query for. … … 606 644 * Get fullname for provided user ID. 607 645 * 646 * @since 1.0.0 647 * 608 648 * @param int $user_id ID of the user to query. 609 649 * @return mixed -
trunk/src/bp-xprofile/classes/class-bp-xprofile-user-admin.php
r10525 r10740 144 144 endwhile; 145 145 146 // If member is already a spammer, show a generic metabox. 146 147 147 } else { 148 // If member is already a spammer, show a generic metabox. 148 149 add_meta_box( 149 150 'bp_xprofile_user_admin_empty_profile', … … 199 200 bp_core_redirect( $redirect_to ); 200 201 201 // Update profile fields.202 202 } elseif ( isset( $_POST['field_ids'] ) ) { 203 203 // Update profile fields. 204 204 // Check the nonce. 205 205 check_admin_referer( 'edit-bp-profile_' . $user_id );
Note: See TracChangeset
for help on using the changeset viewer.