WordPress.org

Support

Support » Plugins and Hacks » Cnhk Slideshow [ENDED] » Mobile keywords not detected if at the start of User-Agent string

Mobile keywords not detected if at the start of User-Agent string

  • 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/

  • The topic ‘Mobile keywords not detected if at the start of User-Agent string’ is closed to new replies.
Skip to toolbar