Skip to content

Commit

Permalink
1.2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
kprajapatii committed Dec 14, 2023
1 parent ed67694 commit 81131dc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ayecode-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ function ayecode_connect_sync_licenses() {
function ayecode_connect_demo_import_redirect( $plugin ){
if ( $plugin == plugin_basename( __FILE__ ) && !empty( $_SERVER['HTTP_REFERER'] ) ) {
$parts = parse_url($_SERVER['HTTP_REFERER']);
parse_str($parts['query'], $query);

if ( ! empty( $parts['query'] ) ) {
parse_str( $parts['query'], $query );
} else {
$query = array();
}

if(!empty($query['ac-demo-import'])){
$demo = sanitize_title_with_dashes($query['ac-demo-import']);
wp_redirect(admin_url( "admin.php?page=ayecode-demo-content&ac-demo-import=".esc_attr($demo) ));
Expand Down

0 comments on commit 81131dc

Please sign in to comment.