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

In {{field_name}}-v3.php __construct, $this->settings is missing #2

Closed
soderlind opened this issue Apr 3, 2013 · 3 comments
Closed

Comments

@soderlind
Copy link

No description provided.

@soderlind
Copy link
Author

As a temp fix I added

    $this->settings = array(
        'dir' =>  str_replace($_SERVER['DOCUMENT_ROOT'], "" , dirname(__FILE__) . '/'),
        'version' => '2.0.0'
    );

@soderlind
Copy link
Author

I ended up (at lease for now) with:

    $this->settings = array(
        'path'      => plugin_dir_path( __FILE__)
        , 'dir'     => plugin_dir_url( __FILE__)
        , 'version' => '2.0.0.beta'
    );

This will only work if your add-on is a plugin.

@elliotcondon
Copy link
Collaborator

Thanks guys, I've added in the $settings variable and populated it with some functions taken from ACF v4

Bkrap pushed a commit to Bkrap/acf-field-type-template that referenced this issue May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants