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 446 posted 10 years ago by jgomez
This snippet uses jQuery.extend() to merge the objects.
0 420 posted 10 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 2121 posted 10 years ago by TimoZachi
Gets function by name.
0 551 posted 11 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 647 posted 11 years ago by coprolit
0 546 posted 11 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 425 posted 11 years ago by krike
0 479 posted 11 years ago by silentpro
A couple of ideas and options...
0 324 posted 11 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 543 posted 11 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 466 posted 11 years ago by alberomo
0 400 posted 11 years ago by sudden85
This snippet lets you call a Javascript function declared within an IFrame from the parent element of the IFrame
0 1125 posted 11 years ago by alexscript
Вывод 1: Если задать функцию через jQuery.fn, то она будет работать с элементами найденными через функцию $(). Контекст этой функции будет содеÑ...
0 390 posted 11 years ago by stancox
The function returns the "sanitized" version of user input. Use before putting variables into SQL code.
0 505 posted 11 years ago by nebojsac
Function to print breadcrumb links
1 360 posted 11 years ago by stewartduffy
0 564 posted 11 years ago by olemedia
How to get a category id from the name of the category
0 497 posted 11 years ago by athanassiadis
A print_r replacement function that can handle nested arrays and strings. Usage: printr($array);
0 398 posted 11 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 602 posted 11 years ago by tasmanweb
Returns the number of days in the month taking leap-years into account.
0 499 posted 11 years ago by tasmanweb
A better and more accurate function to see if a value is an integer.
0 438 posted 11 years ago by tasmanweb
Pagination function
0 439 posted 11 years ago by zealmurapa
Very basic dont judge!
0 550 posted 11 years ago by JonnySnip3r
0 372 posted 11 years ago by kashif21