Add redirect page after login/register
This commit is contained in:
parent
917e18e89f
commit
1c49a5b1d3
@ -84,6 +84,26 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
||||
'type' => 'select',
|
||||
'options' => $pages,
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Login and Redirect to Dashboard page', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Redirect to User Management Dashboard page after login.', 'opalestate-pro' ),
|
||||
'id' => 'enable_login_redirect_to_dashboard',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Register and Redirect to Dashboard page', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Redirect to User Management Dashboard page after register.', 'opalestate-pro' ),
|
||||
'id' => 'enable_register_redirect_to_dashboard',
|
||||
'type' => 'switch',
|
||||
'options' => [
|
||||
'on' => esc_html__( 'Enable', 'opalestate-pro' ),
|
||||
'off' => esc_html__( 'Disable', 'opalestate-pro' ),
|
||||
],
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Enable Message Database', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Allow User send message Contact/Equire via email and saved into database to exchange theirs message direct in User Message Management',
|
||||
@ -99,7 +119,7 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
||||
|
||||
[
|
||||
'name' => esc_html__( 'Maximum Upload Image Size', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximun volumn size having < x MB', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximum volumn size having < x MB', 'opalestate-pro' ),
|
||||
|
||||
'id' => 'upload_image_max_size',
|
||||
'type' => 'text',
|
||||
@ -107,7 +127,7 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Maximum Upload Image Files', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximun volumn size having < x MB', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximum volumn size having < x MB', 'opalestate-pro' ),
|
||||
|
||||
'id' => 'upload_image_max_files',
|
||||
'type' => 'text',
|
||||
@ -115,7 +135,7 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Maximum Upload Other Size', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximun volumn size having < x MB for upload docx, pdf...', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximum volumn size having < x MB for upload docx, pdf...', 'opalestate-pro' ),
|
||||
|
||||
'id' => 'upload_other_max_size',
|
||||
'type' => 'text',
|
||||
@ -123,7 +143,7 @@ class Opalestate_Settings_General_Tab extends Opalestate_Settings_Base_Tab {
|
||||
],
|
||||
[
|
||||
'name' => esc_html__( 'Maximum Upload Other Files', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximun volumn size having < x MB for upload docx, pdf...', 'opalestate-pro' ),
|
||||
'desc' => esc_html__( 'Set maximum volumn size having < x MB for upload docx, pdf...', 'opalestate-pro' ),
|
||||
|
||||
'id' => 'upload_other_max_files',
|
||||
'type' => 'text',
|
||||
|
@ -18,6 +18,8 @@ class Opalestate_User_Form_Handler {
|
||||
|
||||
add_action( 'wp_ajax_opalestate_login_form', [ $this, 'process_login' ] );
|
||||
add_action( 'wp_ajax_opalestate_register_form', [ $this, 'process_register' ] );
|
||||
add_filter( 'opalestate_signon_redirect_url', [ $this, 'login_redirect_url' ] );
|
||||
add_filter( 'opalestate_register_redirect_url', [ $this, 'register_redirect_url' ] );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -322,6 +324,22 @@ class Opalestate_User_Form_Handler {
|
||||
}
|
||||
die();
|
||||
}
|
||||
|
||||
public function login_redirect_url( $redirect ) {
|
||||
if ( 'on' === opalestate_get_option( 'enable_login_redirect_to_dashboard', 'off' ) ) {
|
||||
$redirect = opalestate_get_user_management_page_uri();
|
||||
}
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
|
||||
public function register_redirect_url( $redirect ) {
|
||||
if ( 'on' === opalestate_get_option( 'enable_register_redirect_to_dashboard', 'off' ) ) {
|
||||
$redirect = opalestate_get_user_management_page_uri();
|
||||
}
|
||||
|
||||
return $redirect;
|
||||
}
|
||||
}
|
||||
|
||||
new Opalestate_User_Form_Handler();
|
||||
|
@ -5943,7 +5943,7 @@ msgid "Maximum Upload Image Size"
|
||||
msgstr ""
|
||||
|
||||
#: inc/admin/settings/general.php:102 inc/admin/settings/general.php:110
|
||||
msgid "Set maximun volumn size having < x MB"
|
||||
msgid "Set maximum volumn size having < x MB"
|
||||
msgstr ""
|
||||
|
||||
#: inc/admin/settings/general.php:109
|
||||
@ -5955,7 +5955,7 @@ msgid "Maximum Upload Other Size"
|
||||
msgstr ""
|
||||
|
||||
#: inc/admin/settings/general.php:118 inc/admin/settings/general.php:126
|
||||
msgid "Set maximun volumn size having < x MB for upload docx, pdf..."
|
||||
msgid "Set maximum volumn size having < x MB for upload docx, pdf..."
|
||||
msgstr ""
|
||||
|
||||
#: inc/admin/settings/general.php:125
|
||||
|
@ -3,11 +3,11 @@
|
||||
* Plugin Name: Opal Estate Pro
|
||||
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/
|
||||
* Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
|
||||
* Version: 1.2.6
|
||||
* Version: 1.2.7
|
||||
* Author: WPOPAL
|
||||
* Author URI: http://www.wpopal.com
|
||||
* Requires at least: 4.6
|
||||
* Tested up to: 5.3
|
||||
* Requires at least: 4.9
|
||||
* Tested up to: 5.3.2
|
||||
* Text Domain: opalestate-pro
|
||||
* Domain Path: languages/
|
||||
*
|
||||
@ -151,7 +151,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
||||
*/
|
||||
public function __clone() {
|
||||
// Cloning instances of the class is forbidden
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.2.6' );
|
||||
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin’ huh?', 'opalestate-pro' ), '1.2.7' );
|
||||
}
|
||||
|
||||
/**
|
||||
@ -160,7 +160,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
|
||||
public function setup_constants() {
|
||||
// Plugin version
|
||||
if ( ! defined( 'OPALESTATE_VERSION' ) ) {
|
||||
define( 'OPALESTATE_VERSION', '1.2.6' );
|
||||
define( 'OPALESTATE_VERSION', '1.2.7' );
|
||||
}
|
||||
|
||||
// Plugin Folder Path
|
||||
|
@ -2,9 +2,9 @@
|
||||
Contributors: wpopal
|
||||
Donate link: https://wpdocs.gitbook.io/opal-estate/
|
||||
Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
|
||||
Requires at least: 4.6
|
||||
Tested up to: 5.3
|
||||
Stable tag: 1.2.6
|
||||
Requires at least: 4.9
|
||||
Tested up to: 5.3.2
|
||||
Stable tag: 1.2.7
|
||||
License: GPLv3
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
@ -156,6 +156,9 @@ This section describes how to install the plugin and get it working.
|
||||
* System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
|
||||
|
||||
== Changelog ==
|
||||
= 1.2.7 - 2020-01-02 =
|
||||
* Added - Redirect to User Dashboard page after login/register setting.
|
||||
|
||||
= 1.2.6 - 2019-12-30 =
|
||||
* Fixes - Compatible WordPress version.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user