Changeset 9304 for trunk/src/bp-xprofile/bp-xprofile-classes.php
- Timestamp:
- 01/06/2015 06:52:22 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-classes.php
r9179 r9304 50 50 $this->description = apply_filters( 'xprofile_group_description_before_save', $this->description, $this->id ); 51 51 52 /** 53 * Fires before the current group instance gets saved. 54 * 55 * Please use this hook to filter the properties above. Each part will be passed in. 56 * 57 * @since BuddyPress (1.0.0) 58 * 59 * @param BP_XProfile_Group Current instance of the group being saved. Passed by reference. 60 */ 52 61 do_action_ref_array( 'xprofile_group_before_save', array( &$this ) ); 53 62 … … 64 73 $this->id = $wpdb->insert_id; 65 74 75 /** 76 * Fires after the current group instance gets saved. 77 * 78 * @since BuddyPress (1.0.0) 79 * 80 * @param BP_XProfile_Group Current instance of the group being saved. Passed by reference. 81 */ 66 82 do_action_ref_array( 'xprofile_group_after_save', array( &$this ) ); 67 83 … … 75 91 return false; 76 92 93 /** 94 * Fires before the current group instance gets deleted. 95 * 96 * @since BuddyPress (2.0.0) 97 * 98 * @param BP_XProfile_Group Current instance of the group being deleted. Passed by reference. 99 */ 77 100 do_action_ref_array( 'xprofile_group_before_delete', array( &$this ) ); 78 101 … … 91 114 } 92 115 116 /** 117 * Fires after the current group instance gets deleted. 118 * 119 * @since BuddyPress (2.0.0) 120 * 121 * @param BP_XProfile_Group Current instance of the group being deleted. Passed by reference. 122 */ 93 123 do_action_ref_array( 'xprofile_group_after_delete', array( &$this ) ); 94 124 … … 401 431 * Fetch the field visibility level for the fields returned by the query 402 432 * 403 * @since BuddyPress (1.6 )433 * @since BuddyPress (1.6.0) 404 434 * 405 435 * @param int $user_id The profile owner's user_id … … 424 454 } else { 425 455 $fallback_visibility = bp_xprofile_get_meta( $field->id, 'field', 'default_visibility' ); 456 457 /** 458 * Filters the XProfile default visibility level for a field. 459 * 460 * @since BuddyPress (1.6.0) 461 * 462 * @param string $value Default visibility value. 463 */ 426 464 $field_visibility = ! empty( $fallback_visibility ) ? $fallback_visibility : apply_filters( 'bp_xprofile_default_visibility_level', 'public' ); 427 465 } … … 518 556 519 557 <?php 558 520 559 /** 521 560 * Fires before XProfile Group submit metabox. … … 535 574 536 575 <?php 576 537 577 /** 538 578 * Fires at the beginning of the XProfile Group publishing actions section. … … 559 599 560 600 <?php 601 561 602 /** 562 603 * Fires after XProfile Group submit metabox. … … 691 732 $this->type_obj = bp_xprofile_create_field_type( $this->type ); 692 733 734 /** 735 * Fires before the current field instance gets saved. 736 * 737 * Please use this hook to filter the properties above. Each part will be passed in. 738 * 739 * @since BuddyPress (1.0.0) 740 * 741 * @param BP_XProfile_Field Current instance of the field being saved. 742 */ 693 743 do_action_ref_array( 'xprofile_field_before_save', array( $this ) ); 694 744 … … 738 788 $post_option = ! empty( $_POST["{$this->type}_option"] ) ? $_POST["{$this->type}_option"] : ''; 739 789 $post_default = ! empty( $_POST["isDefault_{$this->type}_option"] ) ? $_POST["isDefault_{$this->type}_option"] : ''; 790 791 /** 792 * Filters the submitted field option value before saved. 793 * 794 * @since BuddyPress (1.5.0) 795 * 796 * @param string $post_option Submitted option value. 797 * @param BP_XProfile_Field $type Current field type being saved for. 798 */ 740 799 $options = apply_filters( 'xprofile_field_options_before_save', $post_option, $this->type ); 800 801 /** 802 * Filters the default field option value before saved. 803 * 804 * @since BuddyPress (1.5.0) 805 * 806 * @param string $post_default Default option value. 807 * @param BP_XProfile_Field $type Current field type being saved for. 808 */ 741 809 $defaults = apply_filters( 'xprofile_field_default_before_save', $post_default, $this->type ); 742 810 … … 765 833 } 766 834 835 /** 836 * Fires after the current field instance gets saved. 837 * 838 * @since BuddyPress (1.0.0) 839 * 840 * @param BP_XProfile_Field Current instance of the field being saved. 841 */ 767 842 do_action_ref_array( 'xprofile_field_after_save', array( $this ) ); 768 843 … … 804 879 $children = $wpdb->get_results( $sql ); 805 880 881 /** 882 * Filters the found children for a field. 883 * 884 * @since BuddyPress (1.2.5) 885 * 886 * @param object $children Found children for a field. 887 * @param bool $for_editing Whether or not the field is for editing. 888 */ 806 889 return apply_filters( 'bp_xprofile_field_get_children', $children, $for_editing ); 807 890 } … … 937 1020 938 1021 <?php 1022 939 1023 /** 940 1024 * Fires before XProfile Field submit metabox. … … 954 1038 955 1039 <?php 1040 956 1041 /** 957 1042 * Fires at the beginning of the XProfile Field publishing actions section. … … 979 1064 980 1065 <?php 1066 981 1067 /** 982 1068 * Fires after XProfile Field submit metabox. … … 1028 1114 <?php endif ?> 1029 1115 1030 <?php do_action( 'xprofile_field_after_sidebarbox', $this ); ?> 1116 <?php 1117 1118 /** 1119 * Fires after XProfile Field sidebar metabox. 1120 * 1121 * @since BuddyPress (2.2.0) 1122 * 1123 * @param BP_XProfile_Field $this Current XProfile field. 1124 */ 1125 do_action( 'xprofile_field_after_sidebarbox', $this ); ?> 1031 1126 </div> 1032 1127 … … 1069 1164 <?php endif; ?> 1070 1165 1071 <?php do_action( 'xprofile_field_after_contentbox', $this ); ?> 1166 <?php 1167 1168 /** 1169 * Fires after XProfile Field content metabox. 1170 * 1171 * @since BuddyPress (2.2.0) 1172 * 1173 * @param BP_XProfile_Field $this Current XProfile field. 1174 */ 1175 do_action( 'xprofile_field_after_contentbox', $this ); ?> 1072 1176 </div> 1073 1177 </div><!-- #post-body --> … … 1164 1268 } 1165 1269 1270 /** 1271 * Filters whether or not data already exists for the user. 1272 * 1273 * @since BuddyPress (1.2.7) 1274 * 1275 * @param bool $retval Whether or not data already exists. 1276 * @param BP_XProfile_ProfileData $this Instance of the current BP_XProfile_ProfileData class. 1277 */ 1166 1278 return apply_filters_ref_array( 'xprofile_data_exists', array( (bool)$retval, $this ) ); 1167 1279 } … … 1179 1291 $retval = $wpdb->get_row( $wpdb->prepare( "SELECT id FROM {$bp->profile->table_name_fields} WHERE id = %d", $this->field_id ) ); 1180 1292 1293 /** 1294 * Filters whether or not data is for a valid field 1295 * 1296 * @since BuddyPress (1.2.7) 1297 * 1298 * @param bool $retval Whether or not data is valid. 1299 * @param BP_XProfile_ProfileData $this Instance of the current BP_XProfile_ProfileData class. 1300 */ 1181 1301 return apply_filters_ref_array( 'xprofile_data_is_valid_field', array( (bool)$retval, $this ) ); 1182 1302 } … … 1190 1310 $this->last_updated = apply_filters( 'xprofile_data_last_updated_before_save', bp_core_current_time(), $this->id ); 1191 1311 1312 /** 1313 * Fires before the current profile data instance gets saved. 1314 * 1315 * Please use this hook to filter the properties above. Each part will be passed in. 1316 * 1317 * @since BuddyPress (1.0.0) 1318 * 1319 * @param BP_XProfile_ProfileData $this Current instance of the profile data being saved. 1320 */ 1192 1321 do_action_ref_array( 'xprofile_data_before_save', array( $this ) ); 1193 1322 … … 1208 1337 return false; 1209 1338 1339 /** 1340 * Fires after the current profile data instance gets saved. 1341 * 1342 * @since BuddyPress (1.0.0) 1343 * 1344 * @param BP_XProfile_ProfileData $this Current instance of the profile data being saved. 1345 */ 1210 1346 do_action_ref_array( 'xprofile_data_after_save', array( $this ) ); 1211 1347 … … 1227 1363 $bp = buddypress(); 1228 1364 1365 /** 1366 * Fires before the current profile data instance gets deleted. 1367 * 1368 * @since BuddyPress (1.9.0) 1369 * 1370 * @param BP_XProfile_ProfileData $this Current instance of the profile data being deleted. 1371 */ 1229 1372 do_action_ref_array( 'xprofile_data_before_delete', array( $this ) ); 1230 1373 … … 1232 1375 return false; 1233 1376 1377 /** 1378 * Fires after the current profile data instance gets deleted. 1379 * 1380 * @since BuddyPress (1.9.0) 1381 * 1382 * @param BP_XProfile_ProfileData $this Current instance of the profile data being deleted. 1383 */ 1234 1384 do_action_ref_array( 'xprofile_data_after_delete', array( $this ) ); 1235 1385 … … 1567 1717 $this->set_format( '/^\d{4}-\d{1,2}-\d{1,2} 00:00:00$/', 'replace' ); // "Y-m-d 00:00:00" 1568 1718 1719 /** 1720 * Fires inside __construct() method for BP_XProfile_Field_Type_Datebox class. 1721 * 1722 * @since BuddyPress (2.0.0) 1723 * 1724 * @param BP_XProfile_Field_Type_Datebox $this Current instance of 1725 * the field type datebox. 1726 */ 1569 1727 do_action( 'bp_xprofile_field_type_datebox', $this ); 1570 1728 } … … 1607 1765 1608 1766 <label for="<?php bp_the_profile_field_input_name(); ?>_day"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php esc_html_e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 1609 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 1767 <?php 1768 1769 /** 1770 * Fires after field label and displays associated errors for the field. 1771 * 1772 * This is a dynamic hook that is dependent on the associated 1773 * field ID. The hooks will be similar to `bp_field_12_errors` 1774 * where the 12 is the field ID. Simply replace the 12 with 1775 * your needed target ID. 1776 * 1777 * @since BuddyPress (1.8.0) 1778 */ 1779 do_action( bp_get_the_profile_field_errors_action() ); ?> 1610 1780 1611 1781 <select <?php echo $this->get_edit_field_html_elements( $day_r ); ?>> … … 1738 1908 } 1739 1909 1910 /** 1911 * Filters the output for the profile field datebox. 1912 * 1913 * @since BuddyPress (1.1.0) 1914 * 1915 * @param string $html HTML output for the field. 1916 * @param string $value Which date type is being rendered for. 1917 * @param string $day Date formatted for the current day. 1918 * @param string $month Date formatted for the current month. 1919 * @param string $year Date formatted for the current year. 1920 * @param int $id ID of the field object being rendered. 1921 * @param string $date Current date. 1922 */ 1740 1923 echo apply_filters( 'bp_get_the_profile_field_datebox', $html, $args['type'], $day, $month, $year, $this->field_obj->id, $date ); 1741 1924 } … … 1834 2017 1835 2018 $this->set_format( '/^.+$/', 'replace' ); 2019 2020 /** 2021 * Fires inside __construct() method for BP_XProfile_Field_Type_Checkbox class. 2022 * 2023 * @since BuddyPress (2.0.0) 2024 * 2025 * @param BP_XProfile_Field_Type_Checkbox $this Current instance of 2026 * the field type checkbox. 2027 */ 1836 2028 do_action( 'bp_xprofile_field_type_checkbox', $this ); 1837 2029 } … … 1864 2056 </label> 1865 2057 1866 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2058 <?php 2059 2060 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2061 do_action( bp_get_the_profile_field_errors_action() ); ?> 1867 2062 1868 2063 <?php bp_the_profile_field_options( array( … … 1933 2128 esc_html( stripslashes( $options[$k]->name ) ) 1934 2129 ); 2130 2131 /** 2132 * Filters the HTML output for an individual field options checkbox. 2133 * 2134 * @since BuddyPress (1.1.0) 2135 * 2136 * @param string $new_html Label and checkbox input field. 2137 * @param object $value Current option being rendered for. 2138 * @param int $id ID of the field object being rendered. 2139 * @param string $selected Current selected value. 2140 * @param string $k Current index in the foreach loop. 2141 */ 1935 2142 $html .= apply_filters( 'bp_get_the_profile_field_options_checkbox', $new_html, $options[$k], $this->field_obj->id, $selected, $k ); 1936 2143 } … … 1986 2193 1987 2194 $this->set_format( '/^.+$/', 'replace' ); 2195 2196 /** 2197 * Fires inside __construct() method for BP_XProfile_Field_Type_Radiobutton class. 2198 * 2199 * @since BuddyPress (2.0.0) 2200 * 2201 * @param BP_XProfile_Field_Type_Radiobutton $this Current instance of 2202 * the field type radio button. 2203 */ 1988 2204 do_action( 'bp_xprofile_field_type_radiobutton', $this ); 1989 2205 } … … 2017 2233 </label> 2018 2234 2019 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2235 <?php 2236 2237 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2238 do_action( bp_get_the_profile_field_errors_action() ); ?> 2020 2239 2021 2240 <?php bp_the_profile_field_options( array( 'user_id' => $user_id ) ); … … 2080 2299 esc_html( stripslashes( $options[$k]->name ) ) 2081 2300 ); 2301 2302 /** 2303 * Filters the HTML output for an individual field options radio button. 2304 * 2305 * @since BuddyPress (1.1.0) 2306 * 2307 * @param string $new_html Label and radio input field. 2308 * @param object $value Current option being rendered for. 2309 * @param int $id ID of the field object being rendered. 2310 * @param string $selected Current selected value. 2311 * @param string $k Current index in the foreach loop. 2312 */ 2082 2313 $html .= apply_filters( 'bp_get_the_profile_field_options_radio', $new_html, $options[$k], $this->field_obj->id, $selected, $k ); 2083 2314 } … … 2145 2376 2146 2377 $this->set_format( '/^.+$/', 'replace' ); 2378 2379 /** 2380 * Fires inside __construct() method for BP_XProfile_Field_Type_Multiselectbox class. 2381 * 2382 * @since BuddyPress (2.0.0) 2383 * 2384 * @param BP_XProfile_Field_Type_Multiselectbox $this Current instance of 2385 * the field type multiple select box. 2386 */ 2147 2387 do_action( 'bp_xprofile_field_type_multiselectbox', $this ); 2148 2388 } … … 2175 2415 <label for="<?php bp_the_profile_field_input_name(); ?>[]"><?php bp_the_profile_field_name(); ?> <?php if ( bp_get_the_profile_field_is_required() ) : ?><?php _e( '(required)', 'buddypress' ); ?><?php endif; ?></label> 2176 2416 2177 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2417 <?php 2418 2419 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2420 do_action( bp_get_the_profile_field_errors_action() ); ?> 2178 2421 2179 2422 <select <?php echo $this->get_edit_field_html_elements( $r ); ?>> … … 2245 2488 } 2246 2489 2490 /** 2491 * Filters the HTML output for options in a multiselect input. 2492 * 2493 * @since BuddyPress (1.5.0) 2494 * 2495 * @param string $value Option tag for current value being rendered. 2496 * @param object $value Current option being rendered for. 2497 * @param int $id ID of the field object being rendered. 2498 * @param string $selected Current selected value. 2499 * @param string $k Current index in the foreach loop. 2500 */ 2247 2501 $html .= apply_filters( 'bp_get_the_profile_field_options_multiselect', '<option' . $selected . ' value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '">' . esc_html( stripslashes( $options[$k]->name ) ) . '</option>', $options[$k], $this->field_obj->id, $selected, $k ); 2248 2502 } … … 2306 2560 2307 2561 $this->set_format( '/^.+$/', 'replace' ); 2562 2563 /** 2564 * Fires inside __construct() method for BP_XProfile_Field_Type_Selectbox class. 2565 * 2566 * @since BuddyPress (2.0.0) 2567 * 2568 * @param BP_XProfile_Field_Type_Selectbox $this Current instance of 2569 * the field type select box. 2570 */ 2308 2571 do_action( 'bp_xprofile_field_type_selectbox', $this ); 2309 2572 } … … 2335 2598 </label> 2336 2599 2337 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2600 <?php 2601 2602 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2603 do_action( bp_get_the_profile_field_errors_action() ); ?> 2338 2604 2339 2605 <select <?php echo $this->get_edit_field_html_elements( $raw_properties ); ?>> … … 2396 2662 } 2397 2663 2664 /** 2665 * Filters the HTML output for options in a select input. 2666 * 2667 * @since BuddyPress (1.1.0) 2668 * 2669 * @param string $value Option tag for current value being rendered. 2670 * @param object $value Current option being rendered for. 2671 * @param int $id ID of the field object being rendered. 2672 * @param string $selected Current selected value. 2673 * @param string $k Current index in the foreach loop. 2674 */ 2398 2675 $html .= apply_filters( 'bp_get_the_profile_field_options_select', '<option' . $selected . ' value="' . esc_attr( stripslashes( $options[$k]->name ) ) . '">' . esc_html( stripslashes( $options[$k]->name ) ) . '</option>', $options[$k], $this->field_obj->id, $selected, $k ); 2399 2676 } … … 2453 2730 2454 2731 $this->set_format( '/^.*$/m', 'replace' ); 2732 2733 /** 2734 * Fires inside __construct() method for BP_XProfile_Field_Type_Textarea class. 2735 * 2736 * @since BuddyPress (2.0.0) 2737 * 2738 * @param BP_XProfile_Field_Type_Textarea $this Current instance of 2739 * the field type textarea. 2740 */ 2455 2741 do_action( 'bp_xprofile_field_type_textarea', $this ); 2456 2742 } … … 2484 2770 </label> 2485 2771 2486 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2772 <?php 2773 2774 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2775 do_action( bp_get_the_profile_field_errors_action() ); ?> 2487 2776 2488 2777 <textarea <?php echo $this->get_edit_field_html_elements( $r ); ?>><?php bp_the_profile_field_edit_value(); ?></textarea> … … 2540 2829 2541 2830 $this->set_format( '/^.*$/', 'replace' ); 2831 2832 /** 2833 * Fires inside __construct() method for BP_XProfile_Field_Type_Textbox class. 2834 * 2835 * @since BuddyPress (2.0.0) 2836 * 2837 * @param BP_XProfile_Field_Type_Textbox $this Current instance of 2838 * the field type text box. 2839 */ 2542 2840 do_action( 'bp_xprofile_field_type_textbox', $this ); 2543 2841 } … … 2571 2869 </label> 2572 2870 2573 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2871 <?php 2872 2873 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2874 do_action( bp_get_the_profile_field_errors_action() ); ?> 2574 2875 2575 2876 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>> … … 2627 2928 2628 2929 $this->set_format( '/^\d+|-\d+$/', 'replace' ); 2930 2931 /** 2932 * Fires inside __construct() method for BP_XProfile_Field_Type_Number class. 2933 * 2934 * @since BuddyPress (2.0.0) 2935 * 2936 * @param BP_XProfile_Field_Type_Number $this Current instance of 2937 * the field type number. 2938 */ 2629 2939 do_action( 'bp_xprofile_field_type_number', $this ); 2630 2940 } … … 2658 2968 </label> 2659 2969 2660 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 2970 <?php 2971 2972 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 2973 do_action( bp_get_the_profile_field_errors_action() ); ?> 2661 2974 2662 2975 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>> … … 2713 3026 $this->set_format( '_^(?:(?:https?|ftp)://)(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)(?:\.(?:[a-z\x{00a1}-\x{ffff}0-9]+-?)*[a-z\x{00a1}-\x{ffff}0-9]+)*(?:\.(?:[a-z\x{00a1}-\x{ffff}]{2,})))(?::\d{2,5})?(?:/[^\s]*)?$_iuS', 'replace' ); 2714 3027 3028 /** 3029 * Fires inside __construct() method for BP_XProfile_Field_Type_URL class. 3030 * 3031 * @since BuddyPress (2.0.0) 3032 * 3033 * @param BP_XProfile_Field_Type_URL $this Current instance of 3034 * the field type URL. 3035 */ 2715 3036 do_action( 'bp_xprofile_field_type_url', $this ); 2716 3037 } … … 2747 3068 </label> 2748 3069 2749 <?php do_action( bp_get_the_profile_field_errors_action() ); ?> 3070 <?php 3071 3072 /** This action is documented in bp-xprofile/bp-xprofile-classes */ 3073 do_action( bp_get_the_profile_field_errors_action() ); ?> 2750 3074 2751 3075 <input <?php echo $this->get_edit_field_html_elements( $r ); ?>> … … 2946 3270 */ 2947 3271 public function __construct() { 3272 3273 /** 3274 * Fires inside __construct() method for BP_XProfile_Field_Type class. 3275 * 3276 * @since BuddyPress (2.0.0) 3277 * 3278 * @param BP_XProfile_Field_Type $this Current instance of 3279 * the field type class. 3280 */ 2948 3281 do_action( 'bp_xprofile_field_type', $this ); 2949 3282 } … … 2962 3295 public function set_format( $format, $replace_format = 'add' ) { 2963 3296 3297 /** 3298 * Filters the regex format for the field type. 3299 * 3300 * @since BuddyPress (2.0.0) 3301 * 3302 * @param string $format Regex string. 3303 * @param string $replace_format Optional replace format If "replace", replaces the 3304 * format instead of adding to it. Defaults to "add". 3305 * @param BP_XProfile_Field_Type $this Current instance of the BP_XProfile_Field_Type class. 3306 */ 2964 3307 $format = apply_filters( 'bp_xprofile_field_type_set_format', $format, $replace_format, $this ); 2965 3308 … … 2974 3317 2975 3318 /** 2976 * Add a value to this type's whitelist that thatprofile data will be asserted against.3319 * Add a value to this type's whitelist that profile data will be asserted against. 2977 3320 * 2978 3321 * You can call this method multiple times to set multiple formats. When validation is performed, … … 2985 3328 public function set_whitelist_values( $values ) { 2986 3329 foreach ( (array) $values as $value ) { 3330 3331 /** 3332 * Filters values for field type's whitelist that profile data will be asserted against. 3333 * 3334 * @since BuddyPress (2.0.0) 3335 * 3336 * @param string $value Field value. 3337 * @param array $values Original array of values. 3338 * @param BP_XProfile_Field_Type $this Current instance of the BP_XProfile_Field_Type class. 3339 */ 2987 3340 $this->validation_whitelist[] = apply_filters( 'bp_xprofile_field_type_set_whitelist_values', $value, $values, $this ); 2988 3341 } … … 3030 3383 } 3031 3384 3385 /** 3386 * Filters whether or not field type is a valid format. 3387 * 3388 * @since BuddyPress (2.0.0) 3389 * 3390 * @param bool $validated Whether or not the field type is valid. 3391 * @param string|array $values Value to check against the registered formats. 3392 * @param BP_XProfile_Field_Type $this Current instance of the BP_XProfile_Field_Type class. 3393 */ 3032 3394 return (bool) apply_filters( 'bp_xprofile_field_type_is_valid', $validated, $values, $this ); 3033 3395 } … … 3254 3616 3255 3617 $html = ''; 3618 3619 /** 3620 * Filters the edit html elements and attributes. 3621 * 3622 * @since BuddyPress (2.0.0) 3623 * 3624 * @param array $r Array of parsed arguments. 3625 * @param string $value Class name for the current class instance. 3626 */ 3256 3627 $r = (array) apply_filters( 'bp_xprofile_field_edit_html_elements', $r, get_class( $this ) ); 3257 3628
Note: See TracChangeset
for help on using the changeset viewer.