Plugin Directory

Changeset 1941587


Ignore:
Timestamp:
09/14/2018 09:19:32 PM (7 years ago)
Author:
tryinteract
Message:

shortcode attribute mobile=false allows quiz to remain embedded on the page and not redirect mobile devices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interact-quiz-embed/trunk/interact-quiz-embed.php

    r1781066 r1941587  
    7171    if(isset($atts['type'])) { $type = $atts['type']; } else { $type = 'quiz'; }
    7272    if(isset($atts['no_cover'])) { $no_cover = 'true'; } else { $no_cover = 'false'; }
     73    if(isset($atts['mobile'])) { $mobile = $atts['mobile']; } else { $mobile = 'true'; }
    7374
    7475    $app_id = $atts['id'];
     
    8788                    var host = "' . $type . '.tryinteract.com";
    8889                    var no_cover = ' . $no_cover . ';
     90                    var mobile = ' . $mobile . ';
    8991
    9092                    window[ref] = new InteractApp();
    91                     window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":true,"no_cover":no_cover});
     93                    window[ref].initialize({"ref":ref,"appId": app_id,"width":w,"height":h,"async":true,"host":host,"auto_resize":true,"mobile":mobile,"no_cover":no_cover});
    9294                    window[ref].display();
    9395                });
Note: See TracChangeset for help on using the changeset viewer.