Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Klaas Dons

Trigger save_post acf hook after inline edit

Hello all,

Is there a hook available I can use to trigger a save post action after a value has been updated using the inline edit feature in Admin Columns?

I could not find anything in the plugin code yet

Looking forward to your reply

1 month, 4 weeks ago
Stefan van den Dungen Gronovius
Developer

Hello,

Absolutely, there is a hook that fires after the value is saved with our inline edit feature.
https://github.com/codepress/admin-columns-hooks/blob/master/acp-editing-saved.php#L45

One note, this or next month, our 7.0 version will be released where this hook is changed.
There is already a new example ready in a separate branch that shows how to do this in version 7.

https://github.com/codepress/admin-columns-hooks/blob/refactor/ac-editing-saved.php

1 month, 3 weeks ago
Klaas Dons

Hello Stefan,

Thank you for your reply!
I assume “$table_screen->get_post_type()” returns the current post type?
So if I have custom post type “projects”, I should say “->equals(‘projects’)”

Also, do you know if the 7.0 version will be released this year still?
If not, I will use the old hook instead.

1 month, 1 week ago
Stefan van den Dungen Gronovius
Developer

Hi Klaas,

Yes, correct $table_screen->get_post_type() returns the post type of the page that you’re visiting.
But the method is only on specific table screens, so you’ll need to check for it like in the example.

$table_screen instanceof AC\PostType &&
$table_screen->get_post_type()->equals('post')

The 7 release is planned for the beginning of next year (January).

1 month, 1 week ago

You must be logged in to reply to this topic.