Skip to content

Commit

Permalink
1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
stiofan committed Mar 13, 2024
1 parent 6ca1a49 commit f89971a
Show file tree
Hide file tree
Showing 13 changed files with 403 additions and 1,311 deletions.
Binary file modified languages/userswp-en_US.mo
Binary file not shown.
1,458 changes: 212 additions & 1,246 deletions languages/userswp-en_US.po

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: stiofansisland, paoltaia, ayecode, ismiaini
Donate link: https://www.ko-fi.com/stiofan
Tags: login form, registration, registration form, user profile, user registration, members, membership
Requires at least: 4.9
Tested up to: 6.4
Stable tag: 1.2.4
Tested up to: 6.5
Stable tag: 1.2.5
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -148,6 +148,8 @@ Yes, you can customize it with Elementor, but also with Gutenberg, Divi, Beaver

= 1.2.5 =
* Remove profile image ajax call had nonce check commented out for testing - FIXED
* Composer packages updated to latest - UPDATED
* Security review of all output data to strengthen escaping and sanitization - UPDATED

= 1.2.4 =
* Add support to resize webp image for avatar/banner - FIXED
Expand Down
6 changes: 3 additions & 3 deletions userswp.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Plugin Name: UsersWP
Plugin URI: https://userswp.io/
Description: The only lightweight user profile plugin for WordPress. UsersWP features front end user profile, users directory, a registration and a login form.
Version: 1.2.4
Version: 1.2.5
Author: AyeCode Ltd
Author URI: https://userswp.io
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
Text Domain: userswp
Domain Path: /languages
Requires at least: 4.9
Tested up to: 6.4
Tested up to: 6.5
*/

// If this file is called directly, abort.
Expand All @@ -24,7 +24,7 @@
}

if ( ! defined( 'USERSWP_VERSION' ) ) {
define( 'USERSWP_VERSION', '1.2.4' );
define( 'USERSWP_VERSION', '1.2.5' );
}

