Correct method to determine if using Frontend editor.
-
What is the correct method to determine, via PHP, if the user is using the Frontend Editor?
I came up with this:
if ( function_exists( 'vchelper' ) ) { $sourceId = intval( vchelper( 'Request' )->input( 'vcv-source-id' ) ); if ( $sourceId === get_the_ID() ) { $apply = false; } }
This does seem to work, but I am wondering if there is a supported API for devs to use.
Thanks!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Correct method to determine if using Frontend editor.’ is closed to new replies.