Abstract quicktag code and don't show if it's Safari.

git-svn-id: https://develop.svn.wordpress.org/trunk@1631 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-09-09 17:51:33 +00:00
parent 54cf4d7e78
commit 44de1ee11b
6 changed files with 17 additions and 30 deletions

View File

@@ -475,4 +475,17 @@ function extract_from_markers($filename, $marker) {
return $result;
}
function the_quicktags () {
// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP
if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) :
echo '
<div id="quicktags">
<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>:
<script src="quicktags.js" type="text/javascript"></script>
<script type="text/javascript">edToolbar();</script>
';
echo '</div>';
endif;
}
?>