Changeset 778718
- Timestamp:
- 09/26/2013 09:02:03 AM (12 years ago)
- Location:
- typewriter/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (1 diff)
-
typewriter.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
typewriter/trunk/readme.txt
r778705 r778718 39 39 <a href="http://whatismarkdown.com" target="_blank">whatismarkdown.com</a> 40 40 41 = Do I have to convert my HTML content? = 42 43 No. You can still use normal HTML in your posts and pages. Markdown will simply ignore the HTML and only parse 44 any Markdown specific code that it finds. 45 46 = What happens to my content if I deactivate the plugin? = 47 48 Unfortunaetly your content will not be parsed by MarkdownExtra anymore and will appear like it does in the text 49 editor. In this case you would need to convert your Markdown content to normal HTML. 50 41 51 == Screenshots == 42 52 -
typewriter/trunk/typewriter.php
r778705 r778718 19 19 $this->plugin_path = plugin_dir_path( __FILE__ ); 20 20 $this->plugin_url = plugin_dir_url( __FILE__ ); 21 register_activation_hook( __FILE__, array(&$this, 'activate') ); 21 22 22 23 add_action( 'plugins_loaded', array(&$this, 'init') ); … … 37 38 } 38 39 40 function activate( $network_wide ) { 41 $this->disable_rich_editing(); 42 } 43 39 44 function init() { 40 45 load_plugin_textdomain( 'dev7-typewriter', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' ); … … 42 47 43 48 function disable_rich_editing() { 44 update_user_option( get_current_user_id(), 'rich_editing', 'false', true ); 49 //update_user_option( get_current_user_id(), 'rich_editing', 'false', true ); 50 global $wpdb; 51 $wpdb->query( "UPDATE `" . $wpdb->prefix . "usermeta` SET `meta_value` = 'false' WHERE `meta_key` = 'rich_editing'" ); 45 52 } 46 53 … … 88 95 if( !class_exists( 'Michelf\MarkdownExtra' ) ){ 89 96 spl_autoload_register(function( $class ){ 90 require_once $this->plugin_path .'includes/markdown/'. preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php';97 require_once plugin_dir_path( __FILE__ ) .'/includes/markdown/'. preg_replace('{\\\\|_(?!.*\\\\)}', DIRECTORY_SEPARATOR, ltrim($class, '\\')).'.php'; 91 98 }); 92 99 }
Note: See TracChangeset
for help on using the changeset viewer.