PHP code example of morrislaptop / advanced-custom-fields-wpcli

1. Go to this page and download the library: Download morrislaptop/advanced-custom-fields-wpcli library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

morrislaptop / advanced-custom-fields-wpcli example snippets


wp acf export

wp acf export --export_path=acf-exports/

wp acf clean

add_filter( 'acfwpcli_fieldgroup_paths', 'add_plugin_path' );

public function add_plugin_path( $paths ) {
  $paths['my_plugin'] = MY_PLUGIN_ROOT . '/lib/field-groups/';
  return $paths;
}