Automattic / Automattic/VIP-Coding-Standards

Flag if Advanced Custom Fields plugin version is 4.*

Open
#702 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
261
Forks
44
Avg merge
19m
Merged PRs (30d)
1

Description

## Describe the solution you'd like

On https://docs.wpvip.com/technical-references/plugins/acf-5-and-vip-go/, we prohibit using any ACF version 4:

> Please note that while ACF version 5 can be used on most VIP Go sites (at customer discretion), ACF 4 should not be used.

## What code should be reported as a violation?

```
/*
Plugin Name: Advanced Custom Fields
Plugin URI: http://www.advancedcustomfields.com/
Description: Customise WordPress with powerful, professional and intuitive fields
Version: 4.4.4
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Domain Path: /lang
*/

```

```
/*
Plugin Name: Advanced Custom Fields PRO
Plugin URI: http://www.advancedcustomfields.com/
Description: Customise WordPress with powerful, professional and intuitive fields
Version: 4.4.4
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Domain Path: /lang
*/

```

## What code should *not* be reported as a violation?

```
/*
Plugin Name: Advanced Custom Fields
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.9.5
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Domain Path: /lang
*/
```

```
/*
Plugin Name: Advanced Custom Fields PRO
Plugin URI: https://www.advancedcustomfields.com
Description: Customize WordPress with powerful, professional and intuitive fields.
Version: 5.9.5
Author: Elliot Condon
Author URI: https://www.advancedcustomfields.com
Text Domain: acf
Domain Path: /lang
*/

```

Contributor guide

Open the contributing guide

Research direction

Locate the existing plugin-header and version checks and their tests, then compare them with the ACF 4.4.4 and 5.9.5 examples in this issue. Done means ACF and ACF PRO version 4.* are reported as violations while version 5.* is not, with tests covering both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.