WordPress.org

Ready to get started?Download WordPress

Forums

Cnhk Slideshow
Mobile keywords not detected if at the start of User-Agent string (1 post)

  1. megamurmulis
    Member
    Posted 6 months ago #

    Currently code fails to detect mobile keywords if found at start of User-Agent string..
    Code needs to account for this:

    FILE: cnhk-slideshow/classes/cnhkss.class.php
    LINE: 147
    public function front_script()
    {
        $iPod   = stripos($_SERVER['HTTP_USER_AGENT'], "ipod")   !== false;
        $iPhone = stripos($_SERVER['HTTP_USER_AGENT'], "iphone") !== false;
        $iPad   = stripos($_SERVER['HTTP_USER_AGENT'], "ipad")   !== false;
        $iOS6   = stripos($_SERVER['HTTP_USER_AGENT'], "1001")   !== false;
        ....
        if (($iPod || $iPhone || $iPad) && $iOS6) {
             wp_enqueue_script('cnhk-cycle-ios6', CNHK_SCRIPT_URL . 'ios6fix.js', array('cnhk-cycle'));

    https://wordpress.org/plugins/cnhk-slideshow/

Reply

You must log in to post.

About this Plugin

About this Topic

Tags