WordPress.org

Ready to get started?Download WordPress

Forums

IE9 Pinned Site
bag with cache plugins (1 post)

  1. Sergey.S.Betke
    Member
    Posted 2 years ago #

    there is solution - remove if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) !== FALSE ) and add echo '<!--[if gte IE 9]>'.

    function on_head(){
    		echo "\r\n" . '<!-- IE9 Pinned Site ' . $this->version . ' by Fatih Boy -->'."\r\n";
    		echo '<!-- info : http://www.enterprisecoding.com/blog/projects/ie9-pinned-site -->'."\r\n";
    		echo '<meta name="IE9 Pinned Site" content="' . $this->version . '" />'."\r\n";
    
    		if(!$this->options->enabled) { return; }
    
    //itg:		if ( strpos( $_SERVER['HTTP_USER_AGENT'], 'MSIE 9' ) !== FALSE ) {
    			//itg: добавил [if gte IE 9], чтобы не работало на ie8, если отрендерен код в кеш
    			echo '<!--[if gte IE 9]>';
    			echo '<meta name="application-name" content="' . $this->options->applicationName . '" />'."\r\n";
    			echo '<meta name="msapplication-tooltip" content="' . $this->options->tooltip . '" />'."\r\n";
    			echo '<meta name="msapplication-starturl" content="' . $this->options->startupUrl . '" />'."\r\n";
    
    			$count = count($this->taskOptions->entries);
    			for ($i = 0; $i < $count; $i++) {
    				$dataObject = $this->taskOptions->entries[$i];
    				$type = 'ie9PinnedSite'.$dataObject->type;
    				$taskEntry = new $type($dataObject, 'task', $i+1);
    
    				$taskEntry->render4Task();
    			}
    
    			if ($this->options->enabled && '' != $this->jumpListOptions->title){
    				echo <<<headScript
    <script type="text/javascript">
    if (window.external && window.external.msIsSiteMode()) {
    	var wext=window.external;
    	wext.msSiteModeCreateJumplist("{$this->jumpListOptions->title}");
    headScript;
    				$count = count($this->jumpListOptions->entries);
    				for ($i = 0; $i < $count; $i++) {
    					$dataObject = $this->jumpListOptions->entries[$i];
    					$type = 'ie9PinnedSite'.$dataObject->type;
    					$taskEntry = new $type($dataObject, 'jump_list', $i+1);
    
    					$taskEntry->render4JumpList();
    				}
    
    				echo <<<headScript2
    	wext.msSiteModeShowJumplist();
    };
    </script>
    headScript2;
    			}
    			//itg:
    			echo '<![endif]-->';
    //		}
    		echo '<!-- /IE9 Pinned Site -->'."\r\n";
    	}

    http://wordpress.org/extend/plugins/ie9-pinned-site/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 2 years ago by Sergey.S.Betke
  • This topic is not resolved
  • WordPress version: 3.2.1