src/AcfExportManager.php
public function maybeCreateExportFolders()
    {
        if (!is_writable($this->exportFolder)) {
            trigger_error('The export folder (' . $this->exportFolder .') is not writable. Exports will not be saved.', E_USER_ERROR);
        }

        if (!file_exists($this->exportFolder . 'json')) {
            mkdir($this->exportFolder . 'json');
            chmod($this->exportFolder . 'json', 0777);
        }

        if (!file_exists($this->exportFolder . 'php')) {
            mkdir($this->exportFolder . 'php');
            chmod($this->exportFolder . 'php', 0777);
        }
    }
public function maybeCreateExportFolders()
    {
        if (!is_writable($this->exportFolder)) {
            trigger_error('The export folder (' . $this->exportFolder .') is not writable. Exports will not be saved.', E_USER_ERROR);
        }

        if (!file_exists($this->exportFolder . 'json')) {
            mkdir($this->exportFolder . 'json');
            chmod($this->exportFolder . 'json', 0777);
        }

        if (!file_exists($this->exportFolder . 'php')) {
            mkdir($this->exportFolder . 'php');
            chmod($this->exportFolder . 'php', 0777);
        }
    }
public function maybeCreateExportFolders ( ) { if ( ! is_writable ( $ this -> exportFolder ) ) { trigger_error ( 'The export folder (' . $ this -> exportFolder . ') is not writable. Exports will not be saved.' , E_USER_ERROR ) ; } if ( ! file_exists ( $ this -> exportFolder . 'json' ) ) { mkdir ( $ this -> exportFolder . 'json' ) ; chmod ( $ this -> exportFolder . 'json' , 0777 ) ; } if ( ! file_exists ( $ this -> exportFolder . 'php' ) ) { mkdir ( $ this -> exportFolder . 'php' ) ; chmod ( $ this -> exportFolder . 'php' , 0777 ) ; } }
Creates export folders if needed
@return void
Creates export folders if needed