Support

Search results for ""

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

Disable column in export CSV

Hi.
Thanks for your wonderfull plugin.
I would like to remove a column in the csv export. Is any method/filter to achieve that ?

Thanks for your response.

1 year ago
Stefan
Developer

Hi,

If you make the value empty for every record with the following filter, there should be no column in the exported file.

acp/export/value

1 year ago
mikashv

Hi, thank you for your response.
The method you give me empty the columns values but do not remove the column from the csv export.
Can you give me an exemple ?

Thks !

1 year ago
Stefan
Developer

Sorry for the late response. I did have another look and it turns out that my assumptions and idea does not work at all. It was more a convenient behavior of my speadsheet app that removed the column for display. Unfortunately, there is currently not a way to disable a column for export, but it seems like a valid request.

Therefore, we will introduce a new filter to deactivate a specific column. The snippet for deactivating a column will look something like this:

/**
 * @param bool $disabled
 * @param AC\Column $column
 *
 * @return bool
 */
function acp_disable_acf_text_column( $disabled, AC\Column $column ) {

	if ( $column instanceof ACA\ACF\Column ) {
		if ( $column->get_meta_key() === 'acf_text' ) {
			return true;
		}
	}

	return $disabled;
}

If you want to try the new version out, send me an email on support@admincolumns.com so I can send you the build with the change. Otherwise, it will be available in the next release.

11 months, 3 weeks ago
mikashv

Hi Stephan
Great ! Thanks for the new hook, i would be helful !

11 months, 3 weeks ago
mikashv

Hi
Do you know when the next release will be publish ?

11 months, 2 weeks ago
Stefan
Developer

We do have a release cycle of two weeks (in the most ideal situation).
The fix is already in place so I can send you a link for a build with the fix.
I will send it to you by email right away.

11 months, 2 weeks ago

You must be logged in to reply to this topic.