Skip to content

Instantly share code, notes, and snippets.

View rakeshkumar125's full-sized avatar

Rakesh Kumar rakeshkumar125

View GitHub Profile
@rakeshkumar125
rakeshkumar125 / php-Validation-class-structure
Last active July 31, 2016 14:03
this class include all rule that can be used for the form validation.
<?php
// Class Defination starts here.
//include('connection.php');
// above class include for connect datbase connection
class validator{
var $array_to_validate = "";
var $email = "";
<?php
/*
Template Name: User Template
*/
get_header();
echo $user_id = ($wp_query->query_vars['user_id'] ? $wp_query->query_vars['user_id'] : '0');
get_footer();
?>
function add_query_vars($aVars) {
$aVars[] = "user_id";
return $aVars;
}
// hook add_query_vars function into query_vars
add_filter('query_vars', 'add_query_vars');
function add_rewrite_rules($aRules) {
wp_enqueue_style(
'fancyboxstyles',
WP_PLUGIN_URL.'/chat/custom.css',
false,
all);
function my_init() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js', false, '1.3.2', true);