Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the community forum?
All Topics
James

PHP export feature remove?

It seems like exporting to JSON is now the only option and exporting PHP is no longer possible?
It’s odd because besides renaming of the import/export tab to “Tools” – I don’t see anything in the change log that mentioned this important feature being removed.

Anyone else notice this?

1 week, 1 day ago
Stefan
Developer

You’re correct, the export to PHP feature was removed since Admin Columns 5.1. We replaced it by a much better (in our opinion) solution to manage column settings in PHP -> Local Storage. More information about that release can be found here:

Admin Columns Pro release 5.1

Of course, all exported PHP code will still work when implemented in your theme or plugin, but we recommend migrating those settings to the new Local Storage feature.

More information about how to setup Local Storage, can be found here:

How to setup Local Storage

1 week ago
James

Hi Stefan –

I added the following code and the directory gets created, but nothing seems to get “migrated.” Is there anything else I need to do to make that part work?

Hi Stefan –

Follow up question for you… I added this code, and the folder gets created, but the folder is empty so far. Is there anything else I need to do to make the migration happen?

add_filter( ‘acp/storage/file/directory’, function() {
// Use a writable path, directory will be created for you
return wp_get_upload_dir()[‘basedir’].’/acp’;
} );
add_filter( ‘acp/storage/file/directory/migrate’, ‘__return_true’ );

Thanks

1 week ago
Stefan
Developer

Hi James,

The migrate option only migrates settings in the Database to Local Storage.
For you the best option might be as follows:

1) Implement Local Storage according to the documentation and do nothing with the migrate hook
2) No for each setting that you want to migrate, click on it to activate it in our settings menu
3) Now click on the ‘create set’ on the right to clone the settings into a new one. If Local Storage is setup correctly, the new settings will be clones into the new PHP file.

1 week ago
James

The site I am setting this up on first does store its configuration in the database. This is the site I would typically then export the PHP from to include in all the other sites that use it.

I activated local storage, and then as a re-saved each configuration it did create a PHP file in the destination folder.

So for each site that I want to load those configurations, I would copy that directory and activate local storage on those sites with writable set to false?

1 week ago
Stefan
Developer

Yes, that’s indeed the idea.

1 week ago

You must be logged in to reply to this topic.