How do I get the post ID when renaming?

Forums File Renaming on Upload – WordPress Plugin How do I get the post ID when renaming?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #101754
    Pablo
    Moderator
    Plugin Support

    Hi,

    Sorry for the delay.

    You could try to use the function \FROU\WordPress\Post::get_parent_post_id() from the plugin. Example:

    $filename_infs['structure']['translation']['my_custom_rule'] = \FROU\WordPress\Post::get_parent_post_id();
    

    However, it’s not always guaranteed it’s going to work, because it depends on the context.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.