Welcome To Snipplr


Everyone's Recent PHP Snippets



1 ... 13 14 15 16 17 ... 147
Outputs the content of a multi-dimensional array in the $GLOBALS['lv']
0 758 posted 11 years ago by steho
Special chars, Numbers validation.
0 940 posted 11 years ago by laxman2021
PHP script calculating the age of a customer coming from a webEdition field of the customer management.
0 656 posted 11 years ago by steho
Image file upload, javascript
0 641 posted 11 years ago by laxman2021
So, you define a couple of fake funcs and require WP database config, after this you can require wp-db.php, create new wpdb and use it independency of WP for your ajax actions.
0 719 posted 11 years ago by Zayac
Validates Numericals in a text box. Validates spaces in a text box.
0 735 posted 11 years ago by laxman2021
Add the following code to functions.php 1: WP backend 2: Appearance -> Editor 3: functions.php
0 575 posted 11 years ago by hell0world
This is some code using Thematic Child Theme overrides to remove thematic's post thumbnails and add Post Thumbnails outside of the .entry-content <div> so that POst Thumbnails can be styled separated from all post Meta. See this page for an example...
0 656 posted 11 years ago by AndrewThinkUp
I am using thesis developer version to redesign the site [FFXIV Gil](http://www.cheapffxivgils.com/ "Cheap FFXIV GIL"). Before using the code, you should add the Unique Hook Name to BOX in template(see [the official tutorial](http://diythemes.com/t...
0 538 posted 11 years ago by hell0world
Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
0 1541 posted 11 years ago by rudwolf
This is a Class that allows you create a letter with correct headers and send it to multi-emails.
0 696 posted 11 years ago by Zayac
out put a field with multiple values as a list fro styling purposes useing child selectors
0 683 posted 11 years ago by mktimes5
This is a script for a validating Email.
0 578 posted 11 years ago by laxman2021
This is a static session wrapper that handles single variables and arrays. It allows setting, resetting, and deleting session variables (without destroying the session). It regenerates the session id every time a session is started to prevent sessi...
0 688 posted 11 years ago by halk
/** * THIS FUNCTION WILL RENDER A CONTAINER OR SELF-CLOSING HTML ELEMENT. * IT AUTO DETECTS WHAT TYPE YOU WANT * BASED ON RATHER OR NOT YOU SET A _data KEY IN THE ARRAY OF * ATTRIBUTES PASSED TO THE FUNCTION * * USING AN ASSOCIATIVE ARRA...
0 771 posted 11 years ago by halk
https://gist.github.com/4098493 (examples of use below the class code) This class allows you to load a file of snippets that are really mini-templates copy them from your repository fill the token slots in them the with your data and render them as...
0 758 posted 11 years ago by halk
Sends the user to a different Drupal page. This issues an on-site HTTP redirect. The function makes sure the redirected URL is formatted correctly.
0 571 posted 11 years ago by dilios
Does not require http in the text to link. It must start with www however. Optionaly make the links popup in a new window.
0 1050 posted 11 years ago by halk
This is a public jsonp api. I use it with jQuery Like This: $.getJSON("http://yourdomain/yourpath/jsonp_api.php?method=getSchema&params=your_db_name&jsoncallback=?", function(data){ //DO SOMETHING WITH THE DATA HERE }...
1 887 posted 11 years ago by halk
Adding this snippet to the functions.php of your wordpress theme will restrict wp-admin access to certain users as defined at http://codex.wordpress.org/Roles_and_Capabilities And also still allows for user access to admin-ajax.php , async-uplo...
0 507 posted 11 years ago by jsmithies
Use it similar to in_array function of PHP.
0 849 posted 11 years ago by kosinix
A little pile of functions I use for implementing a nice var dump alternative.
0 646 posted 11 years ago by philsown
This PHP removes menu items from the WordPress dashboard
0 641 posted 11 years ago by ecksteing
This is a list of county name which is generated in php and how to echo it in Codeigniter way. Hope this help!
0 1334 posted 11 years ago by jquery404
# Método setter y getter Hace mucho tiempo usaba esta manera para tener un solo método que sea getter y setter al mismo tiempo.
0 371 posted 11 years ago by prigazzi
goes in the functions file
0 636 posted 11 years ago by thesmu
This function dosen't use curl, or any other libraries. Just include it in your function library and use it like this: $Post_result = _post('http://www.yourdomain.com/your_path/post_api.php',"method=fetchJson&params=select * from user");
0 785 posted 11 years ago by halk
A function to upload an image to the media library and set it as featured image of a post. It requires 2 params. The name of the upload field and of course the post ID. This function is part of the WPelements library class available on Github. Fee...
0 954 posted 11 years ago by krike
A usefull function to minify code or string. This is part of the WPelements library class available on Github. Feedback / suggestions / improvements are welcome.
0 528 posted 11 years ago by krike
AL subir imagen png, se deben pasar al directorio con transparencia
0 809 posted 11 years ago by thescorpion
1 ... 13 14 15 16 17 ... 147