For various reasons, this is important, but I am unsure if their are better ways OR other ramifications:
CMS = WordPress as a CMS.
WebSite = Static site generator.
Currently when a post publishes on CMS I used API to send the info to WebSite which generates the page. All works.
However, I don’t want the CMS to ALSO publish post.
I current handle this by redirecting all traffic to CMS to /wp-admin/ page.
This seems not ideal.
I would rather decouple publish button from actually publishing post.
Is this the best way?:
function change_publish( $post_ID )
{
// Do something here //
}
add_action( 'publish_post', 'change_publish' );
I.e. to override the publish function?