Skip to content

Commit 1ab6788

Browse files
committed
Fixed some bugs in the default WordPress theme (and potentially other themes).
1 parent e309dd1 commit 1ab6788

File tree

4 files changed

+51
-7
lines changed

4 files changed

+51
-7
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
wordpress-svn/
2+
.svn/

jquery-syntax/jquery-syntax.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function jq_syntax_htmlentities ($match) {
2727
} else {
2828
$code = htmlentities($match[2]);
2929
}
30-
30+
3131
return "<pre$attrs>$code</pre>";
3232
}
3333

@@ -50,13 +50,14 @@ function jq_syntax_loaded() {
5050

5151
function jq_syntax_header () {
5252
$plugin_root = plugins_url("/jquery-syntax/");
53-
$syntax_root = $plugin_root.'/jquery-syntax/';
53+
$syntax_root = $plugin_root.'jquery-syntax/';
5454

55-
?>
56-
<script type="text/javascript">
57-
jQuery.noConflict(); jQuery(document).ready(function($) { Syntax.root = "<?php echo $syntax_root ?>"; $.syntax({layout: 'table', replace: true}) });
58-
</script>
59-
<?php
55+
?>
56+
<link rel="stylesheet" href="<?php echo $plugin_root . "wp-fixes.css" ?>" type="text/css" media="screen" />
57+
<script type="text/javascript">
58+
jQuery.noConflict(); jQuery(document).ready(function($) { Syntax.root = "<?php echo $syntax_root ?>"; $.syntax({layout: 'table', replace: true}) });
59+
</script>
60+
<?php
6061
}
6162

6263
add_action('plugins_loaded', 'jq_syntax_loaded');

jquery-syntax/readme.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
=== Plugin Name ===
2+
Contributors: Samuel Williams
3+
Donate link: http://www.pledgie.com/campaigns/8915
4+
Tags: formatting, code, highlight, syntax, syntax highlighting
5+
Requires at least: 2.9
6+
Tested up to: 2.9.2
7+
Stable tag: release-1.5.1
8+
9+
jQuery.Syntax is an extremely fast and lightweight syntax highlighter.
10+
11+
== Description ==
12+
13+
jQuery.Syntax is an extremely fast and lightweight syntax highlighter. It has dynamic loading of syntax source files and integrates cleanly using CSS or modelines.
14+
15+
This WordPress plugin provides syntax highlighting using jQuery.Syntax, supporting a wide range of popular languages. Wrap code blocks with <code>&lt;pre class="syntax brush-{language}"&gt;</code> and <code>&lt;/pre&gt;</code> where <code>{language}</code> is a jQuery.Syntax supported brush.
16+
17+
If the code has already been escaped (i.e. characters such as &lt;, &gt;, have been converted to html entities), then add <code>escaped</code> into the class list: <code>&lt;pre class="syntax escaped brush-{language}"&gt;</code>. This will prevent the filter from doing this conversion automatically.
18+
19+
For more details, examples, source code, love and rainbows, please visit the project page: http://www.oriontransfer.co.nz/software/jquery-syntax/
20+
21+
== Installation ==
22+
23+
Please download and install the plugin from within WordPress.
24+
25+
Alternatively, please review the instructions available here:
26+
http://www.oriontransfer.co.nz/software/jquery-syntax/wordpress/

jquery-syntax/wp-fixes.css

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* These are purely to fix bugs in the default configuration of WordPress */
2+
3+
/* "View Raw Code" window */
4+
#syntax-raw {
5+
/* Text is centered by default in body -_- */
6+
text-align: inherit;
7+
8+
/* Default font size is too small! */
9+
font-size: 13px;
10+
}
11+
12+
/* Table alt row highlighter */
13+
table.syntax tr.alt {
14+
border-left: inherit;
15+
}

0 commit comments

Comments
 (0)