has_sub_fields

Has_sub_fields().

Description

has_sub_fields( (string) $field_name, (bool) $post_id = false ); 

This function is a replica of has_sub_field

Parameters (2)

0. $field_name (string)
The field name.
1. $post_id — Optional. (bool) => false
The post id.

Usage

  1. if ( !function_exists( 'has_sub_fields' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'advanced-custom-fields/core/api.php'; 
  3.  
  4. // The field name. 
  5. $field_name = ''; 
  6.  
  7. // The post id. 
  8. $post_id = false; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = has_sub_fields($field_name, $post_id); 
  12.  

Defined (1)

The function is defined in the following location(s).

/core/api.php  
  1. function has_sub_fields( $field_name, $post_id = false ) 
  2. return has_sub_field( $field_name, $post_id );