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 | |
| 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 | |
| /** | |
| * 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 | |
| /** | |
| * 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 | |
| /* | |
| 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
| 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
| 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
| function findArgs(params, callback) { | |
| params.args.sort = { key : 1, order: 0}; | |
| var type = ''; | |
| if(params.args.hasOwnProperty('type')) { | |
| type = params.args.type; | |
| delete params.args.type; | |
| } | |
| var finder = Meta.find(params.args) | |
| .then( function(meta) { |