Changeset 1631

Show
Ignore:
Timestamp:
09/09/04 17:51:33 (4 years ago)
Author:
saxmatt
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r1506 r1631  
    476476} 
    477477 
     478function the_quicktags () { 
     479// Browser detection sucks, but until Safari supports the JS needed for this to work people just assume it's a bug in WP 
     480if ( !strstr($_SERVER['HTTP_USER_AGENT'], 'Safari') ) : 
     481    echo ' 
     482    <div id="quicktags"> 
     483    <a href="http://wordpress.org/docs/reference/post/#quicktags" title="' .  __('Help with quicktags') . '">' . __('Quicktags') . '</a>: 
     484    <script src="quicktags.js" type="text/javascript"></script> 
     485    <script type="text/javascript">edToolbar();</script> 
     486'; 
     487    echo '</div>'; 
     488endif; 
     489} 
     490 
    478491?> 
  • trunk/wp-admin/edit-form-advanced.php

    r1599 r1631  
    9595<fieldset id="postdiv"> 
    9696       <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend> 
    97         <div id="quicktags"> 
    98 <?php 
    99     echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' .  __('Help with quicktags') . '">' . __('Quicktags') . '</a>: '; 
    100     include('quicktags.php'); 
    101 ?> 
    102 </div> 
     97<?php the_quicktags(); ?> 
    10398<?php 
    10499 $rows = get_settings('default_post_edit_rows'); 
  • trunk/wp-admin/edit-form-comment.php

    r1599 r1631  
    4040<fieldset style="clear: both;"> 
    4141        <legend><?php _e('Comment') ?></legend> 
    42         <div id="quicktags"> 
    43 <?php 
    44     echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: '; 
    45     include('quicktags.php'); 
    46 ?> 
    47 </div> 
     42<?php the_quicktags(); ?> 
    4843<?php 
    4944 $rows = get_settings('default_post_edit_rows'); 
  • trunk/wp-admin/edit-form.php

    r1599 r1631  
    5050<fieldset id="postdiv"> 
    5151    <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with post field') ?>"><?php _e('Post') ?></a></legend> 
    52         <div id="quicktags"> 
    53 <?php 
    54 if ('bookmarklet' != $mode) { 
    55     echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: '; 
    56     include('quicktags.php'); 
    57 
    58 ?> 
    59 </div> 
     52<?php the_quicktags(); ?> 
    6053<?php 
    6154 $rows = get_settings('default_post_edit_rows'); 
  • trunk/wp-admin/edit-page-form.php

    r1599 r1631  
    3535<fieldset id="postdiv"> 
    3636    <legend><a href="http://wordpress.org/docs/reference/post/#post" title="<?php _e('Help with page field') ?>"><?php _e('Page') ?></a></legend> 
    37         <div id="quicktags"> 
    38 <?php 
    39 if ('bookmarklet' != $mode) { 
    40     echo '<a href="http://wordpress.org/docs/reference/post/#quicktags" title="' . __('Help with quicktags') . '">' . __('Quicktags') . '</a>: '; 
    41     include('quicktags.php'); 
    42 
    43 ?> 
    44 </div> 
     37<?php the_quicktags(); ?> 
    4538<?php 
    4639 $rows = get_settings('default_post_edit_rows');