This file contains 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 (empty($_FILES) || $_FILES['file']['error']) { | |
die('{"OK": 0, "info": "Failed to move uploaded file."}'); | |
} | |
$chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; | |
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0; | |
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : $_FILES["file"]["name"]; |
This file contains 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
#!/bin/bash | |
sudo apt-get install -y --force-yes apache2 | |
sudo a2enmod actions | |
sudo a2enmod rewrite | |
echo "export PATH=/home/vagrant/.phpenv/bin:$PATH" | sudo tee -a /etc/apache2/envvars > /dev/null | |
echo "$(cat scripts/travis/assets/phpconfig.txt)" | sudo tee /etc/apache2/conf.d/phpconfig > /dev/null | |
echo "$(cat scripts/travis/assets/vhost.txt)" | sed -e "s,PATH,`pwd`/web,g" | sudo tee /etc/apache2/sites-available/default > /dev/null | |
echo "date.timezone = UTC" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` | |
sudo service apache2 restart |
This file contains 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 - Getting Started: Chunking</title> | |
<script type="text/javascript" src="js/plupload.full.min.js"></script> | |
</head> |
This file contains 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 - Getting Started</title> | |
<script type="text/javascript" src="js/plupload.full.min.js"></script> | |
</head> |
This file contains 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 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
add_filter( 'http_request_args', 'eshop_prevent_update_check', 10, 2 ); | |
function eshop_prevent_update_check( $r, $url ) | |
{ | |
if ( false !== strpos( $url, 'api.wordpress.org/plugins/update-check/' ) ) { | |
$my_plugin = plugin_basename( __FILE__ ); | |
$plugins = unserialize( $r['body']['plugins'] ); | |
unset( $plugins->plugins[$my_plugin] ); | |
unset( $plugins->active[array_search( $my_plugin, $plugins->active )] ); | |
$r['body']['plugins'] = serialize( $plugins ); | |
} |
This file contains 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__manage_upload_columns($columns) | |
{ | |
unset($columns['parent']); | |
$columns['better_parent'] = "Parent"; | |
return $columns; | |
} | |
function a_0_2__manage_media_custom_column($column_name, $id) | |
{ |
This file contains 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
<button class="button" onclick="wp.media.editor.open(this);jQuery('select.attachment-filters [value=uploaded]').attr( 'selected', true ).parent().trigger('change');return false;">Manage Media...</button> |
This file contains 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>'; | |
} |
This file contains 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
<div id="container"> | |
<div id="filelist">No runtime found.</div> | |
<br /> | |
<a id="pickfiles" href="javascript:;">[Select files]</a> | |
<a id="uploadfiles" href="javascript:;">[Upload files]</a> | |
</div> |
NewerOlder