Skip to content

Instantly share code, notes, and snippets.

View Tmeister's full-sized avatar
🇲🇽
Working from home

Enrique Chavez Tmeister

🇲🇽
Working from home
View GitHub Profile
add_filter( 'pl_activate_url', array( &$this, 'activation_url') );
function activation_url($url){
return home_url() . '?tablink=Sophistique&tabsublink=welcome';
}
@Tmeister
Tmeister / 0_reuse_code.js
Created November 5, 2013 00:25
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
/**
* Plugin Name: Disable all plugins
* Plugin URI: https://gist.github.com/JCPry/8026015
* Description: Short-circuits the function in WordPress that determines which plugins are activated, and tells WordPress that no plugins are activated
* Version: 1.0
* Author: Jeremy Pry
* Author URI: http://jeremypry.com/
*/
@Tmeister
Tmeister / gist:9648208
Created March 19, 2014 18:32
Collision Checker
if( heroBounces.intersects(play.enemy.getBounds(play)) || heroBounces.intersects(play.enemy1.getBounds(play)))
{
play.over();
}
@Tmeister
Tmeister / gist:9648242
Last active August 29, 2015 13:57
Hero Jumping
public function update():void
{
if( _isJumping )
{
this.y -= ( jumpPower - gravity);
jumpPower -= 2;
if(this.y + gravity > groundBase)
{
this.y = groundBase;
@Tmeister
Tmeister / menu-locator.php
Created March 31, 2014 18:53
Find a TOP parent menu object according to the current page viewed
<?php
/**
* Menu Inspector
*
* Find a TOP parent menu object according to the current page viewed
*
* @package MenuLocator
* @author Enrique Chavez <noone@tmeister.net>
* @license GPL-2.0+
<?php
function ec_mail_name( $email ){
return 'Joe Doe'; // new email name from sender.
}
add_filter( 'wp_mail_from_name', 'ec_mail_name' );
<?php
function ec_mail_from ($email ){
return 'joe@doe.com'; // new email address from sender.
}
add_filter( 'wp_mail_from', 'ec_mail_from' );
@Tmeister
Tmeister / custom.css
Created August 22, 2014 17:15
Custom CSS to Add Logo to Voyant Mobile Menu
.section-menu-voyant .voyant-mobile-nav .voyant-menu-holder{
width: 100%;
margin-left: 0;
}
.section-menu-voyant .voyant-mobile-nav .voyant-menu-holder:before{
/*Replace with your logo URL*/
background: url('http://3z6cyh36dph41r69gi2tjn07r24.wpengine.netdna-cdn.com/wp-content/uploads/2014/04/voyant4.png') no-repeat;
background-size: contain;
background-position-y: 5px;