Welcome To Snipplr


Everyone's Recent Snippets Tagged function



If you want to use this in a class, change the last line to: ` return array_map(array($this, __FUNCTION__), $object ); `
0 776 posted 12 years ago by jgomez
This snippet uses jQuery.extend() to merge the objects.
0 703 posted 12 years ago by viskenxp
This is a function that receives a string as an argument (along with other config optional arguments) and locates all keywords (words that appear most) from that string, returning the keywords as an array or as a string separated by commas. The funct...
2 3176 posted 12 years ago by TimoZachi
Gets function by name.
0 927 posted 12 years ago by ef
By not being limited to provide certain arguments/parameters in right order when calling a function, makes the function more versatile and easier to extend without breaking old code (e.g. calls to the function). One solution is to pass an associati...
0 988 posted 12 years ago by coprolit
0 941 posted 13 years ago by silentpro
A custom breadcrumb function for WordPress that I created for a client. You can pass 2 arguments, the first being the text you want to display in front of the breadcrumb and the second is to hide the home item in the breadcrumb It will give eac...
1 752 posted 13 years ago by krike
0 859 posted 13 years ago by silentpro
A couple of ideas and options...
0 609 posted 13 years ago by stefpretty
This is a jQuery custom function used for clearing the default input values of input fields without having to add a class or inline javascript like onclick or onblur. Just write your input and give it a value like you normally would and then add this...
1 887 posted 13 years ago by thursday0384
Description: Execute different functions when the page loads in a better way than default onload JS event. Include it in the end of the JS document. Arguments: Name of the function that you want to execute when the page loads. Author: Simon Williso...
0 844 posted 13 years ago by alberomo
0 711 posted 13 years ago by sudden85
This snippet lets you call a Javascript function declared within an IFrame from the parent element of the IFrame
0 1607 posted 13 years ago by alexscript
Вывод 1: Если задать функцию через jQuery.fn, то она будет работать с элементами найденными через функцию $(). Контекст этой функции будет содеÑ...
0 688 posted 13 years ago by stancox
The function returns the "sanitized" version of user input. Use before putting variables into SQL code.
0 820 posted 13 years ago by nebojsac
Function to print breadcrumb links
1 661 posted 13 years ago by stewartduffy
0 919 posted 13 years ago by olemedia
How to get a category id from the name of the category
0 824 posted 13 years ago by athanassiadis
A print_r replacement function that can handle nested arrays and strings. Usage: printr($array);
0 707 posted 13 years ago by tasmanweb
Parses a url correctly even with a url as query parameter, also retuns dirname, basename and extension besides the other parse_url bits. See comments for more info.
0 919 posted 13 years ago by tasmanweb
Returns the number of days in the month taking leap-years into account.
0 851 posted 13 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 739 posted 13 years ago by tasmanweb
Pagination function
0 735 posted 13 years ago by zealmurapa
Very basic dont judge!
0 892 posted 13 years ago by JonnySnip3r
0 673 posted 13 years ago by kashif21