Changeset 10434 for trunk/src/bp-xprofile/bp-xprofile-template.php
- Timestamp:
- 01/03/2016 06:14:41 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-template.php
r10417 r10434 165 165 } 166 166 167 /** 168 * Whether or not the loop has field groups. 169 * 170 * @return bool 171 */ 167 172 public function has_groups() { 168 173 if ( ! empty( $this->group_count ) ) { … … 173 178 } 174 179 180 /** 181 * Increments to the next group of fields. 182 * 183 * @return object 184 */ 175 185 public function next_group() { 176 186 $this->current_group++; … … 196 206 } 197 207 208 /** 209 * Rewinds to the start of the groups list. 210 */ 198 211 public function rewind_groups() { 199 212 $this->current_group = -1; … … 203 216 } 204 217 218 /** 219 * Kicks off the profile groups. 220 * 221 * @return bool 222 */ 205 223 public function profile_groups() { 206 224 if ( $this->current_group + 1 < $this->group_count ) { … … 223 241 } 224 242 243 /** 244 * Sets up the profile group. 245 */ 225 246 public function the_profile_group() { 226 247 global $group; … … 243 264 /** Fields ****************************************************************/ 244 265 266 /** 267 * Increments to the next field. 268 * 269 * @return int 270 */ 245 271 public function next_field() { 246 272 $this->current_field++; … … 251 277 } 252 278 279 /** 280 * Rewinds to the start of the fields. 281 */ 253 282 public function rewind_fields() { 254 283 $this->current_field = -1; … … 258 287 } 259 288 289 /** 290 * Whether or not the loop has fields. 291 * 292 * @return bool 293 */ 260 294 public function has_fields() { 261 295 $has_data = false; … … 272 306 } 273 307 308 /** 309 * Kick off the profile fields. 310 * 311 * @return bool 312 */ 274 313 public function profile_fields() { 275 314 if ( $this->current_field + 1 < $this->field_count ) { … … 283 322 } 284 323 324 /** 325 * Set up the profile fields. 326 */ 285 327 public function the_profile_field() { 286 328 global $field; … … 369 411 } 370 412 413 /** 414 * Start off the profile groups. 415 * 416 * @return mixed 417 */ 371 418 function bp_profile_groups() { 372 419 global $profile_template; … … 374 421 } 375 422 423 /** 424 * Set up the profile groups. 425 * 426 * @return mixed 427 */ 376 428 function bp_the_profile_group() { 377 429 global $profile_template; … … 379 431 } 380 432 433 /** 434 * Whether or not the group has fields to display. 435 * 436 * @return mixed 437 */ 381 438 function bp_profile_group_has_fields() { 382 439 global $profile_template; … … 384 441 } 385 442 443 /** 444 * Output the class attribute for a field. 445 * 446 * @param string|bool $class Extra classes to append to class attribute. 447 */ 386 448 function bp_field_css_class( $class = false ) { 387 449 echo bp_get_field_css_class( $class ); 388 450 } 451 452 /** 453 * Return the class attribute for a field. 454 * 455 * @param string|bool $class Extra classes to append to class attribute. 456 * @return string 457 */ 389 458 function bp_get_field_css_class( $class = false ) { 390 459 global $profile_template; … … 437 506 } 438 507 508 /** 509 * Whether or not the XProfile field has data to display. 510 * 511 * @return mixed 512 */ 439 513 function bp_field_has_data() { 440 514 global $profile_template; … … 442 516 } 443 517 518 /** 519 * Whether or not the XProfile field has public data to display. 520 * 521 * @return bool 522 */ 444 523 function bp_field_has_public_data() { 445 524 global $profile_template; … … 452 531 } 453 532 533 /** 534 * Output the XProfile group ID. 535 */ 454 536 function bp_the_profile_group_id() { 455 537 echo bp_get_the_profile_group_id(); 456 538 } 539 540 /** 541 * Return the XProfile group ID. 542 * 543 * @return mixed|void 544 */ 457 545 function bp_get_the_profile_group_id() { 458 546 global $group; 459 547 460 548 /** 461 * Filters the profile group ID.549 * Filters the XProfile group ID. 462 550 * 463 551 * @since 1.1.0 … … 468 556 } 469 557 558 /** 559 * Output the XProfile group name. 560 */ 470 561 function bp_the_profile_group_name() { 471 562 echo bp_get_the_profile_group_name(); 472 563 } 564 565 /** 566 * Return the XProfile group name. 567 * 568 * @return mixed|void 569 */ 473 570 function bp_get_the_profile_group_name() { 474 571 global $group; 475 572 476 573 /** 477 * Filters the profile group name.574 * Filters the XProfile group name. 478 575 * 479 576 * @since 1.0.0 … … 484 581 } 485 582 583 /** 584 * Output the XProfile group slug. 585 */ 486 586 function bp_the_profile_group_slug() { 487 587 echo bp_get_the_profile_group_slug(); 488 588 } 589 590 /** 591 * Return the XProfile group slug. 592 * 593 * @return mixed|void 594 */ 489 595 function bp_get_the_profile_group_slug() { 490 596 global $group; 491 597 492 598 /** 493 * Filters the profile group slug.599 * Filters the XProfile group slug. 494 600 * 495 601 * @since 1.1.0 … … 500 606 } 501 607 608 /** 609 * Output the XProfile group description. 610 */ 502 611 function bp_the_profile_group_description() { 503 612 echo bp_get_the_profile_group_description(); 504 613 } 614 615 /** 616 * Return the XProfile group description. 617 * 618 * @return mixed|void 619 */ 505 620 function bp_get_the_profile_group_description() { 506 621 global $group; 507 622 508 623 /** 509 * Filters the profile group description.624 * Filters the XProfile group description. 510 625 * 511 626 * @since 1.0.0 … … 516 631 } 517 632 633 /** 634 * Output the XProfile group edit form action. 635 */ 518 636 function bp_the_profile_group_edit_form_action() { 519 637 echo bp_get_the_profile_group_edit_form_action(); 520 638 } 639 640 /** 641 * Return the XProfile group edit form action. 642 * 643 * @return mixed|void 644 */ 521 645 function bp_get_the_profile_group_edit_form_action() { 522 646 global $group; … … 526 650 527 651 /** 528 * Filters the action for the profile group edit form.652 * Filters the action for the XProfile group edit form. 529 653 * 530 654 * @since 1.1.0 … … 536 660 } 537 661 662 /** 663 * Output the XProfile group field IDs. 664 */ 538 665 function bp_the_profile_group_field_ids() { 539 666 echo bp_get_the_profile_group_field_ids(); 540 667 } 668 669 /** 670 * Return the XProfile group field IDs. 671 * 672 * @return string 673 */ 541 674 function bp_get_the_profile_group_field_ids() { 542 675 global $group; … … 590 723 } 591 724 725 /** 726 * Return the XProfile fields. 727 * 728 * @return mixed 729 */ 592 730 function bp_profile_fields() { 593 731 global $profile_template; … … 595 733 } 596 734 735 /** 736 * Sets up the XProfile field. 737 * 738 * @return mixed 739 */ 597 740 function bp_the_profile_field() { 598 741 global $profile_template; … … 600 743 } 601 744 745 /** 746 * Output the XProfile field ID. 747 */ 602 748 function bp_the_profile_field_id() { 603 749 echo bp_get_the_profile_field_id(); 604 750 } 751 752 /** 753 * Return the XProfile field ID. 754 * @return mixed|void 755 */ 605 756 function bp_get_the_profile_field_id() { 606 757 global $field; 607 758 608 759 /** 609 * Filters the profile field ID.760 * Filters the XProfile field ID. 610 761 * 611 762 * @since 1.1.0 … … 616 767 } 617 768 769 /** 770 * Outputs the XProfile field name. 771 */ 618 772 function bp_the_profile_field_name() { 619 773 echo bp_get_the_profile_field_name(); 620 774 } 775 776 /** 777 * Returns the XProfile field name. 778 * 779 * @return mixed|void 780 */ 621 781 function bp_get_the_profile_field_name() { 622 782 global $field; 623 783 624 784 /** 625 * Filters the profile field name.785 * Filters the XProfile field name. 626 786 * 627 787 * @since 1.0.0 … … 632 792 } 633 793 794 /** 795 * Outputs the XProfile field value. 796 */ 634 797 function bp_the_profile_field_value() { 635 798 echo bp_get_the_profile_field_value(); 636 799 } 800 801 /** 802 * Returns the XProfile field value. 803 * 804 * @return mixed|void 805 */ 637 806 function bp_get_the_profile_field_value() { 638 807 global $field; … … 641 810 642 811 /** 643 * Filters the profile field value.812 * Filters the XProfile field value. 644 813 * 645 814 * @since 1.0.0 … … 652 821 } 653 822 823 /** 824 * Outputs the XProfile field edit value. 825 */ 654 826 function bp_the_profile_field_edit_value() { 655 827 echo bp_get_the_profile_field_edit_value(); 656 828 } 829 830 /** 831 * Returns the XProfile field edit value. 832 * 833 * @return mixed|void 834 */ 657 835 function bp_get_the_profile_field_edit_value() { 658 836 global $field; … … 681 859 682 860 /** 683 * Filters the profile field edit value.861 * Filters the XProfile field edit value. 684 862 * 685 863 * @since 1.1.0 … … 692 870 } 693 871 872 /** 873 * Outputs the XProfile field type. 874 */ 694 875 function bp_the_profile_field_type() { 695 876 echo bp_get_the_profile_field_type(); 696 877 } 878 879 /** 880 * Returns the XProfile field type. 881 * 882 * @return mixed|void 883 */ 697 884 function bp_get_the_profile_field_type() { 698 885 global $field; 699 886 700 887 /** 701 * Filters the profile field type.888 * Filters the XProfile field type. 702 889 * 703 890 * @since 1.1.0 … … 708 895 } 709 896 897 /** 898 * Outputs the XProfile field description. 899 */ 710 900 function bp_the_profile_field_description() { 711 901 echo bp_get_the_profile_field_description(); 712 902 } 903 904 /** 905 * Returns the XProfile field description. 906 * 907 * @return mixed|void 908 */ 713 909 function bp_get_the_profile_field_description() { 714 910 global $field; 715 911 716 912 /** 717 * Filters the profile field description.913 * Filters the XProfile field description. 718 914 * 719 915 * @since 1.1.0 … … 724 920 } 725 921 922 /** 923 * Outputs the XProfile field input name. 924 */ 726 925 function bp_the_profile_field_input_name() { 727 926 echo bp_get_the_profile_field_input_name(); 728 927 } 928 929 /** 930 * Retursn the XProfile field input name. 931 * 932 * @return mixed|void 933 */ 729 934 function bp_get_the_profile_field_input_name() { 730 935 global $field; … … 821 1026 } 822 1027 1028 /** 1029 * Render whether or not a profile field is required. 1030 */ 823 1031 function bp_the_profile_field_is_required() { 824 1032 echo bp_get_the_profile_field_is_required(); 825 1033 } 1034 1035 /** 1036 * Return whether or not a profile field is required. 1037 * @return mixed|void 1038 */ 826 1039 function bp_get_the_profile_field_is_required() { 827 1040 global $field; … … 844 1057 845 1058 /** 846 * Echothe visibility level of this field.1059 * Output the visibility level of this field. 847 1060 */ 848 1061 function bp_the_profile_field_visibility_level() { 849 1062 echo bp_get_the_profile_field_visibility_level(); 850 1063 } 1064 851 1065 /** 852 1066 * Return the visibility level of this field. 1067 * 1068 * @return mixed|void 853 1069 */ 854 1070 function bp_get_the_profile_field_visibility_level() { … … 880 1096 echo bp_get_the_profile_field_visibility_level_label(); 881 1097 } 1098 882 1099 /** 883 1100 * Return the visibility level label of this field. 1101 * 1102 * @return mixed|void 884 1103 */ 885 1104 function bp_get_the_profile_field_visibility_level_label() { … … 907 1126 } 908 1127 909 1128 /** 1129 * Return unserialized profile field data. 1130 * 1131 * @param string $value Content to maybe unserialize. 1132 * @return mixed|string 1133 */ 910 1134 function bp_unserialize_profile_field( $value ) { 911 1135 if ( is_serialized($value) ) { … … 918 1142 } 919 1143 1144 /** 1145 * Output XProfile field data. 1146 * 1147 * @param string|array $args Array of arguments for field data. 1148 */ 920 1149 function bp_profile_field_data( $args = '' ) { 921 1150 echo bp_get_profile_field_data( $args ); 922 1151 } 1152 1153 /** 1154 * Return XProfile field data. 1155 * 1156 * @param string|array $args Array of arguments for field data. 1157 * @return mixed|void 1158 */ 923 1159 function bp_get_profile_field_data( $args = '' ) { 924 1160 … … 1054 1290 } 1055 1291 1292 /** 1293 * Output the XProfile group name. 1294 * 1295 * @param bool $deprecated Deprecated boolean parameter. 1296 * @return mixed|void 1297 */ 1056 1298 function bp_profile_group_name( $deprecated = true ) { 1057 1299 if ( !$deprecated ) { … … 1061 1303 } 1062 1304 } 1305 1306 /** 1307 * Return the XProfile group name. 1308 * 1309 * @return mixed|void 1310 */ 1063 1311 function bp_get_profile_group_name() { 1064 1312 … … 1082 1330 } 1083 1331 1332 /** 1333 * Render a formatted string displaying when a profile was last updated. 1334 */ 1084 1335 function bp_profile_last_updated() { 1085 1336 … … 1092 1343 } 1093 1344 } 1345 1346 /** 1347 * Return a formatted string displaying when a profile was last updated. 1348 * 1349 * @return bool|mixed|void 1350 */ 1094 1351 function bp_get_profile_last_updated() { 1095 1352 … … 1111 1368 } 1112 1369 1370 /** 1371 * Display the current profile group ID. 1372 */ 1113 1373 function bp_current_profile_group_id() { 1114 1374 echo bp_get_current_profile_group_id(); 1115 1375 } 1376 1377 /** 1378 * Return the current profile group ID. 1379 * 1380 * @since 1.1.0 1381 * 1382 * @return mixed|void 1383 */ 1116 1384 function bp_get_current_profile_group_id() { 1117 1385 $profile_group_id = bp_action_variable( 1 ); … … 1132 1400 } 1133 1401 1402 /** 1403 * Render an avatar delete link. 1404 */ 1134 1405 function bp_avatar_delete_link() { 1135 1406 echo bp_get_avatar_delete_link(); 1136 1407 } 1408 1409 /** 1410 * Return an avatar delete link. 1411 * 1412 * @since 1.1.0 1413 * @return mixed|void 1414 */ 1137 1415 function bp_get_avatar_delete_link() { 1138 1416 … … 1147 1425 } 1148 1426 1427 /** 1428 * Render an edit profile button. 1429 */ 1149 1430 function bp_edit_profile_button() { 1150 1431 bp_button( array( … … 1174 1455 * 1175 1456 * @param array|string $args Args for the radio buttons. 1176 *1177 1457 * @return string $retval 1178 1458 */ … … 1253 1533 * 1254 1534 * @param array|string $args Args for the select list. 1255 *1256 1535 * @return string $retval 1257 1536 */ … … 1320 1599 * 1321 1600 * @since 2.4.0 1322 *1323 * @return string HTML for the required label.1324 1601 */ 1325 1602 function bp_the_profile_field_required_label() {
Note: See TracChangeset
for help on using the changeset viewer.