All Topics
Editing local storage
Hi,
I’m trying to use the local storage feature but I cant find a way to edit the settings once they’re loaded from local storage.
In my developemnt env I migrated the settings from the db to the local storage. I can see the settings have been migrated because if I disable the local storage filter, the default column settings apply, with no customization.
Now I want to modify the columns using the UI, and save the settings to the existing local storage files. The settings load fine from the local storage but I can’t edit them (the cog button doesn’t appear anymore).
add_filter(
'acp/storage/repositories',
function ( array $repositories, ListScreenRepositoryFactory $factory ) use ( $acp_base_path, $is_dev_env ) {
$post_types = [ 'post', 'evenement', 'lieu', 'artiste', 'organisateur', 'numero', 'wp-media' ];
foreach ( $post_types as $pt ) {
$rules = new Rules();
$rules->add_rule( new Rule\EqualType( $pt ) );
$repositories[ $pt ] = $factory->create(
$acp_base_path . "/acp-columns/${pt}",
// is the folder writable ?
true,
$rules
);
}
return $repositories;
},
10,
2
);
You must be logged in to reply to this topic.