Skip to content

Instantly share code, notes, and snippets.

@stas
Created February 13, 2012 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stas/1820220 to your computer and use it in GitHub Desktop.
Save stas/1820220 to your computer and use it in GitHub Desktop.
<?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();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment