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 594 posted 11 years ago by jgomez
This snippet uses jQuery.extend() to merge the objects.
0 524 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 2750 posted 12 years ago by TimoZachi
Gets function by name.
0 700 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 791 posted 12 years ago by coprolit
0 731 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 575 posted 12 years ago by krike
0 645 posted 12 years ago by silentpro
A couple of ideas and options...
0 427 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 700 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 617 posted 12 years ago by alberomo
0 519 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 1337 posted 12 years ago by alexscript
Вывод 1: Если задать функцию через jQuery.fn, то она будет работать с элементами найденными через функцию $(). Контекст этой функции будет содеÑ...
0 521 posted 12 years ago by stancox
The function returns the "sanitized" version of user input. Use before putting variables into SQL code.
0 636 posted 12 years ago by nebojsac
Function to print breadcrumb links
1 479 posted 12 years ago by stewartduffy
0 722 posted 12 years ago by olemedia
How to get a category id from the name of the category
0 651 posted 12 years ago by athanassiadis
A print_r replacement function that can handle nested arrays and strings. Usage: printr($array);
0 545 posted 12 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 753 posted 12 years ago by tasmanweb
Returns the number of days in the month taking leap-years into account.
0 658 posted 12 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 571 posted 12 years ago by tasmanweb
Pagination function
0 559 posted 12 years ago by zealmurapa
Very basic dont judge!
0 687 posted 12 years ago by JonnySnip3r
0 478 posted 12 years ago by kashif21