-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if post is tailored #43
Comments
Tailor comprises two parts: the "sidebar" and "canvas" (or preview window), presented in an iframe. The I'm happy to add a check like the one that you proposed, but would like to understand more about the potential use cases for such a check. Do you have an example of when/how you'd use it? Cheers, |
I use it to display information on front-end for logged-in user that got permissions to edit posts. Also, the edit post link in front-end is replaced by a tailor link when the post has been tailored, useful to prevent client mistake about #41. |
Agreed, I like that idea. The simple function below returns true if a given post has a Tailor layout.
I have this as a method in the Tailor class, so to access it will be identical to your original example:
How does that look? |
That's look perfect! You're awesome :) |
There is a function
Tailor()->is_canvas()
to see if we are on the Tailor canvas (currently editing the page).There is another function called
Tailor()->is_tailoring()
but this is not to check if current post was edited with Tailor. I don't understand the purpose of this public function...It will be nice if we could check in the WP loop if the post was tailored, with a public function like
Tailor->is_tailored()
. Actually I do that with:The text was updated successfully, but these errors were encountered: