snipt

Ctrl+h for KB shortcuts

Text only

Increment php upload file size (add in htaccess)

php_value post_max_size 30M
php_value upload_max_filesize 30M
https://snipt.net/embed/23b1348ea164525fe04eb511ff37121d/
/raw/23b1348ea164525fe04eb511ff37121d/
23b1348ea164525fe04eb511ff37121d
text
Text only
2
2016-12-24T10:14:27
True
False
True
Jan 11, 2014 at 01:42 PM
/api/public/snipt/105048/
increment-php-upload-file-size-add-in-htaccess
<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>php_value post_max_size 30M </span><span id="L-2"><a name="L-2"></a>php_value upload_max_filesize 30M </span></pre></div> </td></tr></table>
htaccess, php, wordpress

PHP

Wordpress - get the theme URL

<?php echo get_template_directory_uri(); ?>
https://snipt.net/embed/ba0d1bb6e4d14bcf9c8c94a71693a2e8/
/raw/ba0d1bb6e4d14bcf9c8c94a71693a2e8/
ba0d1bb6e4d14bcf9c8c94a71693a2e8
php
PHP
1
2016-12-27T22:37:50
True
False
True
Jun 14, 2013 at 10:00 AM
/api/public/snipt/64220/
wordpress-get-the-theme-url
<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="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">get_template_directory_uri</span><span class="p">();</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
wordpress

PHP

remove "edit this entry" in wordpress frontend (when you're logged)

//add it in your functions.php (on the actual theme)
add_filter( 'edit_post_link', '__return_false' );
https://snipt.net/embed/791331d65f6c0f1a69edebf37474777c/
/raw/791331d65f6c0f1a69edebf37474777c/
791331d65f6c0f1a69edebf37474777c
php
PHP
2
2019-06-21T13:55:53
True
False
True
Nov 16, 2012 at 06:33 AM
/api/public/snipt/43754/
remove-edit-this-entry-in-wordpress-frontend-when-youre-loggen
<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="x">//add it in your functions.php (on the actual theme)</span> </span><span id="L-2"><a name="L-2"></a><span class="x">add_filter( &#39;edit_post_link&#39;, &#39;__return_false&#39; );</span> </span></pre></div> </td></tr></table>
wordpress

Text only

Ftp configuration for wordpress (to avoid digit it everytime)

1
2
3
define('FTP_USER', 'ftpuser');
define('FTP_PASS', 'ftpPassword');
define('FTP_HOST', 'localhost');
https://snipt.net/embed/b03ed27cd3d0a73298841ee910c6c59f/
/raw/b03ed27cd3d0a73298841ee910c6c59f/
b03ed27cd3d0a73298841ee910c6c59f
text
Text only
3
2016-12-17T07:02:03
True
False
True
Nov 16, 2012 at 06:34 AM
/api/public/snipt/43075/
ftp-configuration-for-wordpress-to-avoid-digit-it-everytime
<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>define(&#39;FTP_USER&#39;, &#39;ftpuser&#39;); </span><span id="L-2"><a name="L-2"></a>define(&#39;FTP_PASS&#39;, &#39;ftpPassword&#39;); </span><span id="L-3"><a name="L-3"></a>define(&#39;FTP_HOST&#39;, &#39;localhost&#39;); </span></pre></div> </td></tr></table>
wordpress