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
| var url = 'http://www.google.com'; | |
| var load = $('<div>'); | |
| var content = ''; | |
| load.load(url, function(result){ | |
| content = load.html(); | |
| }); |
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
| var passport = require('passport'), | |
| qs = require('querystring'), | |
| request = require('request-promise'); | |
| module.exports = { | |
| authenticate: passport.authenticate('dropbox'), | |
| callback: passport.authenticate('dropbox', { | |
| failureRedirect: '/options?' + qs.stringify({success: 'Dropbox failed authentication.'}), | |
| successRedirect: '/options?' + qs.stringify({success: 'Dropbox connected.'}) | |
| }), |
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 | |
| /* | |
| Plugin Name: Grab & Save | |
| Plugin URI: http://digitalmemo.neobie.net/grab-save | |
| Author: Lim Kai Yang | |
| Author URI: http://digitalmemo.neobie.net | |
| Modified: @geilt | |
| Modified On: 11/19/2013 | |
| Version: 1.0.4 | |
| Description: This plugin allows you to fetch the remote image and save to your local wordpress. |
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 | |
| /** | |
| * Database | |
| * @package SimpulFramework | |
| * @version 1.0 | |
| */ | |
| //Start the Database Singleton. Yes I know they are evil. | |
| try { | |
| $dbh = new SimpulPDO_mySQL("mysql:host=" . DB_HOST . ";dbname=". DB_NAME, DB_USER, DB_PASSWORD); | |
| $dbh->setAttribute( SimpulPDO_mySQL::ATTR_ERRMODE, SimpulPDO_mySQL::ERRMODE_EXCEPTION ); |
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 | |
| /** | |
| * Registry | |
| * Used as an Object Store of all Data used through a page load. It is a static class with a protected static variable. | |
| * All Data is meant to be built off the registry that needs to be passed around instead of using Global Variables | |
| * @package SimpulFramework | |
| * @version 1.0 | |
| */ | |
| class Registry{ | |
| protected static $object = 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 | |
| add_action( 'admin_init', 'theme_options_init' ); | |
| add_action( 'admin_menu', 'theme_options_add_page' ); | |
| /** | |
| * Init plugin options to white list our options | |
| */ | |
| function theme_options_init(){ | |
| register_setting( 'ABTmedical_options', 'ABTmedical_theme_options', 'theme_options_validate' ); |
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 | |
| if(!function_exists('get_term_meta')): | |
| function get_term_meta($term, $taxonomy, $key, $single = false ){ | |
| if(!$taxonomy && !$term): | |
| return false; | |
| endif; | |
| if(!is_numeric($term)): | |
| $term = get_term_by('slug', $term, $taxonomy); | |
| $term = $term->term_id; | |
| endif; |
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 | |
| /* | |
| * Title: News Meta Function | |
| * Author: Alexander Conroy | |
| * Version: 1.0.1 | |
| * Website: http://www.esotech.org | |
| * Purpose: Tags Tags for Current Post and puts it in the header meta comma separated maximum 10 tags. | |
| * License: GPLv3+ | |
| */ | |
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 | |
| // Queue: Queues a function or object method to be run during do_action | |
| function add_action($action, $function, $priority = 10, $args = array()){ | |
| $GLOBALS['actions'][$action][$priority][] = array('function' => $function, 'args' => $args); | |
| } | |
| // Hook: Runs a function or a object method based on add_action | |
| function do_action($action){ | |
| $done = ''; | |
| if(!empty($GLOBALS['actions'][$action])): | |
| foreach($GLOBALS['actions'][$action] as $priorities): |
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 | |
| function isBot(){ | |
| if(!empty($_SERVER['VIA'])): | |
| return true; | |
| endif; | |
| if(!empty($_SERVER['REMOTE_PORT']) && in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554))): | |
| return true; | |
| endif; | |
| //if(!empty($_SERVER['REMOTE_ADDR']) && fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 30)): // this Causes Lag... | |
| // return false; |