we modify the code responsible for displaying post-items during the review to display the small “Review” button on the right.
This is exactly what I imagined. Each plugin would have a function “insert my code” with two parameters: first would be the name of the place (in this case e.g. “article widgets”), second would be an object describing the context (in this case it could provide the article name, date, ID, URL). When a page wants to show an article, it calls this function for all registered plugins, in order they were registered. (There is one source file with hardcoded list of registered plugins.) Each plugin returns a HTML code, or empty value, and the page inserts the returned values.
What places exist? The ones we currently use. What values are provided in the context? The ones we currently use. Later, expand as necessary.
The other cases you mentioned sound more complicated...
This is exactly what I imagined. Each plugin would have a function “insert my code” with two parameters: first would be the name of the place (in this case e.g. “article widgets”), second would be an object describing the context (in this case it could provide the article name, date, ID, URL). When a page wants to show an article, it calls this function for all registered plugins, in order they were registered. (There is one source file with hardcoded list of registered plugins.) Each plugin returns a HTML code, or empty value, and the page inserts the returned values.
What places exist? The ones we currently use. What values are provided in the context? The ones we currently use. Later, expand as necessary.
The other cases you mentioned sound more complicated...