Skip to content

Instantly share code, notes, and snippets.

@timersys
timersys / gist:7804186
Last active December 30, 2015 08:39 — forked from pippinsplugins/gist:4475625
When is not set price_id it will return a "Illegal string offset Warning" that will brake json
<?php
/*
Plugin Name: Easy Digital Downloads - Variable Pricing License Activation Limits
Plugin URL: http://easydigitaldownloads.com/extension/
Description: Limit the number of license activations permitted based on variable prices
Version: 1.0
Author: Pippin Williamson
Author URI: http://pippinsplugins.com
Contributors: mordauk
*/
@timersys
timersys / functions.php
Last active January 1, 2016 06:09
Wordpress Front end registration
/***************************
INSIDE FUNCTIONS.PHP
****************************/
/**
* Formulario de registro
*/
//change register url for our custom one
add_filter('register_url', function(){ return site_url('registrese');});
@timersys
timersys / readme.txt
Last active August 29, 2015 13:57
Wordpress Social Invitations Readme file
=== Wordpress Social Invitations ===
Author: Damian Logghe
Website: http://www.timersys.com
Contributors: Timersys
Tags: Social Invitations, twitter, facebook, linkedin, hotmail, yahoo
License: http://codecanyon.net/licenses/regular
Stable Tag: 2.4.2
Tested on: 4.0.1
== Description ==
@timersys
timersys / script.js
Last active May 28, 2020 21:06
Simple Content locker Plugin
jQuery( document ).ready(function(){
FB.Event.subscribe( 'edge.create', function( href ) {
createCookie('wptuts-lock_'+wptuts_content_locker.ID,true,9999);
location.reload(); //if you use cache maybe you want to add a ?nocache=true to this url
});
});
function createCookie( name, value, days ) {
@timersys
timersys / wordpress-social-invitations.css
Last active August 29, 2015 14:01
Wordpress Social Invitations Style
/* CSS TO MAKE ICONS A BIT SMALLER */
.service-filter-content .service-filters .divprovider {
height: 48px; /*height of the icon box*/
color: #000; /*color of the icons*/
background-color: #FFF !important; /*use important to use same background color for all boxes*/
}
.service-filters .divprovider a {
width: 59px; /*desired width of the box*/
@timersys
timersys / functions.php
Last active September 18, 2015 15:54
%%CUSTOMURL%% filter for Wordpress Social Invitations
add_filter( 'wsi/placeholders/custom_url', 'wsi_my_custom_link' );
function wsi_my_custom_link() {
return Wsi_Queue::shortenUrl('http://wp.timersys.com');
}
@timersys
timersys / wsi.css
Created May 26, 2014 20:58
Change wordpress social invitations icons
//These are the default CSS rules that you can change with yours
[class^="wsiicon-"], [class*=" wsiicon-"] {
font-family: 'wsi-social'; //Use your own font
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
background: none !important;
@timersys
timersys / server
Created May 29, 2014 12:13
Wordpress social invitations icons problem in nginx
location ~* \.(eot|otf|ttf|woff)$ {
add_header Access-Control-Allow-Origin *;
}
@timersys
timersys / cubepoints.php
Created June 11, 2014 13:15
Cubepoints in Wordpress Social Invitations
<?php
//full file located in functions/cubepoints.php
/* Hook WSI Invitations sent */
add_action( 'wsi_invitation_sent', 'wsi_points', 10 );
function wsi_points( $user_id ) {
//this is not a registered user
if( empty($user_id)) return;
@timersys
timersys / functions.php
Created August 1, 2014 19:45
disable load of javascript for Facebook, Twitter and Goggle in Popups plugin
<?php
// disable load of javascript for Facebook, Twitter and Goggle in Popups plugin http://wordpress.org/plugins/popups/
define( 'SPU_UNLOAD_FB_JS', true );
define( 'SPU_UNLOAD_TW_JS', true );
define( 'SPU_UNLOAD_GO_JS', true );