Changeset 1567521
- Timestamp:
- 01/03/2017 11:28:16 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
richtexteditor/trunk/richtexteditor_wordpress_class.php
r1565288 r1567521 722 722 723 723 public static function editor($content, $editor_id, $settings = array()) { 724 725 $plugin_path = ""; 726 if (DEFINED('WP_PLUGIN_URL')) { 727 $plugin_path = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)) . '/'; 728 } else if (DEFINED('WP_PLUGIN_DIR')) { 729 $plugin_path = $siteurl . '/' . WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__)) . '/'; 730 } else { 731 $plugin_path = $siteurl . 'wp-content/plugins/' . basename(dirname(__FILE__)) . '/'; 732 } 733 if (is_ssl()) { 734 $siteurl = str_replace('http:', 'https:', $siteurl); 735 $plugin_path = str_replace('http:', 'https:', $this->plugin_path); 736 } 737 724 738 $set = self::parse_settings($editor_id, $settings); 725 739 … … 727 741 $rte->Name=$editor_id; 728 742 if($content!=null) 729 $rte->LoadFormData(html_entity_decode($content));743 $rte->LoadFormData(html_entity_decode($content)); 730 744 //$rte->ContentCss = get_stylesheet_directory_uri()."/css/editor-style.css"; 731 732 $rte->ContentCss =$ this->plugin_path . "richtexteditor/wp-content.css";745 //$rte->ContentCss = get_stylesheet_directory_uri()."/style.css"; 746 $rte->ContentCss =$plugin_path . "richtexteditor/wp-content.css"; 733 747 $rte->Width="100%"; 734 748 $rte->Skin="office2010silver"; … … 815 829 $rtesecurl = "?".$rtesecurl; 816 830 817 $plugin_path = ""; 818 if (DEFINED('WP_PLUGIN_URL')) { 819 $plugin_path = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__)) . '/'; 820 } else if (DEFINED('WP_PLUGIN_DIR')) { 821 $plugin_path = $siteurl . '/' . WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__)) . '/'; 822 } else { 823 $plugin_path = $siteurl . 'wp-content/plugins/' . basename(dirname(__FILE__)) . '/'; 824 } 825 if (is_ssl()) { 826 $siteurl = str_replace('http:', 'https:', $siteurl); 827 $plugin_path = str_replace('http:', 'https:', $this->plugin_path); 828 } 831 829 832 830 833 $rte->AjaxPostbackUrl = $plugin_path . "includes/wpajaxpost.php".$rtesecurl;
Note: See TracChangeset
for help on using the changeset viewer.