Forums

[Plugin: Ad-minister] WP 2.7 Visual Editor FIX (2 posts)

  1. tiffanyabennett
    Member
    Posted 3 years ago #

    This is a great plugin, and does exactly what I wanted it to do. However, when I installed it this afternoon, it wouldn't toggle between Visual and HTML editors. My clients would have had some problems with the HTML editing, so I adjusted a few lines of code to fix the issue.

    • (Might not be necessary. But allowed me to move the Ads up into the POSTS category) In ad-minister.php, comment out the call to add_management_page and replace with this: add_submenu_page('edit.php', 'Ad-minister', 'Ad-minister', $user_level, 'ad-minister', 'administer_main');
      • replace all occurrences, plugin-wide, of tools.php with edit.php
      • replace all occurrences in ad-minister.php of sanitize_title(__('Tools')) with sanitize_title(__('Posts'))
    • Immediately after the call to wp_enqueue_script('controls'); place the following line: wp_tiny_mce();

    This applies to and was only tested in WP 2.7.

  2. Simon Fransson
    Member
    Posted 2 years ago #

    Immediately after the call to wp_enqueue_script('controls'); place the following line: wp_tiny_mce();

    It would probably be wiser to use add_action('admin_head', 'wp_tiny_mce'); instead, as the script code would otherwise print as the very first output on the page, before the doctype declaration.

Topic Closed

This topic has been closed to new replies.

About this Topic