- Timestamp:
- 01/03/2016 06:14:41 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php
r10418 r10434 11 11 defined( 'ABSPATH' ) || exit; 12 12 13 /** 14 * Class to help set up XProfile fields. 15 */ 13 16 class BP_XProfile_Field { 14 17 … … 17 20 * 18 21 * @since 1.0.0 19 *20 22 * @var int ID of field. 21 23 */ … … 26 28 * 27 29 * @since 1.0.0 28 *29 30 * @var int Field group ID for field. 30 31 */ … … 35 36 * 36 37 * @since 1.0.0 37 *38 38 * @var int Parent ID of field. 39 39 */ … … 44 44 * 45 45 * @since 1.0.0 46 *47 46 * @var string Field type. 48 47 */ … … 53 52 * 54 53 * @since 1.0.0 55 *56 54 * @var string Field name. 57 55 */ … … 62 60 * 63 61 * @since 1.0.0 64 *65 62 * @var string Field description. 66 63 */ … … 71 68 * 72 69 * @since 1.0.0 73 *74 70 * @var bool Is field required to be filled out? 75 71 */ … … 80 76 * 81 77 * @since 1.0.0 82 *83 78 * @var int Can field be deleted? 84 79 */ … … 89 84 * 90 85 * @since 1.0.0 91 *92 86 * @var int Field position. 93 87 */ … … 98 92 * 99 93 * @since 1.0.0 100 *101 94 * @var int Option order. 102 95 */ … … 107 100 * 108 101 * @since 1.0.0 109 *110 102 * @var string Order child fields by. 111 103 */ … … 116 108 * 117 109 * @since 1.0.0 118 *119 110 * @var bool Is this the default option for this field? 120 111 */ … … 126 117 * @since 1.9.0 127 118 * @since 2.4.0 Property marked protected. Now accessible by magic method or by `get_default_visibility()`. 128 *129 119 * @var string Default field data visibility. 130 120 */ … … 136 126 * @since 2.3.0 137 127 * @since 2.4.0 Property marked protected. Now accessible by magic method or by `get_allow_custom_visibility()`. 138 *139 128 * @var string Members are allowed/disallowed to modify data visibility. 140 129 */ … … 145 134 * 146 135 * @since 2.0.0 147 *148 136 * @var BP_XProfile_Field_Type Field type object used for validation. 149 137 */ … … 154 142 * 155 143 * @since 2.0.0 156 *157 144 * @var BP_XProfile_ProfileData Field data for user ID. 158 145 */ … … 323 310 * 324 311 * @param boolean $delete_data Whether or not to delete data. 325 *326 312 * @return boolean 327 313 */ … … 486 472 do_action_ref_array( 'xprofile_field_after_save', array( $this ) ); 487 473 488 // Recreate type_obj in case someone changed $this->type via a filter 474 // Recreate type_obj in case someone changed $this->type via a filter. 489 475 $this->type_obj = bp_xprofile_create_field_type( $this->type ); 490 476 $this->type_obj->field_obj = $this; … … 502 488 * 503 489 * @param int $user_id ID of the user to get field data for. 504 *505 490 * @return object 506 491 */ … … 517 502 * 518 503 * @param bool $for_editing Whether or not the field is for editing. 519 *520 504 * @return array 521 505 */ … … 639 623 * @param bool $append Whether to append to existing member types. If false, all existing member type 640 624 * associations will be deleted before adding your `$member_types`. Default false. 641 *642 625 * @return array Member types for the current field, after being saved. 643 626 */ … … 810 793 } 811 794 812 /** Static Methods ********************************************************/ 813 795 /* Static Methods ********************************************************/ 796 797 /** 798 * Get the type for provided field ID. 799 * 800 * @param int $field_id Field ID to get type of. 801 * @return bool|null|string 802 */ 814 803 public static function get_type( $field_id = 0 ) { 815 804 global $wpdb; … … 840 829 * 841 830 * @param int $group_id ID of the field group to delete fields from. 842 *843 831 * @return boolean 844 832 */ … … 871 859 * 872 860 * @param string $field_name Name of the field to query the ID for. 873 *874 861 * @return boolean 875 862 */ … … 898 885 * @param int|null $position Field position to update. 899 886 * @param int|null $field_group_id ID of the field group. 900 *901 887 * @return boolean 902 888 */ … … 934 920 * @param string|array $member_types Member type or array of member types. Use 'any' to return unrestricted 935 921 * fields (those available for anyone, regardless of member type). 936 *937 922 * @return array Multi-dimensional array, with field IDs as top-level keys, and arrays of member types 938 923 * associated with each field as values. … … 1075 1060 1076 1061 /** 1077 * This function populates the items for radio buttons checkboxes and drop 1078 * down boxes. 1062 * Populates the items for radio buttons, checkboxes, and dropdown boxes. 1079 1063 */ 1080 1064 public function render_admin_form_children() { … … 1489 1473 * 1490 1474 * @param int $field_id ID of field to check. 1491 *1492 1475 * @return bool 1493 1476 */
Note: See TracChangeset
for help on using the changeset viewer.