An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| <?php | |
| /* | |
| * Class DBConnection | |
| * Create a database connection using PDO | |
| * @author [email protected] | |
| * | |
| * Instructions for use: | |
| * | |
| * require_once('settings.config.php'); // Define db configuration arrays here | |
| * require_once('DBConnection.php'); // Include this file |
| <?php | |
| define('WYSIWYG_META_BOX_ID', 'my-editor'); | |
| define('WYSIWYG_EDITOR_ID', 'myeditor'); //Important for CSS that this is different | |
| define('WYSIWYG_META_KEY', 'extra-content'); | |
| add_action('admin_init', 'wysiwyg_register_meta_box'); | |
| function wysiwyg_register_meta_box(){ | |
| add_meta_box(WYSIWYG_META_BOX_ID, __('WYSIWYG Meta Box', 'wysiwyg'), 'wysiwyg_render_meta_box', 'post'); | |
| } |
An introduction to curl using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
| <?php | |
| function themename_customize_register($wp_customize){ | |
| $wp_customize->add_section('themename_color_scheme', array( | |
| 'title' => __('Color Scheme', 'themename'), | |
| 'priority' => 120, | |
| )); | |
| // ============================= |
| Total props to Brian Cray: http://briancray.com/posts/estimated-reading-time-web-design/ |
| <?php | |
| /* | |
| Plugin Name: Homepage Settings for BigBang | |
| Plugin URI: http://www.inboundnow.com/ | |
| Description: Adds additional functionality to the big bang theme. | |
| Author: David Wells | |
| Author URI: http://www.inboundnow.com | |
| */ | |
| // Specify Hooks/Filters |
| <?php | |
| function folderSize ($dir) | |
| { | |
| $size = 0; | |
| foreach (glob(rtrim($dir, '/').'/*', GLOB_NOSORT) as $each) { | |
| $size += is_file($each) ? filesize($each) : folderSize($each); | |
| } |
| <?php | |
| /** | |
| * Single Product Image | |
| * | |
| * @author WooThemes | |
| * @package WooCommerce/Templates | |
| * @version 2.0.3 | |
| */ | |
| if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| /* | |
| -------------------------------- | |
| imgur Upload | |
| -------------------------------- | |
| + https://github.com/pinceladasdaweb/imgur-upload | |
| + version 1.1 | |
| + Copyright 2014 Pedro Rogerio | |
| + Licensed under the MIT license | |
| + Documentation: https://github.com/pinceladasdaweb/imgur-upload |