public
Last active

  • Download Gist
test_dfw.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
<?php
/*
Plugin Name: TEST_DFW
Plugin URI: http://wordpress.org/extend/plugins/test_dfw/
Description: Test_dfw Description
Version: 0.1
Author: sushkov
Author URI: http://wordpress.org/extend/plugins/test_dfw/
*/
?>
<?php
class Test_DFW {
/**
* Static constructor
*/
function init() {
add_filter('show_admin_bar', '__return_false');
add_action('template_redirect', array(__CLASS__, 'editors'));
}
 
/**
* Spawns editors
*/
function editors() {
$settings = array(
'dfw' => true
);
//// HEADER
?>
<html>
<head>
<?php wp_head(); ?>
<?php wp_print_styles(); ?>
</head>
 
<body <?php body_class(); ?>>
<?php
for ( $id=0; $id<4; $id++ ) :
//// RAINBOW OF EDITORS...
?>
<article style="width: 45%; margin-right: 10px; float: left;">
<input type="text" id="ceva_id_<?php echo $id; ?>-title" value="ceva_title_<?php echo $id; ?>">
<?php
wp_editor('Ceva_' . $id, 'ceva_id' . $id, $settings);
?>
</article>
<?php
endfor;
//// FOOTER
?>
<footer>
<?php wp_footer(); ?>
</footer>
</body>
</html>
<?php
die();
}
}
Test_DFW::init();
?>

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.