Abstract quicktag code and don't show if it's Safari.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1631 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
85b23fe964
commit
164fa8588e
|
@ -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;
|
||||
}
|
||||
|
||||
?>
|
|
@ -94,12 +94,7 @@ window.onload = focusit;
|
|||
|
||||
<fieldset id="postdiv">
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: ';
|
||||
include('quicktags.php');
|
||||
?>
|
||||
</div>
|
||||
<?php the_quicktags(); ?>
|
||||
<?php
|
||||
$rows = get_settings('default_post_edit_rows');
|
||||
if (($rows < 3) || ($rows > 100)) {
|
||||
|
|
|
@ -39,12 +39,7 @@ window.onload = focusit;
|
|||
|
||||
<fieldset style="clear: both;">
|
||||
<legend><?php _e('Comment') ?></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: ';
|
||||
include('quicktags.php');
|
||||
?>
|
||||
</div>
|
||||
<?php the_quicktags(); ?>
|
||||
<?php
|
||||
$rows = get_settings('default_post_edit_rows');
|
||||
if (($rows < 3) || ($rows > 100)) {
|
||||
|
|
|
@ -49,14 +49,7 @@ window.onload = focusit;
|
|||
<br />
|
||||
<fieldset id="postdiv">
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
if ('bookmarklet' != $mode) {
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: ';
|
||||
include('quicktags.php');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php the_quicktags(); ?>
|
||||
<?php
|
||||
$rows = get_settings('default_post_edit_rows');
|
||||
if (($rows < 3) || ($rows > 100)) {
|
||||
|
|
|
@ -34,14 +34,7 @@ window.onload = focusit;
|
|||
<br />
|
||||
<fieldset id="postdiv">
|
||||
<legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with page field') ?>"><?php _e('Page') ?></a></legend>
|
||||
<div id="quicktags">
|
||||
<?php
|
||||
if ('bookmarklet' != $mode) {
|
||||
echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: ';
|
||||
include('quicktags.php');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php the_quicktags(); ?>
|
||||
<?php
|
||||
$rows = get_settings('default_post_edit_rows');
|
||||
if (($rows < 3) || ($rows > 100)) {
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
<script src="quicktags.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">edToolbar();</script>
|
Loading…
Reference in New Issue