Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 18 19 20 21 22 ... 147
One approach to get all child categories of a magento category.
0 1352 posted 13 years ago by luxmedia
This will check the date and if it is not a valid date then it will increment the month and reset the day back to one.
1 2230 posted 13 years ago by _reydin_
This will generate a random alpha numeric string 20 characters long.
1 2742 posted 13 years ago by _reydin_
I need this function all too often and figured I'd share it. Limit the_content() by word limit by using built in WordPress functions.
0 2592 posted 13 years ago by crypticsoft
this is an easy function to add a gravitar to wordpress.
0 1078 posted 13 years ago by bitsculptor
replace special characters
0 1328 posted 13 years ago by Narayon
Here is a quick example on how to generate your own portfolio with filtering based on a taxonomy (in this case 'Solutions').
0 1567 posted 13 years ago by crypticsoft
A little function to add custom styles to the tinymce editor in wordpress.
1 1349 posted 13 years ago by bitsculptor
Just a small function to sanitize the user's input of any xss and sqli. I saw a lot of ones that didn't include htmlentities or htmlspecialchars, and were still vulnerable to persistent/reflected xss.
1 1265 posted 13 years ago by TheNullByte
Extracts the video title & download URL from a youtube page and starts a download.
3 3079 posted 13 years ago by codespartan
For a project I needed to generate a unique code for each user the client would input manually. Each user would have four fields (first name, last name, email, zipcode). Omitting the email addresses ensures unique output because we reduce the chances...
0 1031 posted 13 years ago by fmdfrank
Adding HTML into custom blocks rather than hard coding makes it so people don't bother us devs to change sheite!
1 1536 posted 13 years ago by cpres
wp template naming
0 1569 posted 13 years ago by thesmu
when someone trying to or two conditions using active record database library in codeigniter
0 1379 posted 13 years ago by pruntrut
http://www.binarymoon.co.uk/2009/10/timthumb-wordpress-mu/
0 1169 posted 13 years ago by rabc
Template For Wordpress widgets.
0 1343 posted 13 years ago by paullombard
Look if the given input could be a legal VAT-number. Accepts input with or without '.' between the numbers and must contain a County-code
0 2320 posted 13 years ago by MGHollander
Straatnamen en huisnummer splitsen, hieronder diverse types straatnamen Bron: http://www.pfz.nl/archief/965267-adres-splitsen-in-straatnaam-en-huisnr/
0 1705 posted 13 years ago by MGHollander
Example calculate yesterday, but if you multiply by some number you can get in an easy way, weeks, months or years
0 2705 posted 13 years ago by satie83
HTTP headers to disable caching.
1 2553 posted 13 years ago by ryantxr
To be used in the header.php
0 1297 posted 13 years ago by certainlyakey
For more parameters: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
0 1018 posted 13 years ago by thescottlee
- Use custom image size within template (including if exist) - Add a class name to a custom image size
0 1527 posted 13 years ago by thescottlee
Note: This also uses a flat file to cache the results, be sure to also upload the 'rss_cache.txt' file. Usage: <?php>
0 1513 posted 13 years ago by crypticsoft
A function to query the 10 most recent posts on a multisite WordPress installation
0 2514 posted 13 years ago by chasecrawford
0 1393 posted 13 years ago by shufflepath
If contents is "page-name" do stuff
1 1081 posted 13 years ago by akmuraro
Checks for fake DNS as well as utilizes regex functions to check the string for proper length & characters.
0 2707 posted 13 years ago by thewickedchemist
Add this snippet to the functions.php to add 'Donate' Button on your Wordpress Website.
0 1450 posted 13 years ago by planetabhi
1 ... 18 19 20 21 22 ... 147