Changeset 2857095
- Timestamp:
- 01/30/2023 01:14:41 PM (3 years ago)
- Location:
- quentn-wp/trunk
- Files:
-
- 7 edited
-
admin/class-quentn-wp-admin.php (modified) (1 diff)
-
includes/class-quentn-wp-elementor-integration.php (modified) (1 diff)
-
includes/class-quentn-wp-learndash.php (modified) (2 diffs)
-
includes/class-quentn-wp-page-restriction-meta-box.php (modified) (1 diff)
-
includes/class-quentn-wp.php (modified) (1 diff)
-
quentn-wp.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
quentn-wp/trunk/admin/class-quentn-wp-admin.php
r2398796 r2857095 400 400 public function register_custom_fields() { 401 401 402 $tab = ( !empty( $_GET['tab'] ) ) ? sanitize_key( $_GET['tab'] ) : ''; 403 402 404 $fields = array(); 403 $fields[] = array( 404 'id' => 'quentn_auto_login_redirect_url', 405 'title' => __( 'Redirect URL', 'quentn-wp' ), 406 'callback' => array( $this, 'field_quentn_auto_login_redirect_url' ), 407 'page' => 'quentn-dashboard-auto-login', 408 'section' => 'quentn_auto_login_option', 409 ); 405 if ( $tab == 'quentn_settings' ) { 406 $fields[] = array( 407 'id' => 'quentn_auto_login_redirect_url', 408 'title' => __('Redirect URL', 'quentn-wp'), 409 'callback' => array($this, 'field_quentn_auto_login_redirect_url'), 410 'page' => 'quentn-dashboard-auto-login', 411 'section' => 'quentn_auto_login_option', 412 ); 413 } 410 414 411 415 //add tag fields for all wordpress roles 412 $wp_roles = new WP_Roles; 413 414 $qntn_terms = $this->api_handler->get_terms(); 415 416 //loop through all available roles of WP and set three options for each, add tag (bool), remove tag (bool), quentn tags (array) 417 //set enable/disable add user from wp to quentn 418 foreach ( $wp_roles->get_names() as $slug => $name ) { 419 $fields[] = array( 420 'id' => 'add_wp_user_'.$slug.'_to_quentn', 421 'title' => translate_user_role( $name ), 422 'callback' => array( $this, 'input_add_wp_user_to_quentn' ), 423 'page' => 'quentn-dashboard-tags', 424 'section' => 'quentn_tags_option', 425 'args' => array( 'role' => $slug, 'role_title' => translate_user_role( $name ) ) 426 ); 427 428 //set quentn terms selection option 429 $fields [] = array( 430 'id' => 'quentn_tags'.$slug, 431 'title' => '', 432 'callback' => array( $this, 'field_wp_role_quentn_tags' ), 433 'page' => 'quentn-dashboard-tags', 434 'section' => 'quentn_tags_option', 435 'args' => array( 436 'label_for' => __('Please Select Tags', 'quentn-wp'), 437 'role' => $slug, 438 'terms' => $qntn_terms, 439 ) 440 ); 441 442 //set enable/disable remove tags when user loses a role 443 $fields[] = array( 444 'id' => 'delete_wp_user_'.$slug.'_from_quentn', 445 'title' => '', 446 'callback' => array( $this, 'input_delete_wp_user_to_quentn' ), 447 'page' => 'quentn-dashboard-tags', 448 'section' => 'quentn_tags_option', 449 'args' => array( 'role' => $slug ) 450 ); 416 if ( $tab == 'quentn_tags_selection' ) { 417 418 $wp_roles = new WP_Roles; 419 420 $qntn_terms = $this->api_handler->get_terms(); 421 422 //loop through all available roles of WP and set three options for each, add tag (bool), remove tag (bool), quentn tags (array) 423 //set enable/disable add user from wp to quentn 424 foreach ( $wp_roles->get_names() as $slug => $name ) { 425 $fields[] = array( 426 'id' => 'add_wp_user_' . $slug . '_to_quentn', 427 'title' => translate_user_role( $name ), 428 'callback' => array( $this, 'input_add_wp_user_to_quentn' ), 429 'page' => 'quentn-dashboard-tags', 430 'section' => 'quentn_tags_option', 431 'args' => array( 'role' => $slug, 'role_title' => translate_user_role( $name ) ) 432 ); 433 434 //set quentn terms selection option 435 $fields [] = array( 436 'id' => 'quentn_tags' . $slug, 437 'title' => '', 438 'callback' => array( $this, 'field_wp_role_quentn_tags' ), 439 'page' => 'quentn-dashboard-tags', 440 'section' => 'quentn_tags_option', 441 'args' => array( 442 'label_for' => __('Please Select Tags', 'quentn-wp'), 443 'role' => $slug, 444 'terms' => $qntn_terms, 445 ) 446 ); 447 448 //set enable/disable remove tags when user loses a role 449 $fields[] = array( 450 'id' => 'delete_wp_user_' . $slug . '_from_quentn', 451 'title' => '', 452 'callback' => array( $this, 'input_delete_wp_user_to_quentn' ), 453 'page' => 'quentn-dashboard-tags', 454 'section' => 'quentn_tags_option', 455 'args' => array( 'role' => $slug ) 456 ); 457 } 451 458 } 452 459 -
quentn-wp/trunk/includes/class-quentn-wp-elementor-integration.php
r2700751 r2857095 348 348 $quentn_attach_contact_information = $record->get_form_settings( 'quentn_attach_contact_information' ); 349 349 350 //add http as prefix if its not set in redirect_url 351 $parsed = parse_url( $quentn_default_redirect_url ); 352 if ( empty( $parsed['scheme'] ) ) { 353 $quentn_default_redirect_url = 'http://' . ltrim( $quentn_default_redirect_url, '/' ); 354 } 355 356 //add http as prefix if its not set in confirm redirect url 357 $parsed_confirmed_url = parse_url( $quentn_confirmed_redirect_url ); 358 if ( empty( $parsed_confirmed_url['scheme'] ) ) { 359 $quentn_confirmed_redirect_url = 'http://' . ltrim( $quentn_confirmed_redirect_url, '/' ); 360 } 361 350 362 if( ! empty( $quentn_terms ) ) { 351 363 $contact['terms'] = $quentn_terms; 352 364 } 365 353 366 $contact['request_ip'] = $_SERVER["REMOTE_ADDR"]; //add ip address and terms to subscriber data 354 367 $request_data['contact'] = $contact; -
quentn-wp/trunk/includes/class-quentn-wp-learndash.php
r2327486 r2857095 17 17 add_action( 'add_user_to_blog', array( $this, 'quentn_learndash_courses' ) ); 18 18 } else { 19 add_action( 'user_register', array( $this, 'quentn_learndash_courses' , 100, 2 ));19 add_action( 'user_register', array( $this, 'quentn_learndash_courses' ), 100 ); 20 20 } 21 21 … … 24 24 25 25 //update user lerandash courses 26 add_action( 'profile_update', array( $this, 'quentn_learndash_courses' ), 100 , 2);26 add_action( 'profile_update', array( $this, 'quentn_learndash_courses' ), 100 ); 27 27 28 28 //remove learndash courses if user role is removed -
quentn-wp/trunk/includes/class-quentn-wp-page-restriction-meta-box.php
r2327486 r2857095 295 295 //if return url is not empty, then it must be valid 296 296 if( $q_redirection_type != 'restricted_url' || ! filter_var( $q_redirect_url, FILTER_VALIDATE_URL ) ) { 297 //we are not stopping complete page to save if redirect url not valid. that's why we comment this code to avoid user confusion 297 298 //$q_redirect_url = ''; 298 299 } -
quentn-wp/trunk/includes/class-quentn-wp.php
r2830198 r2857095 75 75 $this->version = QUENTN_WP_VERSION; 76 76 } else { 77 $this->version = '1.2. 4';77 $this->version = '1.2.5'; 78 78 } 79 79 $this->plugin_name = 'quentn-wp'; -
quentn-wp/trunk/quentn-wp.php
r2830198 r2857095 17 17 * Plugin URI: https://docs.quentn.com/de/beta-quentn-wordpress-plugin/installieren-und-verbinden 18 18 * Description: This plugin allows you to restrict access to specific pages, create custom access links and create dynamic page countdowns. Optionally, you can connect your Quentn account to your WordPress installation to share contacts and manage access restrictions through Quentn. 19 * Version: 1.2. 419 * Version: 1.2.5 20 20 * Author: Quentn.com GmbH 21 21 * Author URI: https://quentn.com/ … … 37 37 define( "TABLE_QUENTN_RESTRICTIONS", 'qntn_restrictions' ); 38 38 define( "TABLE_QUENTN_USER_DATA", 'qntn_user_data' ); 39 define( 'QUENTN_WP_VERSION', '1.2. 4' );39 define( 'QUENTN_WP_VERSION', '1.2.5' ); 40 40 41 41 /** -
quentn-wp/trunk/readme.txt
r2830198 r2857095 4 4 Requires at least: 4.6.0 5 5 Tested up to: 6.1.1 6 Stable tag: 1.2. 46 Stable tag: 1.2.5 7 7 Requires PHP: 5.6.0 8 8 License: GPLv2 or later … … 66 66 67 67 == Changelog == 68 = 1.2.5 = 69 * Fix: Learndash issue when new user is registered. 70 68 71 = 1.2.4 = 69 72 * Test with new wordpress ( 6.1.1 ), Elementor ( 3.9.0 ) and Elemnetor PRO ( 3.9.0 ) versions. … … 150 153 == Upgrade Notice == 151 154 155 = 1.2.5 = 156 Thanks for using Quentn Plugin! Please update the plugin to fix Learndash error when new user is registered. 157 152 158 = 1.2.4 = 153 159 Thanks for using Quentn Plugin! Please update the plugin. It is now tested with new wordpress ( 6.1.1 ), Elementor ( 3.9.0 ) and Elemnetor PRO ( 3.9.0 ) versions.
Note: See TracChangeset
for help on using the changeset viewer.