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 623 posted 12 years ago by jgomez
This snippet uses jQuery.extend() to merge the objects.
0 551 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 2825 posted 12 years ago by TimoZachi
Gets function by name.
0 740 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 824 posted 12 years ago by coprolit
0 757 posted 12 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 603 posted 12 years ago by krike
0 677 posted 12 years ago by silentpro
A couple of ideas and options...
0 452 posted 12 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 726 posted 12 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 643 posted 12 years ago by alberomo
0 551 posted 12 years ago by sudden85
This snippet lets you call a Javascript function declared within an IFrame from the parent element of the IFrame
0 1384 posted 12 years ago by alexscript
Вывод 1: Если задать функцию через jQuery.fn, то она будет работать с элементами найденными через функцию $(). Контекст этой функции будет содеÑ...
0 553 posted 12 years ago by stancox
The function returns the "sanitized" version of user input. Use before putting variables into SQL code.
0 675 posted 12 years ago by nebojsac
Function to print breadcrumb links
1 505 posted 12 years ago by stewartduffy
0 761 posted 12 years ago by olemedia
How to get a category id from the name of the category
0 679 posted 12 years ago by athanassiadis
A print_r replacement function that can handle nested arrays and strings. Usage: printr($array);
0 572 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 780 posted 13 years ago by tasmanweb
Returns the number of days in the month taking leap-years into account.
0 694 posted 13 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 597 posted 13 years ago by tasmanweb
Pagination function
0 584 posted 13 years ago by zealmurapa
Very basic dont judge!
0 723 posted 13 years ago by JonnySnip3r
0 500 posted 13 years ago by kashif21