Merge pull request #31 from wpopal/develop

Develop
This commit is contained in:
wpopal 2020-01-13 10:15:47 +07:00 committed by GitHub
commit f7ef9cd320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 19 deletions

View File

@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
class Opalestate_User_MetaBox { class Opalestate_User_MetaBox {
public function get_front_base_field( $prefix ) { public function get_front_base_field( $prefix ) {
$management = [ $fields = [
[ [
'name' => esc_html__( 'Avatar Picture', 'opalestate-pro' ), 'name' => esc_html__( 'Avatar Picture', 'opalestate-pro' ),
'desc' => esc_html__( 'This image will display in user detail and profile box information', 'opalestate-pro' ), 'desc' => esc_html__( 'This image will display in user detail and profile box information', 'opalestate-pro' ),
@ -27,7 +27,6 @@ class Opalestate_User_MetaBox {
'single' => 1, 'single' => 1,
'limit' => 1, 'limit' => 1,
], ],
[ [
'name' => esc_html__( 'Avatar Picture', 'opalestate-pro' ), 'name' => esc_html__( 'Avatar Picture', 'opalestate-pro' ),
'desc' => esc_html__( 'This image will display in user detail and profile box information', 'opalestate-pro' ), 'desc' => esc_html__( 'This image will display in user detail and profile box information', 'opalestate-pro' ),
@ -37,7 +36,6 @@ class Opalestate_User_MetaBox {
'limit' => 1, 'limit' => 1,
], ],
[ [
'id' => 'first_name', 'id' => 'first_name',
'name' => esc_html__( 'First Name', 'opalestate-pro' ), 'name' => esc_html__( 'First Name', 'opalestate-pro' ),
@ -63,8 +61,7 @@ class Opalestate_User_MetaBox {
], ],
]; ];
return apply_filters( 'opalestate_get_user_meta_front_base_field', $fields, $prefix );
return $management;
} }
public function get_avatar_fields( $prefix ) { public function get_avatar_fields( $prefix ) {
@ -107,9 +104,9 @@ class Opalestate_User_MetaBox {
'after_row' => '</div>', 'after_row' => '</div>',
], ],
[ [
'name' => esc_html__( 'Address', 'opalestate-pro' ), 'name' => esc_html__( 'Address', 'opalestate-pro' ),
'id' => "{$prefix}address", 'id' => "{$prefix}address",
'type' => 'text', 'type' => 'text',
], ],
[ [
'id' => "{$prefix}map", 'id' => "{$prefix}map",
@ -118,7 +115,7 @@ class Opalestate_User_MetaBox {
'sanitization_cb' => 'opal_map_sanitise', 'sanitization_cb' => 'opal_map_sanitise',
'split_values' => true, 'split_values' => true,
], ],
] ); ], $prefix );
} }
public function get_job_fields( $prefix ) { public function get_job_fields( $prefix ) {
@ -175,7 +172,7 @@ class Opalestate_User_MetaBox {
} }
public function get_base_fields( $prefix ) { public function get_base_fields( $prefix ) {
return [ return apply_filters( 'opalestate_get_user_meta_base_fields', [
[ [
'id' => "{$prefix}featured", 'id' => "{$prefix}featured",
'name' => esc_html__( 'Is Featured', 'opalestate-pro' ), 'name' => esc_html__( 'Is Featured', 'opalestate-pro' ),
@ -232,11 +229,11 @@ class Opalestate_User_MetaBox {
'type' => 'text', 'type' => 'text',
'after_row' => '</div>', 'after_row' => '</div>',
], ],
]; ], $prefix );
} }
public function get_social_fields( $prefix ) { public function get_social_fields( $prefix ) {
return [ return apply_filters( 'opalestate_get_user_meta_social_fields', [
[ [
'name' => esc_html__( 'Twitter', 'opalestate-pro' ), 'name' => esc_html__( 'Twitter', 'opalestate-pro' ),
'id' => "{$prefix}twitter", 'id' => "{$prefix}twitter",
@ -273,6 +270,6 @@ class Opalestate_User_MetaBox {
'type' => 'text_url', 'type' => 'text_url',
'after_row' => '</div>', 'after_row' => '</div>',
], ],
]; ], $prefix );
} }
} }

View File

@ -297,11 +297,10 @@ class OpalEstate_User {
global $current_user; global $current_user;
// Verify Nonce // Verify Nonce
$user_id = get_current_user_id(); $user_id = get_current_user_id();
$check = $this->is_blocked();
$key = 'nonce_CMB2phpopalestate_user_front'; $key = 'nonce_CMB2phpopalestate_user_front';
if ( ! isset( $_POST[ $key ] ) || empty( $_POST[ $key ] ) || ! is_user_logged_in() || $check ) { if ( ! isset( $_POST[ $key ] ) || empty( $_POST[ $key ] ) || ! is_user_logged_in() ) {
return; return;
} }

View File

@ -3,7 +3,7 @@
* Plugin Name: Opal Estate Pro * Plugin Name: Opal Estate Pro
* Plugin URI: https://wpdocs.gitbook.io/opal-estate/ * 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. * Description: Opal Real Estate Plugin is an ideal solution and brilliant choice for you to set up a professional estate website.
* Version: 1.2.9 * Version: 1.2.9.1
* Author: WPOPAL * Author: WPOPAL
* Author URI: http://www.wpopal.com * Author URI: http://www.wpopal.com
* Requires at least: 4.9 * Requires at least: 4.9
@ -151,7 +151,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
*/ */
public function __clone() { public function __clone() {
// Cloning instances of the class is forbidden // Cloning instances of the class is forbidden
_doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'opalestate-pro' ), '1.2.9' ); _doing_it_wrong( __FUNCTION__, esc_html__( 'Cheatin&#8217; huh?', 'opalestate-pro' ), '1.2.9.1' );
} }
/** /**
@ -160,7 +160,7 @@ if ( ! class_exists( 'OpalEstate' ) ) {
public function setup_constants() { public function setup_constants() {
// Plugin version // Plugin version
if ( ! defined( 'OPALESTATE_VERSION' ) ) { if ( ! defined( 'OPALESTATE_VERSION' ) ) {
define( 'OPALESTATE_VERSION', '1.2.9' ); define( 'OPALESTATE_VERSION', '1.2.9.1' );
} }
// Plugin Folder Path // Plugin Folder Path

View File

@ -4,7 +4,7 @@ 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 Tags: estate, property, opalestate, house for rent, agency for lease, estate submission, agents estate property, property marketplace
Requires at least: 4.9 Requires at least: 4.9
Tested up to: 5.3.2 Tested up to: 5.3.2
Stable tag: 1.2.9 Stable tag: 1.2.9.1
License: GPLv3 License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html 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") * System tickets support 24/7 available : [free support](https://wpopal.ticksy.com/ "Visit the Plugin support Page")
== Changelog == == Changelog ==
= 1.2.9.1 - 2020-01-13 =
* Added - Pages settings.
= 1.2.9 - 2020-01-09 = = 1.2.9 - 2020-01-09 =
* Added - Pages settings. * Added - Pages settings.