unlock-protocol / unlock-wordpress-plugin

A plugin for Wordpress to add locked sections to both your posts and pages!
https://wordpress.org/plugins/unlock-protocol/
GNU General Public License v3.0
16 stars 16 forks source link

Wordpress Shortcodes #45

Open GoodbyeMatrix-Github opened 2 years ago

GoodbyeMatrix-Github commented 2 years ago

Dear Team,

It would be great if you can implement shortcodes in WordPress, so we can add locks using other WP-Editors than Gutenberg, because it is very limiting!

I found that some people use the Gutenberg Reusable Block to get a shortcode to be use in other editors. I have installed the Reusable Block Version 1.0.2. and it is not generating/showing any plugin. Here is what I found: https://gutenberghub.com/how-to-display-gutenberg-blocks-in-other-page-builders/

Thank you in advance!

julien51 commented 1 year ago

@SolomonFoskaay Are you interested in this one?

If so please go ahead. Lets introduce a new shortcode which takes one single argument: a valid paywall config object.

SolomonFoskaay commented 1 year ago

@julien51 Okay noted and what bounty price is attached to this, please?

julien51 commented 1 year ago

Lets make it $300 as well

SolomonFoskaay commented 1 year ago

@julien51 already working on this issue. Here is a sneak peek for you to check and confirm if this is the expected Wordpress shortcode feature.

For the existing Block lock feature (working on the full post/page feature once approved) extended to work with non-Gutenberge editors. For now, have tested it on "Classic Editor" and "Elementor". See below:

Elementor:

Editor: Selection_076

UI: Selection_077

Classic Editor:

Editor: Selection_078

UI: Selection_079

SolomonFoskaay commented 1 year ago

@julien51 I now have the wordpress shortcode for the full post/page lock feature too. Kindly see post samples below:

Elementor

Editor: Selection_082

UI (the full post page Unlock button not well aligned because of how Elementor renders the page when the actual page content is hidden to effect styling - you will notice its well aligned in the Classic editor UI below- this is not from my code but from the Elementor itself): Selection_083

Classic Editor

Editor: Selection_080

UI (Unlock button well aligned in the classic editor UI without any additional styling added to it): Selection_081

SolomonFoskaay commented 1 year ago

@julien51 I will refactor my current implementation for this feature following your refactored code pattern for merged issue #4 and send you PR before the week runs out.

Thanks!