From 164fa8588ed7af9e2de5e14ff8aef55fa5a82913 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Thu, 9 Sep 2004 17:51:33 +0000 Subject: [PATCH] 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 --- wp-admin/admin-functions.php | 13 +++++++++++++ wp-admin/edit-form-advanced.php | 7 +------ wp-admin/edit-form-comment.php | 7 +------ wp-admin/edit-form.php | 9 +-------- wp-admin/edit-page-form.php | 9 +-------- wp-admin/quicktags.php | 2 -- 6 files changed, 17 insertions(+), 30 deletions(-) delete mode 100644 wp-admin/quicktags.php diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 34c4c342f..3852daf0b 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -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 ' +
+ ' . __('Quicktags') . ': + + +'; + echo '
'; +endif; +} + ?> \ No newline at end of file diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 2912094d8..24e2d1d96 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -94,12 +94,7 @@ window.onload = focusit;
-
-' . __('Quicktags') . ': '; - include('quicktags.php'); -?> -
+ 100)) { diff --git a/wp-admin/edit-form-comment.php b/wp-admin/edit-form-comment.php index 73cfb51d2..876b655c5 100644 --- a/wp-admin/edit-form-comment.php +++ b/wp-admin/edit-form-comment.php @@ -39,12 +39,7 @@ window.onload = focusit;
-
-' . __('Quicktags') . ': '; - include('quicktags.php'); -?> -
+ 100)) { diff --git a/wp-admin/edit-form.php b/wp-admin/edit-form.php index 4c396c1f1..971cda176 100644 --- a/wp-admin/edit-form.php +++ b/wp-admin/edit-form.php @@ -49,14 +49,7 @@ window.onload = focusit;
-
-' . __('Quicktags') . ': '; - include('quicktags.php'); -} -?> -
+ 100)) { diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index e4dcec859..8d53e9ab3 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -34,14 +34,7 @@ window.onload = focusit;
-
-' . __('Quicktags') . ': '; - include('quicktags.php'); -} -?> -
+ 100)) { diff --git a/wp-admin/quicktags.php b/wp-admin/quicktags.php deleted file mode 100644 index 25256660a..000000000 --- a/wp-admin/quicktags.php +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file