The Entry Editor Links plugin helps generate links to the Craft CMS entry editor for a given entry. This functionality is easy to create in Twig templates, but if you have a statically cached page, like with FastCGI Cache, you could run into instances where the edit entry link is shown to a user who doesn't have permission to edit the entry.
Exposing only an entry ID helps prevent leaking information about your site's structure to users who don't have permission to edit entries.
The plugin does two things:
- It provides an endpoint that expects an entry ID and returns a JSON object with the entry's edit URL.
- It also provides a Twig function,
isFrontEndPageView(), to determine if a page is being rendered on the site's front end. This is to prevent the edit links from being displayed when a user has the preview pane open while editing an entry in the control panel or if the entry is rendered on the site's front end using a preview token.