Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 82 83 84 85 86 ... 147
I\'ve added an additional case to handle videos linked from a user\'s channel.
2 1206 posted 14 years ago by Jamie
This code adds the specified library to the header in WordPress unless you are in the admin section.
2 770 posted 14 years ago by jonkemp
1 498 posted 14 years ago by neillh
0 594 posted 14 years ago by iqwebdev
Given a string of a file name, return the extension
1 835 posted 14 years ago by r4b87
Separate the URL of the current page into an array of strings
1 728 posted 14 years ago by r4b87
2 764 posted 14 years ago by brainwaves
By default, this template will use the page title as the category to pull from – but you can also create a custom field with ‘category’ as the name and the preferred category name as the value.
1 737 posted 14 years ago by trepmal
Just a quick fix for a tag link issue I came across.\r\n\r\nbroken url:\r\ndomain.com/tag/two word.html\r\n\r\nif you take the spaces in the URL and replace them with pluses (‘+’) it’ll work. For example:\r\n\r\nfixed url:\r\ndomain.com/tag/two...
0 674 posted 14 years ago by trepmal
3 826 posted 14 years ago by trepmal
I use this as a starting point for widgets/plugins I develop.
1 843 posted 14 years ago by trepmal
I don't recommend this, it just needed it for a particular situation. Does not work with dropdowns.
0 779 posted 14 years ago by trepmal
1 980 posted 14 years ago by mfigge
This example shows how to delete specific files after a given time span. This works good for cleaning cached files.
1 767 posted 14 years ago by fackz
Geo Mashup contextual maps display the results of a WordPress query, so they can be very useful in combination with the WordPress `query_posts` function. This example maps post with an example tag, but any call to `query_posts` could be substituted....
0 839 posted 14 years ago by cyberhobo
2 730 posted 14 years ago by stuntsnippets
I used this plugin to create new roles/capabilities: http://wordpress.org/extend/plugins/capsman/
1 544 posted 14 years ago by seafae
When retrieving table rows with PHP and prepared statements, you must use a method called bind_result() and pass in a variable name for each column that is being returned from the database. For example, if you are selecting three columns (say, id, ti...
3 1193 posted 14 years ago by Nettuts
Hacer una redireccion permanente
2 795 posted 14 years ago by jrobinsonc
The current time, converted from UNIX timestamp to use in MySQL DATETIME
0 998 posted 14 years ago by koko
<img>
1 922 posted 14 years ago by stuntsnippets
Courtesy of Dorphalsig on php.net (see URL above)
1 755 posted 14 years ago by Moridin
I needed to create several pages that didn't use any models and contained static data inside the default layout. My first thought was to create a controller for these pages and define an action for each static page I needed. However, this solution se...
0 655 posted 14 years ago by TioSolid
$search_string - переменная для поиска
0 773 posted 14 years ago by stancox
run as callback from form_validation->setrules ex: $this->form_validation->set_rules('cc_number','Credit Card #','required|max_length[20]|callback_alpha_dash_space');
0 792 posted 14 years ago by myke
use 'custom_more' as custom field
2 716 posted 14 years ago by screamwork
1 ... 82 83 84 85 86 ... 147