12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?php
- if (!class_exists("plug_styled_editor")) {
- class plug_styled_editor {
- function __construct($ns) {
- $this->title = __("Styled editor","dagsopt");
- $this->pluginname = $ns->pluginname;
- $this->file = $ns->file;
- $this->ns = $ns;
- }
- function start(){
- add_action('wp_enqueue_scripts', array(&$this,'tuts_mcekit_editor_enqueue'));
- add_filter('mce_css', array(&$this,'tuts_mcekit_editor_style'));
- }
- function tuts_mcekit_editor_enqueue() {
- $StyleUrl = plugin_dir_url(__FILE__).'editor-styles.css';
- wp_enqueue_style( 'myCustomStyles', $StyleUrl );
- }
- function tuts_mcekit_editor_style($url) {
- if ( !empty($url) )
- $url .= ',';
- // Retrieves the plugin directory URL and adds editor stylesheet
- // Change the path here if using different directories
- //$url .= trailingslashit( plugin_dir_url(__FILE__) ) . '/editor-styles.css';
- $url .= trailingslashit( get_stylesheet_directory_uri() ) . 'css/bootstrap.css';
- $url .= ",".trailingslashit( get_stylesheet_directory_uri() ) . 'style.css';
- $url .= ",".trailingslashit( get_stylesheet_directory_uri() ) . 'css/custom.css';
- return $url;
- }
-
-
- function help(){
- ?>
- <?php echo(__("Adds site css style in page & post wysiwyg editor","dagsopt")) ?>
-
-
- <?php
- }
-
- function admin_line(){
- ?>
- <?php
- }
-
- }
- global $plug_styled_editor;
- $plug_styled_editor = new plug_styled_editor($this);
- $this->dagsopt['plug_styled_editor'] = $plug_styled_editor;
-
- }
|