Skip to content

Must-Use Plugin: tweetable_callouts

Location: _project/_web/wp-content/mu-plugins/tweetable_callouts/

Purpose

Adds a TinyMCE editor button ("button_green") that wraps selected text in tweetable extract markup. Editors can highlight text and click the button to create shareable quotes.

How It Works

  1. Hooks into admin_init to register TinyMCE plugin
  2. Adds button_green to the TinyMCE button row via mce_buttons
  3. Loads external JS plugin via mce_external_plugins
  4. Passes the current post permalink to JavaScript via before_wp_tiny_mce

Files

  • index.php — Main plugin file with all logic