-
Notifications
You must be signed in to change notification settings - Fork 13
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
Ensure the "Let's get started" link appears #23
Conversation
Before, edit_post_link() didn't echo anything because in get_edit_post_link(), current_user_can( 'edit_post', ->ID ) was false. But this only seemed to happen the very first time the plugin was activated in WP.
Hi @lukecarbis, Thanks, Luke! |
Ah, I just remembered that GCB Pro doesn't have onboarding. It's on an activation hook in the free plugin, and that of course never gets activated when it's included with Composer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks and works great! Thanks. 👍
Also, you should update WordPress to 5.5. ;) |
Thanks! I'll work on getting onboarding working in the Pro plugin. |
Haha, yeah 😄 |
Great pickup (on the GCB Pro onboarding). |
@kienstra One option is to just duplicate this snippet in the free plugin but change the activation hook genesis-custom-blocks/php/Plugin.php Lines 62 to 68 in 9c846f0
I'm pretty confident keeping that in the free version would be allowed. |
Good idea, that should be all that's needed. |
The same issue that caused the submenus to not display also caused the link to not display. Now that the capability is added earlier, this works.
Changes
Background
Before,
edit_post_link()
didn't echo anything because in get_edit_post_link(),current_user_can( 'edit_post', $post->ID )
wasfalse
.I don't know why it was
false
.Testing instructions
In my local, the only way I could reproduce it was creating a new WP instance, and this issue only appeared the first time I activated GCB.
Fixes getblocklab/block-lab#509