Created
February 13, 2012 20:44
-
-
Save stas/1820220 to your computer and use it in GitHub Desktop.
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 | |
/* | |
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