This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*======================= | |
Get the ID of default-language translation of any post. Note that currently this only works for 'post' type. | |
=========================*/ | |
function get_default_post_ID( $post_ID ) | |
{ | |
global $wpdb; | |
// Get default language first | |
$options = get_option( 'icl_sitepress_settings' ); | |
$default_language = $options['default_language']; | |
// Get 'trid' value for this post. Note the 'element_type' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// DLM | |
// | |
class RG_DLM { | |
public static function get_download($id) { | |
$cta = array(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package _Plugin Name | |
* @version 1.6 | |
*/ | |
/* | |
Plugin Name: Name | |
Plugin URI: URI | |
Description: Description here. | |
Author: Chris Bautista |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function geoIp($ip = null) { | |
if ($ip == null) { | |
$ip = $_SERVER['REMOTE_ADDR']; | |
} | |
$geo_array = array(); | |
$city = ""; | |
$state = ""; | |
$country = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function edebug() { | |
ini_set('display_errors', true); | |
error_reporting(E_ALL); | |
} | |
function vlog($v, $display = true) { | |
if ($display) {echo "<pre>";} else {echo "<!-- ";} | |
var_dump($v); | |
if ($display) {echo "</pre>";} else {echo " -->";} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x /? = provides syntax info and complete list of all parameters for x (a command, like “cd”) | |
cd = change directory | |
cd .. = move to the parent directory | |
cd\ = move to the root of current drive | |
cd x = move to the current\x directory | |
cd z: = change to the z root directory (as opposed to c:\) | |
copy x y = copy file x to directory y (Ex: D:\games\galaga.exe C:\programs[\awesome.exe]), [] = optional | |
copy file con = display file contents in console | |
copy con file.txt = create text file in the console window, end with ctrl+z (^z or F6) | |
date = change the date |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getComputedStyle( dom ) { | |
var style; | |
var returns = {}; | |
// FireFox and Chrome way | |
if(window.getComputedStyle){ | |
style = window.getComputedStyle(dom, null); | |
for(var i = 0, l = style.length; i < l; i++){ | |
var prop = style[i]; | |
var val = style.getPropertyValue(prop); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Node ### | |
# Logs | |
logs | |
*.log | |
# Runtime data | |
pids | |
*.pid | |
*.seed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// @Define | |
// | |
(function(){ | |
"use strict"; | |
function Class(){ | |
this.variable = ""; | |
} |