Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
PUM_Utils_Fields::parse_tab_fields( $fields, array $args = array() )
Description Description
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Warning: foreach() argument must be of type array|object, string given in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 813
Warning: Array to string conversion in /mnt/data/home/502433.cloudwaysapps.com/rhbymdevka/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 808
Parameters Parameters
- $fields
-
(Required)
- $args
-
(Optional)
Default value: array()
Return Return
(mixed)
Source Source
File: classes/Utils/Fields.php
public static function parse_tab_fields( $fields, $args = array() ) { $args = wp_parse_args( $args, array( 'has_sections' => false, 'name' => '%s', ) ); if ( $args['has_sections'] ) { foreach ( $fields as $tab_id => $tab_sections ) { foreach ( $tab_sections as $section_id => $section_fields ) { if ( self::is_field( $section_fields ) ) { // Allow for flat tabs with no sections. $section_id = 'main'; $section_fields = array( $section_id => $section_fields, ); } $fields[ $tab_id ][ $section_id ] = self::parse_fields( $section_fields, $args['name'] ); } } } else { foreach ( $fields as $tab_id => $tab_fields ) { $fields[ $tab_id ] = self::parse_fields( $tab_fields, $args['name'] ); } } return $fields; }
Expand full source code Collapse full source code View on Trac