WordPress.org

Plugin Directory

Changeset 487887


Ignore:
Timestamp:
01/11/12 02:01:30 (2 years ago)
Author:
mattwiebe
Message:

Disable visual editor when editing Markdown

Location:
markdown-on-save-improved/tags/2.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • markdown-on-save-improved/tags/2.0/markdown-on-save.php

    r482884 r487887  
    33Plugin Name: Markdown on Save Improved 
    44Description: Allows you to compose content in Markdown on a per-item basis from WP admin or mobile/3rd-party apps. The markdown version is stored separately, so you can deactivate this plugin and your posts won't spew out Markdown. Based on <a href="http://wordpress.org/extend/plugins/markdown-osi/">Mark Jaquith's plugin</a>. 
    5 Version: 2.0 
     5Version: 2.0.1 
    66Author: Matt Wiebe 
    77Author URI: http://somadesign.ca/ 
     
    3434        add_filter( 'edit_post_content_filtered', array( $this, 'edit_post_content_filtered' ), 10, 2 ); 
    3535        add_action( 'xmlrpc_call', array($this, 'xmlrpc_actions') ); 
     36        add_action( 'load-post.php', array( $this, 'load' ) ); 
     37        add_action( 'load-post-new.php', array( $this, 'load') ); 
    3638    } 
    3739     
     
    7173        } 
    7274        return $posts; 
     75    } 
     76     
     77    public function load() { 
     78        if ( ! ( isset( $_GET['post'] ) && ! $this->is_markdown( $_GET['post'] ) ) ) { 
     79            add_filter( 'user_can_richedit', '__return_false', 99 ); 
     80        } 
    7381    } 
    7482 
  • markdown-on-save-improved/tags/2.0/readme.txt

    r483155 r487887  
    44Requires at least: 3.2 
    55Tested up to: 3.3 
    6 Stable tag: 2.0 
     6Stable tag: 2.0.1 
    77 
    88Markdown + WordPress = writing bliss. The markdown version is stored separately, so you can deactivate this plugin and your posts won't spew out Markdown. 
     
    5858== Changelog == 
    5959 
     60= 2.0.1 = 
     61 
     62* Disable visual editor when editing Markdown 
     63 
    6064= 2.0 = 
    6165 
Note: See TracChangeset for help on using the changeset viewer.