Skip to content

Instantly share code, notes, and snippets.

@tutweb
Created December 30, 2014 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tutweb/dc6f53ec3d328e2b03ae to your computer and use it in GitHub Desktop.
Save tutweb/dc6f53ec3d328e2b03ae to your computer and use it in GitHub Desktop.
Replace SyntaxHighlighter format to Pastacode
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[html]
', '[pastacode lang="markup" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/html]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[css]
', '[pastacode lang="css" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/css]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[js]
', '[pastacode lang="javascript" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/js]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[javascript]
', '[pastacode lang="javascript" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/javascript]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[java]
', '[pastacode lang="java" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/java]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[php]
', '[pastacode lang="php" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/php]', '</code></pre>
[/pastacode]');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '[sql]
', '[pastacode lang="sql" message="" highlight="" provider="manual"]
<pre><code>');
UPDATE wp_posts SET post_content = REPLACE ( post_content, '
[/sql]', '</code></pre>
[/pastacode]');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment