WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] plugin button to insert a shortcode (not a link) from media_upload / library tab (2 posts)

  1. OllieJones
    Member
    Posted 1 year ago #

    Working on a plugin.
    I'd like to add a button to the library tab of the media_upload page to insert a shortcode. It's an [audio ] shortcode.

    This plugin attempts the same thing, but it stopped working a few versions of wp ago.

    http://wordpress.org/extend/plugins/audio-player/

    This discussion covers how to make something work

    http://wordpress.org/support/topic/plugin-audio-player-not-compatible-with-wordpress-34?replies=29

    But what works is the insertion of a corrupt hyperlink : you can't say href="[shortcode'" and expect anything to work.

    If you know a good way to insert a program-generated shortcode, that would be very helpful.

  2. OllieJones
    Member
    Posted 1 year ago #

    I figured this out. There's a filter not listed in the codex called media_send_to_editor. Using this filter a plugin programmer can intervene in the data sent from the media manager to the post / page editor.

Topic Closed

This topic has been closed to new replies.

About this Topic