• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / Browser::checkBrowserOpera() – Determine if the browser is Opera or not (last updated 1.7)

You appear to be a bot. Output may be restricted

Description

Determine if the browser is Opera or not (last updated 1.7)

Usage

$boolean = Browser::checkBrowserOpera();

Parameters

Returns

boolean True if the browser is Opera otherwise false

Source

File name: easy-digital-downloads/includes/libraries/browser.php


Lines:

1 to 32 of 32
  function checkBrowserOpera() {
    if ( stripos( $this->_agent, 'opera mini' ) !== false ) {
      $resultant = stristr( $this->_agent, 'opera mini' );
      if ( preg_match( '/\//', $resultant ) ) {
        $aresult = explode( '/', $resultant );
        $aversion = explode( ' ', $aresult[1] );
        $this->setVersion( $aversion[0] );
      } else {
        $aversion = explode( ' ', stristr( $resultant, 'opera mini' ) );
        $this->setVersion( $aversion[1] );
      }
      $this->_browser_name = $this->BROWSER_OPERA_MINI;
      $this->setMobile( true );
      return true;
    } else if ( stripos( $this->_agent, 'opera' ) !== false ) {
      $resultant = stristr( $this->_agent, 'opera' );
      if ( preg_match( '/Version\/(10.*)$/', $resultant, $matches ) ) {
        $this->setVersion( $matches[1] );
      } else if ( preg_match( '/\//', $resultant ) ) {
        $aresult = explode( '/', str_replace( "(", " ", $resultant ) );
        $aversion = explode( ' ', $aresult[1] );
        $this->setVersion( $aversion[0] );
      } else {
        $aversion = explode( ' ', stristr( $resultant, 'opera' ) );
        $this->setVersion( isset( $aversion[1] )?$aversion[1]:"" );
      }
      $this->_browser_name = $this->BROWSER_OPERA;
      return true;
    }
    return false;
  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 15th September 2022

Primary Sidebar

Information

Function name: Browser::checkBrowserOpera
Class ref: Browser
Plugin ref: Easy Digital Downloads
Version: 3.1.0.2
Sourcefile: includes/libraries/browser.php
File ref: includes/libraries/browser.php
Deprecated?: No
API Letters: B,C

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 6.1.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins