acf/fields/max_appended_choices

acf/fields/max_appended_choices

Hook Type: filter

See hook in core

Displaying hooks found in version: advanced-custom-fields.6.8.5

apply_filters('acf/fields/max_appended_choices') is found 2 times:

  • /includes/fields/class-acf-field-radio.php line 370
    					// sanitize (remove tags)
    					$value = sanitize_text_field( $value );
    
    					/** This filter is documented in includes/fields/class-acf-field-select.php */
    					$max = (int) apply_filters( 'acf/fields/max_appended_choices', 1000, $field, $post_id );
    
    					// bail if the cap is reached; the normalized value still saves
    					if ( count( $field['choices'] ) >= $max ) {
    						return $value;
    					}
    
    
  • /includes/fields/class-acf-field-select.php line 620
    			 * @param int            $max     Maximum number of choices. Default 1000.
    			 * @param array          $field   The field array holding all the field options.
    			 * @param integer|string $post_id The post_id of which the value will be saved.
    			 */
    			$max = (int) apply_filters( 'acf/fields/max_appended_choices', 1000, $field, $post_id );
    
    			$appended = false;
    
    			foreach ( $value as $v ) {
    				// Skip if the raw submitted value matches an existing key,
    				// preserving back-compat for fields whose choices contain