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 | |
/** | |
* | |
* @param $wp_customize Theme Customizer object | |
* @return void | |
* | |
* @since Twenty Eleven 1.3 | |
*/ | |
function ( $wp_customize ) { | |
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; |
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 | |
class my_post { | |
public function __construct() { | |
} |
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 default_thumbnail($html) { | |
global $_wp_additional_image_sizes; | |
$isize = $_wp_additional_image_sizes; | |
$w = $isize['post-thumbnail']['width']; | |
$h = $isize['post-thumbnail']['height']; | |
if (empty($html)) { | |
$html = '<figure class="default-post-thumbnail">'; | |
$html .= '<img src="http://placehold.it/'.$w.'x'.$h.'" alt="" />'; | |
$html .='</figure>'; | |
} |
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 WordPress | |
* @subpackage Core-WP | |
* @author shawnsandy | |
*/ | |
class cwp_post_type { | |
/* | |
* post vars |
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: EXT_Tweets | |
Plugin URI: http://blog.shawnsandy.com | |
Description: A WordPress drop-in plugin class for loading and displaying tweets. (Add to mu-plugin directory for auto install / use) | |
Version: 0.1 - beta | |
Author: Shawn Sandy | |
Author URI: http://shawnsandy.com | |
License: GPL2 |
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 (class_exists('WP_Customize_Control')): | |
class Selected_Users_Control extends WP_Customize_Control { | |
public $type = 'option'; | |
public $query = array('orderby' => 'nicename'); | |
public $description = ''; | |
public function render_content() { | |
$query = $this->query; |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. |
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 | |
/** create the section */ | |
$cust = Customizer_Settings::add_section('test-section', __('Custom Sections','test')); | |
/** add text control(s) ***/ | |
Customizer_Settings::add_option($cust, 'test-setting', 'Custom Setting')->customizer(); | |
Customizer_Settings::add_option($cust, 'test-setting-1', 'Another Setting 1')->customizer(); | |
/** add a checkbox control **/ | |
Customizer_Settings::add_option($cust, 'test-setting-2', 'Checkbox Option')->set_control_type('checkbox')->customizer(); | |
Customizer_Settings::add_option($cust, 'test-upload', 'Upload Control')->set_control_type('')->customizer('add_color_control'); | |
Customizer_Settings::add_option($cust, 'image-upload', 'Image Control')->set_control_type('')->customizer('add_image_control'); |
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 | |
/** | |
* | |
* @link Blog post info and description | |
*/ | |
function post_type_templates($template) { |