Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 66 67 68 69 70 ... 147
Use Mage::register() to add an entry into registry, Mage::registry() to retrieve data and Mage::unregister() to delete registry entry.
0 740 posted 14 years ago by vrnet
Use this to grab the first image in a post
0 1001 posted 14 years ago by howardpanton
Add custom logo to the login and dashboard of wordpress. More customization functions at: http://sixrevisions.com/wordpress/how-to-customize-the-wordpress-admin-area/
1 869 posted 14 years ago by rliverman
Code for the wordpress functions file to add a custom post type. Full doc at: http://codex.wordpress.org/Function_Reference/register_post_type http://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress
0 2938 posted 14 years ago by rliverman
Suppress button to "split summary at cursor" on node bodies that are generally short and won't ever be displayed as teasers. (These lines go in hook_form_alter functions.)
0 939 posted 14 years ago by tgbdad
Suppress the input format section of a node form when you don't really want users (even admin) to change it. Particularly handy for uncluttering forms with lots of CCK fields on them.
0 834 posted 14 years ago by tgbdad
Donwloads weren't working with https + ie6/ie7. This line solves the problem (order is important, **no-store** must be first).
0 916 posted 14 years ago by ashsa
This code is usefull for getting the list of Wordpress Sites from Multisite without sending each user id.
0 1414 posted 14 years ago by juanrossi
MacOS 10.6.5 PHP 5.3.3
0 750 posted 14 years ago by zuzara
Here is a little bit of code I use from time to time to make a generic some what safe date selector for forms. I wanted something easy, small, and not relying on images, jquery, libraries, etc... Most importantly I wanted the date that was selected t...
0 919 posted 14 years ago by brownrl
this gives you the real controller/method names, even if you reroute them.
1 1208 posted 14 years ago by aelien
0 920 posted 14 years ago by picxelplay
So i wanted to spit all my error_log(); and error_reporting(E_ALL); to syslog on my MacOSX and syslog would output it on a custom file.
0 1369 posted 14 years ago by sadus
0 1450 posted 14 years ago by irmantas
1 930 posted 14 years ago by lorenz82
Takes a Singapore Postal Code and outputs its corresponding district name
0 1112 posted 14 years ago by dougunplugged
1 ... 66 67 68 69 70 ... 147