Skip to content

Instantly share code, notes, and snippets.

<?php
function updatedb($data){
//Global varibales
global $wpdb;
//Grab our userid We'll need this for later
$user_ID = get_current_user_id();
//this is to check if this user has a DB entry or not...
$result = $wpdb->get_results ("SELECT id FROM markers WHERE userID = '".$user_ID."'");
/*********************************
public function addattribute($csvvalue, $attvalue, $attname, $position){
$attheight = get_term_by( 'name', $csvvalue, $attvalue );
if(!$attheight){
$attheightnew = wp_insert_term( $csvvalue, $attvalue);
$attheightnewtest = get_term_by( 'id', $attheightnew['term_id'], $attvalue );
$product_attributes = array(
//Make sure the 'name' is same as you have the attribute
'name' => $attvalue,
'value' => $csvvalue,
'position' => $position,
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Red Hat | Un toque de clase para tus galas, cenas y eventos.</title>
<link rel="shortcut icon" href="0.archivos/favicon.ico">
<link href="0.archivos/estilos.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="4.veryescuchar/jsfp/jquery.fullPage.css" />
<?php
include_once('cabezera.php');
?>
<body>
<?php
Include_once('menu.php');
?>
CONTENIDO DE LA PAGINA
<?php
include_once('piedepagina.php');
/**
* fullPage 2.6.6
* https://github.com/alvarotrigo/fullPage.js
* MIT licensed
*
* Copyright (C) 2013 alvarotrigo.com - A project by Alvaro Trigo
*/
html.fp-enabled,
.fp-enabled body {
margin: 0;
@vimes1984
vimes1984 / groups.php
Created October 23, 2015 12:58
Adding users to groups depending on dropdown
<?php
/*
*
*hooking into buddypress's user sgin up to give users roles..
*
*/
add_action('bp_core_signup_user', 'custom_signup', 10, 5);
public function custom_signup($user_id, $user_login, $user_password, $user_email, $usermeta){
<?php
/**
*
*
*
*
**/
public function runimport(){
global $woocommerce;
$cmscsvpath = realpath(dirname(__FILE__)).'/imports/cms.csv';
<?php
var $mappingscms = array();
public function parse_file_cms($filename){
$id = fopen($filename, "r"); //open the file
$data = fgetcsv($id, filesize($filename)); /*This will get us the */
/*main column names */
if(!$this->mappingscms){
$this->mappingscms = $data;
}
@vimes1984
vimes1984 / testcommand.js
Last active December 23, 2015 23:56
Awefile
command('roll', function rollfunction(parameters, player){
// parameters[0] = maxx;
// parameters[1] = modifier;
// parameters = [maxx,modifier,etc,etc,etc];
var max = parameters[0];
var modifier = parameters[1];
var randnumb = Math.random();
var float = randnumb * maxx;
add_action( 'woocommerce_product_options_general_product_data', __CLASS__ . '::subscription_pricing_fields' );
function remove_prcing(){
remove_action('woocommerce_product_options_general_product_data','WC_Subscriptions_Admin::subscription_pricing_fields' );
}
add_action('init', 'remove_prcing');