Skip to content

Commit

Permalink
Release 1.3.5 (#137)
Browse files Browse the repository at this point in the history
* fix issues #134 and #128
* Fixed plugin delete issue.
* fixed feedback popup issue #135
* Tested with WordPress version 6.5.4.

---------

Co-authored-by: DESKTOP-B2PPRAV\User <tayyab@glowlogix.com>
  • Loading branch information
umar-glowlogix and Glowtayyab committed May 20, 2024
1 parent d8eb353 commit ad0ce28
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 28 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file, per [the Ke

## [Unreleased]

## [1.3.5] - 2024-05-20
- Tested with WordPress version 6.5.4 #134
- Fix Password Reset Link #128
- Fix Wordpress Imminent #134
- Fix Feedback Issue #135
- Fix Delete Issue #136

## [1.3.4] - 2024-02-23
- Tested with WordPress version 6.4.4 #132
- Fix nonce bypass issue
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> WP Frontend Profile allows users to edit/view their profile and register/login without going into the dashboard to do so.
[![Release Version](https://img.shields.io/github/release/glowlogix/wp-frontend-profile.svg)](https://github.com/glowlogix/wp-frontend-profile/releases/latest) [![GitHub Issues](https://img.shields.io/github/issues/glowlogix/wp-frontend-profile)](#github-issues) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.4%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/glowlogix/wp-frontend-profile.svg)](https://github.com/glowlogix/wp-frontend-profile/blob/master/LICENSE.md) [![Build Status](https://travis-ci.com/glowlogix/wp-frontend-profile.svg?branch=master)](https://travis-ci.com/glowlogix/wp-frontend-profile)
[![Release Version](https://img.shields.io/github/release/glowlogix/wp-frontend-profile.svg)](https://github.com/glowlogix/wp-frontend-profile/releases/latest) [![GitHub Issues](https://img.shields.io/github/issues/glowlogix/wp-frontend-profile)](#github-issues) ![WordPress tested up to version](https://img.shields.io/badge/WordPress-v6.5%20tested-success.svg) [![GPLv2 License](https://img.shields.io/github/license/glowlogix/wp-frontend-profile.svg)](https://github.com/glowlogix/wp-frontend-profile/blob/master/LICENSE.md) [![Build Status](https://travis-ci.com/glowlogix/wp-frontend-profile.svg?branch=master)](https://travis-ci.com/glowlogix/wp-frontend-profile)

WP Frontend Profile gives you the ability to add a extensible user profile section to the frontend of your WordPress website. By default the plugin adds two tabs to the frontend profile. One of these tabs, titled profile, allows a user to edit their user data including email, first and last names, URL and bio (description). The password tab allows a user to change their password for the site.

Expand Down
63 changes: 46 additions & 17 deletions assets/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,13 @@ jQuery( document ).ready(function() {
jQuery('.wpfep-main-dashboard-review-ask').css('display', 'block');

jQuery('.wpfep-main-dashboard-review-ask').on('click', function(event) {
if (jQuery(event.srcElement).hasClass('notice-dismiss')) {
var data = 'Ask_Review_Date=3&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
if (jQuery(event.target).hasClass('notice-dismiss')) {
var data = {
'Ask_Review_Date': 3,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() { });
}
});

Expand All @@ -43,8 +47,12 @@ jQuery( document ).ready(function() {
jQuery('.wpfep-review-ask-not-really').addClass('wpfep-hidden');
jQuery('.wpfep-review-ask-yes').addClass('wpfep-hidden');

var data = 'Ask_Review_Date=7&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
var data = {
'Ask_Review_Date': 7,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});
});

jQuery('.wpfep-review-ask-not-really').on('click', function() {
Expand All @@ -54,13 +62,21 @@ jQuery( document ).ready(function() {
jQuery('.wpfep-review-ask-feedback-form').removeClass('wpfep-hidden');
jQuery('.wpfep-review-ask-actions').addClass('wpfep-hidden');

var data = 'Ask_Review_Date=1000&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
var data = {
'Ask_Review_Date': 1000,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});
});

jQuery('.wpfep-review-ask-no-thanks').on('click', function() {
var data = 'Ask_Review_Date=1000&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
var data = {
'Ask_Review_Date': 1000,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});

jQuery('.wpfep-main-dashboard-review-ask').css('display', 'none');
});
Expand All @@ -69,8 +85,12 @@ jQuery( document ).ready(function() {
jQuery('.wpfep-review-ask-feedback-text').addClass('wpfep-hidden');
jQuery('.wpfep-review-ask-thank-you-text').removeClass('wpfep-hidden');

var data = 'Ask_Review_Date=1000&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
var data = {
'Ask_Review_Date': 1000,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});
});

jQuery('.wpfep-review-ask-send-feedback').on('click', function() {
Expand All @@ -80,16 +100,25 @@ jQuery( document ).ready(function() {
alert('Feedback is required.');
}
else{
var data = 'Feedback=' + Feedback + '&EmailAddress=' + EmailAddress + '&action=wpfep_send_feedback';
jQuery.post(ajaxurl, data, function() {});

var data = 'Ask_Review_Date=1000&action=wpfep_hide_review_ask';
jQuery.post(ajaxurl, data, function() {});
var data = {
'Feedback': Feedback,
'EmailAddress': EmailAddress,
'action': 'wpfep_send_feedback',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});

var data = {
'Ask_Review_Date': 1000,
'action': 'wpfep_hide_review_ask',
'_wpnonce': wpfep_ajax.nonce
};
jQuery.post(wpfep_ajax.ajax_url, data, function() {});

jQuery('.wpfep-review-ask-feedback-form').addClass('wpfep-hidden');
jQuery('.wpfep-review-ask-review-text').addClass('wpfep-hidden');
jQuery('.wpfep-review-ask-thank-you-text').removeClass('wpfep-hidden');
jQuery('.wpfep-main-dashboard-review-ask').delay( 1000 ).fadeOut();
jQuery('.wpfep-main-dashboard-review-ask').delay(1000).fadeOut();
}
});
});
Expand Down
10 changes: 10 additions & 0 deletions functions/wpfep-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1008,3 +1008,13 @@ function update_action()
}
add_action('load-users.php', 'update_action');
}
function wpfep_enqueue_custom_scripts() {
wp_enqueue_script('your-script-handle', plugin_dir_url(__FILE__) . '../assets/js/admin.js', array('jquery'), null, true);

// Localize the script with new data
wp_localize_script('your-script-handle', 'wpfep_ajax', array(
'ajax_url' => admin_url('admin-ajax.php'),
'nonce' => wp_create_nonce('wpfep_feedback_action')
));
}
add_action('admin_enqueue_scripts', 'wpfep_enqueue_custom_scripts');
4 changes: 2 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Contributors: glowlogix, wpmarkuk
Donate link: https://www.glowlogix.com
Tags: profile, users, user meta, register, login
Requires at least: 4.0.1
Tested up to: 6.4.4
Stable tag: 1.3.4
Tested up to: 6.5.4
Stable tag: 1.3.5
Requires PHP: 5.2.17
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
26 changes: 20 additions & 6 deletions uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,32 @@
}

/**
* Delete all pages and settings when plugin in uninstalled.
* Delete all pages and settings when plugin is uninstalled.
*/
function wpfep_delete_options()
{
$wpfep_uninstall = get_option('wpfep_general');
if ('on' == $wpfep_uninstall['wpfep_remove_data_on_uninstall']) {

// Check if $wpfep_uninstall is an array
if (is_array($wpfep_uninstall) && 'on' == $wpfep_uninstall['wpfep_remove_data_on_uninstall']) {
// Delete Pages.
$wpfep_options = get_option('wpfep_profile');
wp_delete_post($wpfep_options['login_page'], true);
wp_delete_post($wpfep_options['register_page'], true);
wp_delete_post($wpfep_options['edit_page'], true);
wp_delete_post($wpfep_options['profile_page'], true);

// Check if $wpfep_options is an array before accessing its indexes
if (is_array($wpfep_options)) {
if (isset($wpfep_options['login_page'])) {
wp_delete_post($wpfep_options['login_page'], true);
}
if (isset($wpfep_options['register_page'])) {
wp_delete_post($wpfep_options['register_page'], true);
}
if (isset($wpfep_options['edit_page'])) {
wp_delete_post($wpfep_options['edit_page'], true);
}
if (isset($wpfep_options['profile_page'])) {
wp_delete_post($wpfep_options['profile_page'], true);
}
}

// Delete Options.
delete_option('_wpfep_page_created');
Expand Down
4 changes: 2 additions & 2 deletions wp-frontend-profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WP Frontend Profile
* Plugin URI: https://wordpress.org/plugins/wp-front-end-profile/
* Description: This plugin allows users to easily edit their profile information on the frontend rather than having to go into the dashboard to make changes to password, email address and other user meta data.
* Version: 1.3.4
* Version: 1.3.5
* @package wp-front-end-profile
* Author: Glowlogix
* Author URI: https://www.glowlogix.com
Expand All @@ -17,7 +17,7 @@
* Main class for WP Frontend Profile.
*/
if (! defined('WPFEP_VERSION')) {
define('WPFEP_VERSION', '1.3.4');
define('WPFEP_VERSION', '1.3.5');
}
if (! defined('WPFEP_PATH')) {
define('WPFEP_PATH', plugin_dir_path(__FILE__));
Expand Down

0 comments on commit ad0ce28

Please sign in to comment.