WordPress.org

Plugin Directory

Changeset 591398


Ignore:
Timestamp:
08/28/12 16:10:47 (20 months ago)
Author:
MarcusPope
Message:

removed filter for show_ui when iterating custom post types so plugins like catablog can be fixed [JOBID: admin]

Location:
preserved-html-editor-markup/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • preserved-html-editor-markup/trunk/readme.txt

    r590703 r591398  
    1515It also supports HTML5 Block Anchor tags, something that is currently not supported in WP even via any existing plugins. 
    1616 
    17 With version 1.3 you can now use inline CSS and JavaScript in the HTML editor and everything should be preserved.  To be clear, this applies to tags only, like `onclick` events and style definitions - not script blocks themselves.  To enable this feature you must disable the `wptexturize` and `convert_chars` filters by adding the following code to your theme's `functions.php`: 
     17Version 1.4 is just a minor patch release.  User @denl noticed a problem with the plugin CataBlog which implements its own administrative management features by disabling the 'show_ui' flag for its custom post type.  I was ignoring any custom post type that didn't have a GUI, but it was an unecessary filter that probably limited other plugins.  This fix allows any post type that supports the TinyMCE editor to be "fixed" using the tools under Admin > Settings > Writing. 
     18 
     19Since version 1.3 you can now use inline CSS and JavaScript in the HTML editor and everything should be preserved.  To be clear, this applies to tags only, like `onclick` events and style definitions - not script blocks themselves.  To enable this feature you must disable the `wptexturize` and `convert_chars` filters by adding the following code to your theme's `functions.php`: 
    1820 
    1921    remove_filter("the_content", "wptexturize"); 
     
    8587 
    8688== Changelog == 
     89= 1.4 = 
     90* Removed 'show_ui' filter for fix custom post type buttons. 
    8791= 1.3 = 
    8892* Added support for inline JavaScript and CSS, as long as the wptexturize and convert_chars filters are disabled. (Thanks to ViennaMex for pointed out the problem.) 
  • preserved-html-editor-markup/trunk/sb_preserved_markup.php

    r590703 r591398  
    88Author: Marcus E. Pope, marcuspope 
    99Author URI: http://www.marcuspope.com 
    10 Version: 1.3 
     10Version: 1.4 
    1111 
    1212Copyright 2011 Marcus E. Pope (email : me@marcuspope.com) 
     
    374374            add_settings_section('emc2_editor_insert_p', 'WYSIWYG New Line Behavior', array('MP_WP_Preserved_Markup', 'render_setting_section'), 'writing'); 
    375375 
    376             //Add settings fields for each gui'd post type that supports a wysiwyg editor 
    377             $types = get_post_types(array('show_ui' => true), "objects"); 
     376            //Add settings fields for each custom post type that supports a wysiwyg editor 
     377            $types = get_post_types(array(), "objects"); 
    378378 
    379379            foreach ($types as $id => $type) { 
     
    421421        echo "<p class='pressthis'>"; 
    422422        foreach (self::$valid_types as $o) { 
    423             echo "<a style='width: auto; padding-right: 8px; cursor: pointer;' onclick='emc2pm_fix_content(\"{$o['id']}\"); return false;' href='#'><span>Fix {$o['label']}</span></a> &nbsp; "; 
     423            echo "<a style='width: auto; margin-bottom: 10px; padding-right: 8px; cursor: pointer;' onclick='emc2pm_fix_content(\"{$o['id']}\"); return false;' href='#'><span>Fix {$o['label']}</span></a> &nbsp; "; 
    424424        } 
    425425        echo "</p>"; 
Note: See TracChangeset for help on using the changeset viewer.