-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4c6d3a1
Showing
8 changed files
with
256 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
=== Plugin Name === | ||
|
||
Contributors: Rachel Baker | ||
|
||
Tags: code, syntax, highlight | ||
|
||
Requires at least: 3.1 | ||
|
||
Tested up to: 3.4 | ||
|
||
Stable tag: 2.0 | ||
|
||
Uses Google's Prettify with the Sunburst syntax theme to elegantly highlight code. | ||
|
||
== Description == | ||
|
||
Uses Google Code Prettify, a JavaScript module and CSS file that allows syntax highlighting of source code snippets. | ||
|
||
This plugin contains the CSS file for the Sunburst theme syntax highlighting formatting. You can find the other available syntax highlighting themes available in the [Code Prettify Theme Gallery](http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html) | ||
|
||
|
||
== Installation == | ||
|
||
1. Add onload="prettyPrint()" to your theme's body tag in header.php | ||
2. Put code snippets in `<pre class="prettyprint">...</pre>` or `<code class="prettyprint">...</code>` and it will guess the syntax being used and highlight the code. | ||
3. You can specify a language by specifying the language extension along with the prettyprint class. | ||
Example: | ||
`<pre class="prettyprint lang-html">` | ||
The lang-* class specifies the language file extensions. | ||
4. Alternatively, you may use the HTML5 convention of embedding a code element. Example: `<pre class="prettyprint"><code class="language-java">...</code></pre> | ||
` | ||
|
||
__File extensions supported by default include:__ | ||
"bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", | ||
"java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", | ||
"xhtml", "xml", "xsl" | ||
|
||
More information is available in the Google Code Prettify Readme: [http://google-code-prettify.googlecode.com/svn/trunk/README.html](http://google-code-prettify.googlecode.com/svn/trunk/README.html) | ||
|
||
|
||
|
||
== Screenshots == | ||
|
||
![image](http://www.rachelbaker.me/sunburst-code-prettify/Sunburst-Prettify.png) | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
=== Plugin Name === | ||
|
||
Contributors: Rachel Baker | ||
|
||
Tags: code, syntax, highlight | ||
|
||
Requires at least: 3.1 | ||
|
||
Tested up to: 3.4 | ||
|
||
Stable tag: 2.0 | ||
|
||
Uses Google's Prettify with the Sunburst syntax theme to elegantly highlight code. | ||
|
||
== Description == | ||
|
||
Uses Google Code Prettify, a JavaScript module and CSS file that allows syntax highlighting of source code snippets. | ||
|
||
This plugin contains the CSS file for the Sunburst theme syntax highlighting formatting. You can find the other available syntax highlighting themes available in the [Code Prettify Theme Gallery](http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html) | ||
|
||
|
||
== Installation == | ||
|
||
1. Add onload="prettyPrint()" to your theme's body tag in header.php | ||
2. Put code snippets in `<pre class="prettyprint">...</pre>` or `<code class="prettyprint">...</code>` and it will guess the syntax being used and highlight the code. | ||
3. You can specify a language by specifying the language extension along with the prettyprint class. | ||
Example: | ||
`<pre class="prettyprint lang-html">` | ||
The lang-* class specifies the language file extensions. | ||
4. Alternatively, you may use the HTML5 convention of embedding a code element. Example: `<pre class="prettyprint"><code class="language-java">...</code></pre> | ||
` | ||
|
||
__File extensions supported by default include:__ | ||
"bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html", | ||
"java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh", | ||
"xhtml", "xml", "xsl" | ||
|
||
More information is available in the Google Code Prettify Readme: [http://google-code-prettify.googlecode.com/svn/trunk/README.html](http://google-code-prettify.googlecode.com/svn/trunk/README.html) | ||
|
||
|
||
|
||
== Screenshots == | ||
|
||
![image](http://www.rachelbaker.me/sunburst-code-prettify/Sunburst-Prettify.png) | ||
|
||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: WordPress Plugin Boilerplate\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2011-07-11 12:22-0500\n" | ||
"PO-Revision-Date: 2011-07-11 12:22-0500\n" | ||
"Last-Translator: \n" | ||
"Language-Team: Tom McFarlin <tom@tommcfarlin.com>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"X-Poedit-KeywordsList: __;_e\n" | ||
"X-Poedit-Basepath: .\n" | ||
"X-Poedit-Language: English\n" | ||
"X-Poedit-Country: UNITED STATES\n" | ||
"X-Poedit-SourceCharset: utf-8\n" | ||
"X-Poedit-SearchPath-0: ..\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
/* | ||
Plugin Name: Sunburst Code Prettify | ||
Plugin URI: http://www.rachelbaker.me/code | ||
Description: Uses Google's Prettify with the Sunburst syntax theme to elegantly highlight code | ||
Version: 2.0 | ||
Author: Rachel Baker | ||
Author URI: http://www.rachelbaker.me | ||
Author Email: rachel@rachelbaker.me | ||
License: | ||
Copyright 2011 Plugged In Consulting, Inc (email@domain.com) | ||
This program is free software; you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License, version 2, as | ||
published by the Free Software Foundation. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
|
||
|
||
/*--------------------------------------------* | ||
* Loading the needed CSS and JS Files | ||
*--------------------------------------------*/ | ||
|
||
function sunprettify_style_loader() { | ||
$sunprettify_styleurl = plugins_url('sunburst-prettify.css', __FILE__); | ||
$sunprettify_stylefile = WP_PLUGIN_DIR . '/sunburst-code-prettify/sunburst-prettify.css'; | ||
wp_register_style('sunprettify_css', $sunprettify_styleurl); | ||
wp_enqueue_style( 'sunprettify_css'); | ||
} | ||
|
||
|
||
function sunprettify_script_loader() { | ||
$sunprettify_scripturl = plugins_url('prettify.js', __FILE__); | ||
$sunprettify_scriptfile = WP_PLUGIN_DIR . '/sunburst-code-prettify/prettify.js'; | ||
wp_register_script('sunprettify_js', $sunprettify_scripturl, '', '', true); | ||
wp_enqueue_script( 'sunprettify_js'); | ||
} | ||
|
||
add_action('wp_print_scripts', 'sunprettify_script_loader'); | ||
add_action('wp_print_styles', 'sunprettify_style_loader'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.