From 44de1ee11b725cce32ffd3cbd99f7c81fd211a2c Mon Sep 17 00:00:00 2001 From: Matt Mullenweg 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: https://develop.svn.wordpress.org/trunk@1631 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 34c4c342f5..3852daf0bd 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 2912094d8c..24e2d1d965 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 73cfb51d21..876b655c5b 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 4c396c1f1e..971cda1767 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 e4dcec8590..8d53e9ab3a 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 25256660aa..0000000000 --- a/wp-admin/quicktags.php +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file