get_row_sub_value()ACF 5.3.8

This function is used inside a 'has_sub_field' while loop to return a sub field value

No Hooks.

Returns

(Mixed).

Usage

get_row_sub_value( $selector );
$selector(required)
.

Changelog

Since 5.3.8 Introduced.

get_row_sub_value() code ACF 6.8.8

function get_row_sub_value( $selector ) {

	// vars
	$row = acf_get_loop( 'active' );

	// bail early if no row
	if ( ! $row ) {
		return null;
	}

	// return value
	if ( isset( $row['value'][ $row['i'] ][ $selector ] ) ) {
		return $row['value'][ $row['i'] ][ $selector ];
	}

	// return
	return null;
}