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 | |
function debug ($data) { | |
echo "<script>\r\n//<![CDATA[\r\nif(!console){var console={log:function(){}}}"; | |
$output = explode("\n", print_r($data, true)); | |
foreach ($output as $line) { | |
if (trim($line)) { | |
$line = addslashes($line); | |
echo "console.log(\"{$line}\");"; | |
} |
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 | |
!defined( 'ABSPATH' ) AND exit; | |
/* | |
Plugin Name: Custom Installation Script | |
Plugin URI: http://wordpress.stackexchange.com/q/75420/12615 | |
Description: Create our own content on WP install | |
License: GPL |
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
var foo = new Array(10);//create an empty array with length 45 | |
var a = []; | |
for(var i=0;i<foo.length;i++){ | |
// document.write('Item: ' + (i+1) + ' of ' + foo.length + '<br/>'); | |
var file = 'string' + i +'.jpg'; | |
foo.push(file); | |
} | |
function Array() { |