/bootstrap/bootstrap2.php

  1. <?php 
  2.  
  3. class Bootstrap2 extends Bootstrap 
  4. public function __construct( $plugin_version, $plugins_url ) 
  5. parent::__construct( $plugin_version, $plugins_url ); 
  6.  
  7. public function tiny_mce_before_init( $init ) 
  8. $styles = array( 
  9. array( 
  10. 'title' => 'Alert',  
  11. 'block' => 'div',  
  12. 'classes' => 'alert alert-block',  
  13. 'wrapper' => true,  
  14. ),  
  15. array( 
  16. 'title' => 'Success',  
  17. 'block' => 'div',  
  18. 'classes' => 'alert alert-success',  
  19. 'wrapper' => true,  
  20. ),  
  21. array( 
  22. 'title' => 'Info',  
  23. 'block' => 'div',  
  24. 'classes' => 'alert alert-info',  
  25. 'wrapper' => true,  
  26. ),  
  27. array( 
  28. 'title' => 'Error',  
  29. 'block' => 'div',  
  30. 'classes' => 'alert alert-error',  
  31. 'wrapper' => true,  
  32. ),  
  33. array( 
  34. 'title' => 'Well',  
  35. 'block' => 'div',  
  36. 'classes' => 'well well-large',  
  37. 'wrapper' => true,  
  38. ),  
  39. array( 
  40. 'title' => 'Well Small',  
  41. 'block' => 'div',  
  42. 'classes' => 'well well-small',  
  43. 'wrapper' => true,  
  44. ),  
  45. ); 
  46.  
  47. $styles = apply_filters( 'content_bootstrap_styles', $styles ); 
  48. $init['style_formats'] = json_encode( $styles ); 
  49. return $init; 
  50.  
  51. public function admin_head() 
  52. // bootstrsap version should be statically in admin area. 
  53. $editor_style = $this->plugins_url . '/bootstrap/bootstrap2/css/editor-style.css?ver=' . $this->plugin_version; 
  54. add_editor_style( $editor_style ); 
.