当前位置: 首页>>代码示例>>PHP>>正文


PHP Mobile_Detect::isBlackBerryOS方法代码示例

本文整理汇总了PHP中Mobile_Detect::isBlackBerryOS方法的典型用法代码示例。如果您正苦于以下问题:PHP Mobile_Detect::isBlackBerryOS方法的具体用法?PHP Mobile_Detect::isBlackBerryOS怎么用?PHP Mobile_Detect::isBlackBerryOS使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile_Detect的用法示例。


在下文中一共展示了Mobile_Detect::isBlackBerryOS方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

	/**
	 * Loads cookie and sets up theme filters.
	 */
	static function setup_theme() {
		global $wpdb;
		$tablemobility = $wpdb->prefix.'ult25_mobile';
		$browser = new Mobile_Detect;
		if($browser->isMobile()){
			if(isset($_REQUEST['theme'])): // click desktop
				self::set_theme_onclick();
			endif;
			self::load_cookie();
			if ( ! empty( self::$theme ) ) :
			add_filter( 'pre_option_template', array( self::$theme, 'get_template' ) );
			add_filter( 'pre_option_stylesheet', array( self::$theme, 'get_stylesheet' ) );
			add_filter( 'pre_option_stylesheet_root', array( self::$theme, 'get_theme_root' ) );
			
			$parent = self::$theme->parent();
			
			if( empty( $parent ) )
				add_filter( 'pre_option_template_root', array( self::$theme, 'get_theme_root' ) );
			else
				add_filter( 'pre_option_template_root', array( $parent, 'get_theme_root' ) );
			
			add_filter( 'pre_option_current_theme', '__return_false' );
			else:
			/*
			 * isAndroidOS()	bool(false)
			 * isBlackBerryOS()	bool(false)
			 * isPalmOS()	bool(false)
			 * isSymbianOS()	bool(false)
			 * isWindowsMobileOS()	bool(false)
			 * isWindowsPhoneOS()	bool(false)
			 * isiOS()	bool(false)
			 */
			$browsing = false;
			if($browser->isiPad()){
				$browsing = 'iPad';
			} elseif ($browser->isiPhone()){
				$browsing= 'iPhone';
			} elseif ($browser->isAndroidOS()){
				if($browser->isTablet()){
				$browsing = 'AndroidTablet';
				} else {
				$browsing = 'Android';
				}
			} elseif ($browser->isWindowsMobileOS() || $browser->isWindowsPhoneOS()){
				if($browser->isTablet()){
					$browsing = 'WindowsTablet';
				} else {
					$browsing = 'Windows';
				}
			} elseif ($browser->isBlackBerryOS()){
				$browsing = 'BlackBerry';
			}
			if($browsing){
			$mobilethemeq = "SELECT * FROM `".$tablemobility."` WHERE `device`='$browsing'";
			$mfetch=$wpdb->get_row($mobilethemeq);
			if($mfetch){
				$theme = wp_get_theme(  $mfetch->theme );
				
				if (
				$theme->exists()
				&& $theme->get( 'Name' ) != get_option( 'current_theme' )
				&& self::is_allowed( $theme )
				) {
					self::$theme = $theme;
					add_filter( 'pre_option_template', array( self::$theme, 'get_template' ) );
					add_filter( 'pre_option_stylesheet', array( self::$theme, 'get_stylesheet' ) );
					add_filter( 'pre_option_stylesheet_root', array( self::$theme, 'get_theme_root' ) );
					
					$parent = self::$theme->parent();
					
					if( empty( $parent ) )
						add_filter( 'pre_option_template_root', array( self::$theme, 'get_theme_root' ) );
					else
					add_filter( 'pre_option_template_root', array( $parent, 'get_theme_root' ) );
					add_filter( 'pre_option_current_theme', '__return_false' );
					add_action('ultimatum_meta', 'ultimatum_add_noscale_meta');
					add_action('ultimatum_meta', 'ultimatum_web_app_meta');
					if($mfetch->mpush==1){
						//add_action('ultimatum_meta', 'ultimatum_web_app_bubble');
						//add_action('ultimatum_before_body_close','ultimatum_web_app_link_hider');
					}
				}
				
			}
			}
			endif;
		}
		if ( self::can_switch_themes() ) {
			self::load_cookie();

			if ( ! empty( self::$theme ) ) {

				add_filter( 'pre_option_template', array( self::$theme, 'get_template' ) );
				add_filter( 'pre_option_stylesheet', array( self::$theme, 'get_stylesheet' ) );
				add_filter( 'pre_option_stylesheet_root', array( self::$theme, 'get_theme_root' ) );

				$parent = self::$theme->parent();
//.........这里部分代码省略.........
开发者ID:polaris610,项目名称:medicalhound,代码行数:101,代码来源:ult-switcher.php

示例2: get_device_name


//.........这里部分代码省略.........
        }
        if ($detect->isbqTablet()) {
            $name = 'bq';
            break;
        }
        if ($detect->isHuaweiTablet()) {
            $name = 'Huawei';
            break;
        }
        if ($detect->isNecTablet()) {
            $name = 'Nec';
            break;
        }
        if ($detect->isPantechTablet()) {
            $name = 'Pantech';
            break;
        }
        if ($detect->isBronchoTablet()) {
            $name = 'Broncho';
            break;
        }
        if ($detect->isVersusTablet()) {
            $name = 'Versus';
            break;
        }
        if ($detect->isZyncTablet()) {
            $name = 'Zync';
            break;
        }
        if ($detect->isPositivoTablet()) {
            $name = 'Positivo';
            break;
        }
        if ($detect->isNabiTablet()) {
            $name = 'Nabi';
            break;
        }
        if ($detect->isPlaystationTablet()) {
            $name = 'Playstation';
            break;
        }
        if ($detect->isGenericTablet()) {
            $name = 'Generic';
            break;
        }
        if ($detect->isAndroidOS()) {
            $name = 'Android';
            break;
        }
        if ($detect->isBlackBerryOS()) {
            $name = 'BlackBerry';
            break;
        }
        if ($detect->isPalmOS()) {
            $name = 'Plam';
            break;
        }
        if ($detect->isSymbianOS()) {
            $name = 'Symbian';
            break;
        }
        if ($detect->isWindowsMobileOS()) {
            $name = 'WindowsMobile';
            break;
        }
        if ($detect->isWindowsPhoneOS()) {
            $name = 'WindowsPhone';
            break;
        }
        if ($detect->isiOS()) {
            $name = 'iOS';
            break;
        }
        if ($detect->isMeeGoOS()) {
            $name = 'MeeGo';
            break;
        }
        if ($detect->isMaemoOS()) {
            $name = 'Maemo';
            break;
        }
        if ($detect->isJavaOS()) {
            $name = 'JavaOS';
            break;
        }
        if ($detect->iswebOS()) {
            $name = 'WebOS';
            break;
        }
        if ($detect->isbadaOS()) {
            $name = 'badaOS';
            break;
        }
        if ($detect->isBREWOS()) {
            $name = 'BREWOS';
            break;
        }
    } while (false);
    return $name . ' ' . $deviceType;
}
开发者ID:sdgdsffdsfff,项目名称:html-sensor,代码行数:101,代码来源:device_name.php


注:本文中的Mobile_Detect::isBlackBerryOS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。