snipt

Ctrl+h for KB shortcuts

PHP

Fishpig - Run Wordpress Shortcode in Magento

1
2
3
4
<?php
    $shortcode = '[cm_simple_form id=1]';
    echo Mage::helper('wordpress/filter')->process($shortcode);
?>
https://snipt.net/embed/2ba824b6e0854f3956d93060d1ad2c6c/
https://snipt.net/raw/2ba824b6e0854f3956d93060d1ad2c6c/
2ba824b6e0854f3956d93060d1ad2c6c
php
PHP
4
2016-09-25T08:35:56
True
False
False
/api/public/snipt/147561/
fishpig-run-wordpress-shortcode-in-magento
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a> <span class="nv">$shortcode</span> <span class="o">=</span> <span class="s1">&#39;[cm_simple_form id=1]&#39;</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a> <span class="k">echo</span> <span class="nx">Mage</span><span class="o">::</span><span class="na">helper</span><span class="p">(</span><span class="s1">&#39;wordpress/filter&#39;</span><span class="p">)</span><span class="o">-&gt;</span><span class="na">process</span><span class="p">(</span><span class="nv">$shortcode</span><span class="p">);</span> </span><span id="L-4"><a name="L-4"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
Fishpig, Magento, PHP, Wordpress

PHP

Disabled media discovery for Wordpress Press This

1
2
3
// add to child theme functions.php
// --
add_filter( 'enable_press_this_media_discovery', '__return_false' );
https://snipt.net/embed/72ed53d69287fae8d64df8168710efed/
https://snipt.net/raw/72ed53d69287fae8d64df8168710efed/
72ed53d69287fae8d64df8168710efed
php
PHP
4
2016-09-21T21:26:16
True
False
False
Feb 24, 2016 at 12:19 PM
/api/public/snipt/144424/
disabled-media-discovery-for-wordpress-press-this
<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 id="L-1"><a name="L-1"></a><span class="x">// add to child theme functions.php</span> </span><span id="L-2"><a name="L-2"></a><span class="x">// --</span> </span><span id="L-3"><a name="L-3"></a><span class="x">add_filter( &#39;enable_press_this_media_discovery&#39;, &#39;__return_false&#39; );</span> </span></pre></div> </td></tr></table>
"Press This", Wordpress

Text only

Script voor automatisch forwarden naar andere pagina

1
2
3
<script>// <![CDATA[
setTimeout("top.location.href = 'http://app.argenta.be/nl/'",100);
// ]]></script>
https://snipt.net/embed/89e15258da2f1495066fa3d13e0af683/
https://snipt.net/raw/89e15258da2f1495066fa3d13e0af683/
89e15258da2f1495066fa3d13e0af683
text
Text only
3
2016-09-21T18:00:25
True
False
False
Oct 08, 2015 at 03:20 AM
/api/public/snipt/141573/
script-voor-automatisch-forwarden-naar-andere-pagina
<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 id="L-1"><a name="L-1"></a>&lt;script&gt;// &lt;![CDATA[ </span><span id="L-2"><a name="L-2"></a>setTimeout(&quot;top.location.href = &#39;http://app.argenta.be/nl/&#39;&quot;,100); </span><span id="L-3"><a name="L-3"></a>// ]]&gt;&lt;/script&gt; </span></pre></div> </td></tr></table>
Wordpress, automatisch, foward, javascript, redirect

PHP

Register De-Register jQuery in Wordpress

wp_deregister_script('jquery');
wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js', false, null, false);
https://snipt.net/embed/c99595274f18e0825e4eb1757994e5c6/
https://snipt.net/raw/c99595274f18e0825e4eb1757994e5c6/
c99595274f18e0825e4eb1757994e5c6
php
PHP
2
2016-09-21T21:26:51
True
False
False
Mar 25, 2014 at 08:13 AM
/api/public/snipt/124607/
register-de-register-jquery-in-wordpress
<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 id="L-1"><a name="L-1"></a><span class="x">wp_deregister_script(&#39;jquery&#39;);</span> </span><span id="L-2"><a name="L-2"></a><span class="x">wp_register_script(&#39;jquery&#39;, &#39;//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&#39;, false, null, false);</span> </span></pre></div> </td></tr></table>
"Register jQuery", Wordpress

PHP

Include Wordpress Path

<?php include (TEMPLATEPATH . '/header2.php'); ?>
https://snipt.net/embed/74e84630d10615934ffa3a4f9a18ab86/
https://snipt.net/raw/74e84630d10615934ffa3a4f9a18ab86/
74e84630d10615934ffa3a4f9a18ab86
php
PHP
1
2016-09-21T21:27:32
True
False
False
May 29, 2013 at 03:29 PM
/api/public/snipt/62530/
include-wordpress-path
<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 id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">include</span> <span class="p">(</span><span class="nx">TEMPLATEPATH</span> <span class="o">.</span> <span class="s1">&#39;/header2.php&#39;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
Wordpress, include, path
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.