if ( ! defined( 'USERSWP_PATH' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion vendor/ayecode/wp-ayecode-ui/ayecode-ui-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
add_action('after_setup_theme', function () {
global $ayecode_ui_version,$ayecode_ui_file_key;
$this_version = "0.2.6";
$this_version = "0.2.8";
if(empty($ayecode_ui_version) || version_compare($this_version , $ayecode_ui_version, '>')){
$ayecode_ui_version = $this_version ;
$ayecode_ui_file_key = wp_hash( __FILE__ );
Expand Down
7 changes: 6 additions & 1 deletion vendor/ayecode/wp-ayecode-ui/change-log.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
= 0.2.6 - 2024-01-25 =
= 0.2.8 - 2024-02-22 =
* Gallery padding made slider images taller than single images - FIXED
* aui_modal_iframe() function not loading iframe when bs5 selected - FIXED

= 0.2.7 - 2024-01-25 =
* Single quote breaks validation message - FIXED
* WP Editor Styles can now style headings, links, typography - ADDED
* Unused icons font file can load if old class used - FIXED

= 0.2.5 - 2023-12-14 =
* Update textdomain - CHANGED
Expand Down
41 changes: 38 additions & 3 deletions vendor/ayecode/wp-ayecode-ui/includes/ayecode-ui-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AyeCode_UI_Settings {
*
* @var string
*/
public $version = '0.2.6';
public $version = '0.2.8';

/**
* Class textdomain.
Expand Down Expand Up @@ -791,6 +791,33 @@ public function theme_js_settings(){
);
}

/**
* Get the date the site was installed.
*
* @return false|string
*/
public function get_site_install_date() {
global $wpdb; // This gives you access to the WordPress database object

// Prepare the SQL query to get the oldest registration date
$query = "SELECT MIN(user_registered) AS oldest_registration_date FROM {$wpdb->users}";

// Execute the query
$date = $wpdb->get_var($query);

return $date ? $date : false;
}

/**
* Show admin notice if backend scripts not loaded.
*/
public function show_admin_version_notice(){
$fix_url = admin_url("options-general.php?page=ayecode-ui-settings" );
$button = '<a href="'.esc_url($fix_url).'" class="button-primary">View Settings</a>';
$message = __( '<b>Style Issue:</b> AyeCode UI has changed its default version from v4 to v5, if you notice unwanted style changes, please revert to v4 (saving the settings page will remove this notice)')." " .$button;
echo '<div class="notice notice-error aui-settings-error-notice"><p>'.$message.'</p></div>';
}

/**
* Get the current Font Awesome output settings.
*
Expand All @@ -799,6 +826,14 @@ public function theme_js_settings(){
public function get_settings() {

$db_settings = get_option( 'ayecode-ui-settings' );

// Maybe show default version notice
$site_install_date = new DateTime( self::get_site_install_date() );
$switch_over_date = new DateTime("2024-02-01");
if ( empty( $db_settings ) && $site_install_date < $switch_over_date ) {
add_action( 'admin_notices', array( $this, 'show_admin_version_notice' ) );
}

$js_default = 'core-popper';
$js_default_backend = $js_default;

Expand All @@ -822,15 +857,15 @@ public function get_settings() {
'css_backend' => 'compatibility', // core, compatibility
'js_backend' => $js_default_backend, // js to load, core-popper, popper
'disable_admin' => '', // URL snippets to disable loading on admin
'bs_ver' => '4', // The default bootstrap version to sue by default
'bs_ver' => '5', // The default bootstrap version to sue by default
), $db_settings );

$settings = wp_parse_args( $db_settings, $defaults );

/**
* Filter the Bootstrap settings.
*
* @todo if we add this filer people might use it and then it defeates the purpose of this class :/
* @todo if we add this filer people might use it and then it defeats the purpose of this class :/
*/
return $this->settings = apply_filters( 'ayecode-ui-settings', $settings, $db_settings, $defaults );
}
Expand Down
27 changes: 19 additions & 8 deletions vendor/ayecode/wp-ayecode-ui/includes/inc/bs5-js.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ function aui_init_iconpicker(){

function aui_modal_iframe($title,$url,$footer,$dismissible,$class,$dialog_class,$body_class,responsive){
if(!$body_class){$body_class = 'p-0';}
var wClass = 'text-center position-absolute w-100 text-dark overlay overlay-white p-0 m-0 d-none d-flex justify-content-center align-items-center';
var wClass = 'text-center position-absolute w-100 text-dark overlay overlay-white p-0 m-0 d-flex justify-content-center align-items-center';
var wStyle = '';
var sStyle = '';
var $body = "", sClass = "w-100 p-0 m-0";
if (responsive) {
$body += '<div class="embed-responsive embed-responsive-16by9">';
Expand All @@ -281,25 +283,34 @@ function aui_modal_iframe($title,$url,$footer,$dismissible,$class,$dialog_class,
} else {
wClass += ' vh-100';
sClass += ' vh-100';
wStyle += ' height: 90vh !important;';
sStyle += ' height: 90vh !important;';
}
$body += '<div class="ac-preview-loading ' + wClass + '" style="left:0;top:0"><div class="spinner-border" role="status"></div></div>';
$body += '<iframe id="embedModal-iframe" class="' + sClass + '" src="" width="100%" height="100%" frameborder="0" allowtransparency="true"></iframe>';
$body += '<div class="ac-preview-loading ' + wClass + '" style="left:0;top:0;' + wStyle + '"><div class="spinner-border" role="status"></div></div>';
$body += '<iframe id="embedModal-iframe" class="' + sClass + '" style="' + sStyle + '" src="" width="100%" height="100%" frameborder="0" allowtransparency="true"></iframe>';
if (responsive) {
$body += '</div>';
}

console.log('b4-show-modal');
$m = aui_modal($title,$body,$footer,$dismissible,$class,$dialog_class,$body_class);
jQuery( $m ).on( 'shown.bs.modal', function ( e ) {

// myModalEl.addEventListener('hidden.bs.modal', event => {
// jQuery(".aui-carousel-modal iframe").attr('src', '');
// });

const auiModal = document.getElementById('aui-modal');
auiModal.addEventListener( 'shown.bs.modal', function ( e ) {console.log('show-modal');
iFrame = jQuery( '#embedModal-iframe') ;

jQuery('.ac-preview-loading').addClass('d-flex');

iFrame.attr({
src: $url
});

//resize the iframe once loaded.
iFrame.load(function() {
jQuery('.ac-preview-loading').removeClass('d-flex');
jQuery('.ac-preview-loading').removeClass('d-flex').addClass('d-none');
});
});

Expand Down Expand Up @@ -473,7 +484,7 @@ function aui_carousel_maybe_show_multiple_items($carousel){
}

// content
$new_items += '<div class="col pe-1 ps-0">'+$items[index]+'</div>';
$new_items += '<div class="col ">'+$items[index]+'</div>';
$new_item_count++;


Expand All @@ -485,7 +496,7 @@ function aui_carousel_maybe_show_multiple_items($carousel){
if($md_count-$new_item_count > 0){
$placeholder_count = $md_count-$new_item_count;
while($placeholder_count > 0){
$new_items += '<div class="col pe-1 ps-0"></div>';
$new_items += '<div class="col "></div>';
$placeholder_count--;
}

Expand Down
6 changes: 6 additions & 0 deletions vendor/ayecode/wp-super-duper/change-log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
= 1.1.35 - 2024-03-13 =
* Add style multiselect field for Elementor editor - CHANGED

= 1.1.34 - 2024-02-15 =
* Post Author support added in Block Visibility - ADDED

= 1.1.33 - 2024-01-25 =
* Escape new line characters from option label - FIXED

Expand Down
89 changes: 77 additions & 12 deletions vendor/ayecode/wp-super-duper/sd-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2728,6 +2728,7 @@ function sd_visibility_rules_options() {
$options = array(
'logged_in' => __( 'Logged In', 'ayecode-connect' ),
'logged_out' => __( 'Logged Out', 'ayecode-connect' ),
'post_author' => __( 'Post Author', 'ayecode-connect' ),
'user_roles' => __( 'Specific User Roles', 'ayecode-connect' )
);

Expand All @@ -2743,7 +2744,7 @@ function sd_visibility_rules_options() {
*
* @return array
*/
function sd_visibility_gd_field_options(){
function sd_visibility_gd_field_options() {
$fields = geodir_post_custom_fields( '', 'all', 'all', 'none' );

$keys = array();
Expand All @@ -2766,17 +2767,57 @@ function sd_visibility_gd_field_options(){
}
}

$keys['post_date'] = 'post_date ( ' . __( 'post date', 'geodirectory' ) . ' )';
$keys['post_modified'] = 'post_modified ( ' . __( 'post modified', 'geodirectory' ) . ' )';
$keys['default_category'] = 'default_category ( ' . __( 'Default Category', 'geodirectory' ) . ' )';
$keys['post_id'] = 'post_id ( ' . __( 'post id', 'geodirectory' ) . ' )';
$keys['post_status'] = 'post_status ( ' . __( 'Post Status', 'geodirectory' ) . ' )';
$standard_fields = sd_visibility_gd_standard_field_options();

if ( ! empty( $standard_fields ) ) {
foreach ( $standard_fields as $key => $option ) {
$keys[ $key ] = $option;
}
}

$options = apply_filters( 'geodir_badge_field_keys', $keys );

return apply_filters( 'sd_visibility_gd_field_options', $options );
}

/**
* Get visibility GD post standard field options.
*
* @return array
*/
function sd_visibility_gd_standard_field_options( $post_type = '' ) {
$fields = sd_visibility_gd_standard_fields( $post_type );

$options = array();

foreach ( $fields as $key => $field ) {
if ( ! empty( $field['frontend_title'] ) ) {
$options[ $key ] = $key . ' ( ' . $field['frontend_title'] . ' )';
}
}

return apply_filters( 'sd_visibility_gd_standard_field_options', $options, $fields );
}

/**
* Get visibility GD post standard fields.
*
* @return array
*/
function sd_visibility_gd_standard_fields( $post_type = '' ) {
$standard_fields = geodir_post_meta_standard_fields( $post_type );

$fields = array();

foreach ( $standard_fields as $key => $field ) {
if ( $key != 'post_link' && strpos( $key, 'event' ) === false && ! empty( $field['frontend_title'] ) ) {
$fields[ $key ] = $field;
}
}

return apply_filters( 'sd_visibility_gd_standard_fields', $fields );
}

/**
* Get visibility field conditions options.
*
Expand Down Expand Up @@ -3077,6 +3118,8 @@ function sd_block_check_rules( $rules ) {
}

function sd_block_check_rule( $match, $rule ) {
global $post;

if ( $match && ! empty( $rule['type'] ) ) {
switch ( $rule['type'] ) {
case 'logged_in':
Expand All @@ -3086,6 +3129,14 @@ function sd_block_check_rule( $match, $rule ) {
case 'logged_out':
$match = ! is_user_logged_in();

break;
case 'post_author':
if ( ! empty( $post ) && $post->post_type != 'page' && ! empty( $post->post_author ) && is_user_logged_in() ) {
$match = (int) $post->post_author === (int) get_current_user_id() ? true : false;
} else {
$match = false;
}

break;
case 'user_roles':
$match = false;
Expand Down Expand Up @@ -3155,7 +3206,9 @@ function sd_block_check_rule_gd_field( $rule ) {
$address_fields = array( 'street2', 'neighbourhood', 'city', 'region', 'country', 'zip', 'latitude', 'longitude' ); // Address fields
$field = array();

if ( $match_field && ! in_array( $match_field, array( 'post_date', 'post_modified', 'default_category', 'post_id', 'post_status' ) ) && ! in_array( $match_field, $address_fields ) ) {
$standard_fields = sd_visibility_gd_standard_fields();

if ( $match_field && ! in_array( $match_field, array_keys( $standard_fields ) ) && ! in_array( $match_field, $address_fields ) ) {
$package_id = geodir_get_post_package_id( $find_post->ID, $find_post->post_type );
$fields = geodir_post_custom_fields( $package_id, 'all', $find_post->post_type, 'none' );

Expand All @@ -3174,16 +3227,20 @@ function sd_block_check_rule_gd_field( $rule ) {
}
}

// Parse search.
$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule );

// Address fields.
if ( in_array( $match_field, $address_fields ) && ( $address_fields = geodir_post_meta_address_fields( '' ) ) ) {
if ( ! empty( $address_fields[ $match_field ] ) ) {
$field = $address_fields[ $match_field ];
}
} else if ( in_array( $match_field, array_keys( $standard_fields ) ) ) {
if ( ! empty( $standard_fields[ $match_field ] ) ) {
$field = $standard_fields[ $match_field ];
}
}

// Parse search.
$search = sd_gd_field_rule_search( $args['search'], $find_post->post_type, $rule, $field, $find_post );

$is_date = ( ! empty( $field['type'] ) && $field['type'] == 'datepicker' ) || in_array( $match_field, array( 'post_date', 'post_modified' ) ) ? true : false;
$is_date = apply_filters( 'geodir_post_badge_is_date', $is_date, $match_field, $field, $args, $find_post );

Expand Down Expand Up @@ -3240,15 +3297,23 @@ function sd_block_check_rule_gd_field( $rule ) {
return $match_found;
}

function sd_gd_field_rule_search( $search, $post_type, $rule ) {
function sd_gd_field_rule_search( $search, $post_type, $rule, $field = array(), $gd_post = array() ) {
global $post;

if ( ! $search ) {
return $search;
}

$orig_search = $search;
$_search = strtolower( $search );

if ( $_search == 'date_today' ) {
if ( ! empty( $rule['field'] ) && $rule['field'] == 'post_author' ) {
if ( $search == 'current_user' ) {
$search = is_user_logged_in() ? (int) get_current_user_id() : - 1;
} else if ( $search == 'current_author' ) {
$search = ( ! empty( $post ) && $post->post_type != 'page' && isset( $post->post_author ) ) ? absint( $post->post_author ) : - 1;
}
} else if ( $_search == 'date_today' ) {
$search = date( 'Y-m-d' );
} else if ( $_search == 'date_tomorrow' ) {
$search = date( 'Y-m-d', strtotime( "+1 day" ) );
Expand Down
Loading

0 comments on commit f89971a

Please sign in to comment.