diff --git a/Lib/Appsero/Client.php b/Lib/Appsero/Client.php index 08b7f654d..1e5b40abe 100644 --- a/Lib/Appsero/Client.php +++ b/Lib/Appsero/Client.php @@ -2,6 +2,8 @@ namespace WeDevs\Wpuf\Lib\Appsero; +use WP_Error; + /** * Appsero Client * @@ -110,13 +112,9 @@ public function __construct( $hash, $name, $file ) { /** * Initialize insights class * - * @return Appsero\Insights + * @return object */ public function insights() { - if ( ! class_exists( __NAMESPACE__ . '\Insights' ) ) { - require_once __DIR__ . '/Insights.php'; - } - // if already instantiated, return the cached one if ( $this->insights ) { return $this->insights; @@ -130,13 +128,9 @@ public function insights() { /** * Initialize license checker * - * @return Appsero\License + * @return object */ public function license() { - if ( ! class_exists( __NAMESPACE__ . '\License' ) ) { - require_once __DIR__ . '/License.php'; - } - // if already instantiated, return the cached one if ( $this->license ) { return $this->license; diff --git a/Lib/WeDevs_Insights.php b/Lib/WeDevs_Insights.php index 702fc4bb8..4a732a00d 100644 --- a/Lib/WeDevs_Insights.php +++ b/Lib/WeDevs_Insights.php @@ -2,7 +2,7 @@ namespace WeDevs\Wpuf\Lib; -if ( ! class_exists( 'WPUF_WeDevs_Insights' ) ) : +if ( ! class_exists( 'WeDevs_Insights' ) ) : /** * weDevs Tracker @@ -17,7 +17,7 @@ */ class WeDevs_Insights { /** - * @var object|Appsero\Insights|Insights + * @var object|Appsero\Insights */ public $insights; @@ -25,18 +25,10 @@ class WeDevs_Insights { * Initialize the class */ public function __construct( $file ) { - if ( ! class_exists( 'Appsero\Client' ) ) { - require_once WPUF_ROOT . '/Lib/Appsero/Client.php'; - } - $client = new Appsero\Client( '958afc63-99f8-4b98-b321-fcbc5cf95694', 'WP User Frontend', $file ); $this->insights = $client->insights(); $this->insights->client = $client; $this->insights->init(); - -// $client = new Appsero\Client( '958afc63-99f8-4b98-b321-fcbc5cf95694', 'WP User Frontend', $file ); -// $this->insights = $client->insights(); -// $this->insights->init(); } } diff --git a/Lib/WeDevs_Settings_API.php b/Lib/WeDevs_Settings_API.php index a74843450..7a5cd9ad5 100644 --- a/Lib/WeDevs_Settings_API.php +++ b/Lib/WeDevs_Settings_API.php @@ -538,7 +538,7 @@ function get_option( $option, $section, $default = '' ) { function show_navigation() { $html = '
+ + + +
Setting up WP User Frontend is very easy. Here are few things that you should consider.
Posting Forms are used to create new blog posts, WooCommerce Products, Directory Listing Entries etc. You can create any custom post type from the front using this feature. You just need to create a form with necessary fields and embed the form in a page and your users will be able to create posts from frontend in no time.
To create a posting form, go to Post Forms → Add Form and start building your ultimate frontend posting forms.
After building your forms, use the shortcodes on any new page or post and publish them before sharing.
', + '', + '', + '
WP User Frontend generates Frontend Dashboard and My Account page for all your users. Using these pages, they can get a list of their posts and subscriptions directly at frontend. They can also customize the details of their profile. You don’t need to give them access to the backend at all!
To crate this page, create a new page, put a title and simply copy-paste the following shortcode: [wpuf_dashboard]. Alternatively, there is an unified my account page as well. Finally, hit the publish button and you are done.
[wpuf_dashboard]
', + '', + '', + '', + '', + '', + '', + '
', + '
You can create as many registration forms as you want and assign them to different user roles. Creating Registration forms are easy. Navigate to Registration Forms.
You can create new forms just you would create posts in WordPress.
From settings you can –
WP User Frontend Automatically creates important pages when you install it for the first time. You can also create login forms manually.
Navigate to Settings → Login/Registration tab. - In this page, you will find several useful settings related to WPUF login. You can override default registration and login forms with WPUF login & registration feature if you want. To do this, check the Login/Registration override option.
You can also specify the login page. WPUF automatically adds the default login page that it has created. If you manually create one, use the following shortcode – [wpuf-login]
[wpuf-login]
Simply, create a new page and put the above shortcode. Finally, publish the page and add it to the Login Page option in the settings.
When you are making a registration form, you get two shortcodes: - For embedding the registration form: this is something like [wpuf_profile type="registration" id="3573"]
[wpuf_profile type="registration" id="3573"]
For profile edit page: this is something like [wpuf_profile type="profile" id="3573"]
[wpuf_profile type="profile" id="3573"]
You already know that how to make a registration form in WP User Frontend Pro and embed that into a page. The very same process is for creating the profile edit page.
We assume that you already have created a registration form. If not you can use the default registration form, that was created automatically while installing the plugin. - So to get the shortcode, navigate to User Frontend → Registration Forms and you will be able to see the shortcodes on the right side of your screen.
+ ', + '' + ); + ?> +
+ +
+ ', + '', + '', + '' + ); + ?> +
WP User Frontend allows you to create as many subscription packs you want. Simply, navigate to - WP-Admin → User Frontend → Subscription → Add Subscription
To view the created subscription packs on frontend, visit the Subscription page.
Short-code for creating the Subscription page – [wpuf_sub_pack].
[wpuf_sub_pack]
Post subscription and payment system is a module where you can add paid posting system with WP User Frontend. You can introduce two types of payment system. Pay per post and subscription pack based.
With this you can introduce pay per post feature where users pay to publish their posts each post. When pay per post is enabled from “Settings → Payments → Charge for posting“, users see a notice right before the post creation form in frontend about payment. When the submits a post, the post status gets pending and he is redirected to the payment page (to setup the payment page, create a Page Payment and select the page at “Settings → Payments → Payment Page“. No shortcode is needed). Currently by default PayPal is only supported gateway. Upon selecting PayPal, he is redirected to PayPal for payment. After successful payment he is redirected back to the site and the post gets published.
There is an another option for charged posting. With this feature, you can create unlimited subscription pack. In each pack, you can configure the number of posts, validity date and the cost.
When a user buys a subscription package, he gets to create some posts (e.g. 10) in X days (e.g: 30 days). If he crosses the number of posts or the validity date, he can’t post again. You can force the user to buy a pack before posting “Settings → Payments → Force pack purchase“.
To show the subscription packs in a page, you can use the shortcode: [wpuf_sub_pack]. To show the user subscription info: [wpuf_sub_info]. The info will show the user about his pack’s remaining post count and expiration date of his pack.
[wpuf_sub_info]
Currently only PayPal basic gateway is supported. The plugin is extension aware, that means other gateways can be integrated.
To set content restriction for a certain form, navigate to Pages