snipt

Ctrl+h for KB shortcuts

Text only

Snipt WordPress

[snipt]4bd157c1e02f913d82d5fb7107e70cef[/snipt]
https://snipt.net/embed/308562f7470742a27ed67fb6e77b3498/
/raw/308562f7470742a27ed67fb6e77b3498/
308562f7470742a27ed67fb6e77b3498
text
Text only
1
2019-07-23T07:41:36
True
False
False
/api/public/snipt/41212/
snipt-wordpress
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>[snipt]4bd157c1e02f913d82d5fb7107e70cef[/snipt] </span></pre></div> </td></tr></table>

JavaScript

Snipt Java Embed

<script type="text/javascript" src="https://snipt.net/embed/4bd157c1e02f913d82d5fb7107e70cef/"></script>
https://snipt.net/embed/2c5c8b4218f77272a83fb90373ac1e66/
/raw/2c5c8b4218f77272a83fb90373ac1e66/
2c5c8b4218f77272a83fb90373ac1e66
js
JavaScript
1
2019-08-20T09:02:24
True
False
False
/api/public/snipt/41211/
snipt-java-embed
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="o">&lt;</span><span class="nx">script</span> <span class="nx">type</span><span class="o">=</span><span class="s2">&quot;text/javascript&quot;</span> <span class="nx">src</span><span class="o">=</span><span class="s2">&quot;https://snipt.net/embed/4bd157c1e02f913d82d5fb7107e70cef/&quot;</span><span class="o">&gt;&lt;</span><span class="err">/script&gt;</span> </span></pre></div> </td></tr></table>
java, snipt

PHP

Snipt.net WordPress Shortcode

1
2
3
4
5
// add support for snipt.net
function snipt_shortcode( $atts, $content = null ) {
   return "<script type='text/javascript' src='http://snipt.net/embed/" . $content . "'></script>";
}
add_shortcode( 'snipt', 'snipt_shortcode' );
https://snipt.net/embed/4bd157c1e02f913d82d5fb7107e70cef/
/raw/4bd157c1e02f913d82d5fb7107e70cef/
4bd157c1e02f913d82d5fb7107e70cef
php
PHP
5
2019-08-20T09:02:43
True
False
False
/api/public/snipt/41210/
sniptnet-wordpress-shortcode
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">// add support for snipt.net</span> </span><span id="L-2"><a name="L-2"></a><span class="x">function snipt_shortcode( $atts, $content = null ) {</span> </span><span id="L-3"><a name="L-3"></a><span class="x"> return &quot;&lt;script type=&#39;text/javascript&#39; src=&#39;http://snipt.net/embed/&quot; . $content . &quot;&#39;&gt;&lt;/script&gt;&quot;;</span> </span><span id="L-4"><a name="L-4"></a><span class="x">}</span> </span><span id="L-5"><a name="L-5"></a><span class="x">add_shortcode( &#39;snipt&#39;, &#39;snipt_shortcode&#39; );</span> </span></pre></div> </td></tr></table>
shortcode, snipt, wordpress

Text only

GChart Shortcode

[gchart id="26611"]
https://snipt.net/embed/ed79a16c8620cf7be396c557a19e9dd1/
/raw/ed79a16c8620cf7be396c557a19e9dd1/
ed79a16c8620cf7be396c557a19e9dd1
text
Text only
1
2019-08-19T19:34:33
True
False
False
/api/public/snipt/39463/
gchart-shortcode
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>[gchart id=&quot;26611&quot;] </span></pre></div> </td></tr></table>

PHP

yoast breadcrumb

1
2
3
<?php if ( function_exists('yoast_breadcrumb') ) {
	yoast_breadcrumb('<ul class="breadcrumbs"><li><span>','</span></li></ul>');
} ?>
https://snipt.net/embed/5ded47ab3e550f80aade793cff3b3493/
/raw/5ded47ab3e550f80aade793cff3b3493/
5ded47ab3e550f80aade793cff3b3493
php
PHP
3
2019-08-21T04:59:18
True
False
False
/api/public/snipt/37530/
yoast-breadcrumb
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">if</span> <span class="p">(</span> <span class="nb">function_exists</span><span class="p">(</span><span class="s1">&#39;yoast_breadcrumb&#39;</span><span class="p">)</span> <span class="p">)</span> <span class="p">{</span> </span><span id="L-2"><a name="L-2"></a> <span class="nx">yoast_breadcrumb</span><span class="p">(</span><span class="s1">&#39;&lt;ul class=&quot;breadcrumbs&quot;&gt;&lt;li&gt;&lt;span&gt;&#39;</span><span class="p">,</span><span class="s1">&#39;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&#39;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="p">}</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
breadcrumb, yoast

PHP

Change WordPress Autosave Interval from 60 to 300 sec

define('AUTOSAVE_INTERVAL', 300 ); // change WP autosave interval from 60 seconds to 300 seconds
https://snipt.net/embed/b817cc7d6ad7f08302030ee1aeffcb89/
/raw/b817cc7d6ad7f08302030ee1aeffcb89/
b817cc7d6ad7f08302030ee1aeffcb89
php
PHP
1
2019-08-14T13:51:21
True
False
False
/api/public/snipt/32518/
change-wordpress-autosave-interval-from-60-to-300-sec
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="x">define(&#39;AUTOSAVE_INTERVAL&#39;, 300 ); // change WP autosave interval from 60 seconds to 300 seconds</span> </span></pre></div> </td></tr></table>
autosave

MySQL

Delete all post revisions

DELETE FROM wp_posts WHERE post_type = "revision";
-- where wp_posts is your WordPress table for posts
https://snipt.net/embed/1020d37ea219772e110648fa22f95208/
/raw/1020d37ea219772e110648fa22f95208/
1020d37ea219772e110648fa22f95208
mysql
MySQL
2
2019-08-16T04:29:32
True
False
False
/api/public/snipt/32517/
delete-all-post-revisions
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">DELETE</span> <span class="k">FROM</span> <span class="n">wp_posts</span> <span class="k">WHERE</span> <span class="n">post_type</span> <span class="o">=</span> <span class="s2">&quot;revision&quot;</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">-- where wp_posts is your WordPress table for posts</span> </span></pre></div> </td></tr></table>
revision