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 __set($property, $value) | |
{ | |
switch ($property) { | |
case 'host': | |
if (!preg_match("{^https?://}", $value)) { | |
$value = "http://$value"; | |
} | |
// use internal php facilities to get pure host | |
if ($url_parts = parse_url($value)) { |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
<title>Plupload - Custom example</title> | |
<!-- production --> | |
<script type="text/javascript" src="../js/plupload.full.min.js"></script> |
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
$callback = $_REQUEST['callback']; | |
// Create the output object. | |
$output = array('a' => 'Apple', 'b' => 'Banana'); | |
//start output | |
if ($callback) { | |
header('Content-Type: text/javascript'); | |
echo $callback . '(' . json_encode($output) . ');'; | |
} else { |
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 f__image_size_names_choose( $sizes ) { | |
global $_wp_additional_image_sizes; | |
if ( empty($_wp_additional_image_sizes) ) | |
return $sizes; | |
foreach ( $_wp_additional_image_sizes as $id => $data ) { | |
if ( !isset($sizes[$id]) ) | |
$sizes[$id] = ucfirst( str_replace( '-', ' ', $id ) ); | |
} | |
return $sizes; |
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 a__login_head() | |
{ | |
echo '<style type="text/css">h1 a { background: none !important; }</style>'; | |
} | |
function a__admin_head() | |
{ | |
echo '<style type="text/css">#wp-admin-bar-wp-logo { display: none !important; }</style>'; | |
} |
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
class Deferred { | |
_resolved = null | |
_rejected = null | |
_cbs = [] | |
_errorCb = null | |
then(cb) { | |
if (!this._resolved) { | |
this._cbs.push(cb) | |
} else { |
OlderNewer