Skip to content
This repository was archived by the owner on Oct 13, 2022. It is now read-only.

Commit 2843a80

Browse files
committed
Fixed bug in ACF4 affecting $version parameter
elliotcondon/acf#707 (comment)
1 parent fb92ad0 commit 2843a80

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

acf-FIELD-NAME/acf-FIELD-NAME.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,15 @@ function __construct() {
6363
* @date 17/02/2016
6464
* @since 1.0.0
6565
*
66-
* @param $version (int) major ACF version. Defaults to 4
66+
* @param $version (int) major ACF version. Defaults to false
6767
* @return void
6868
*/
6969

70-
function include_field( $version = 4 ) {
70+
function include_field( $version = false ) {
71+
72+
// support empty $version
73+
if( !$version ) $version = 4;
74+
7175

7276
// load textdomain
7377
load_plugin_textdomain( 'TEXTDOMAIN', false, plugin_basename( dirname( __FILE__ ) ) . '/lang' );

0 commit comments

Comments
 (0)