WordPress.org

Ready to get started?Download WordPress

Forums

Pulling user profile data into a TinyMCE plugin (2 posts)

  1. Daniel Bachhuber
    Hand Built
    Posted 5 years ago #

    I'd like to pull information that the user sets in their profile into a TinyMCE plugin. Any ideas as to how this might be possible (outside of a direct database connection from the TinyMCE plugin)?

  2. Daniel Bachhuber
    Hand Built
    Posted 5 years ago #

    What I've ended up doing is using the SACK library that's included with WordPress. The JS I include in the header of the flat HTML file within a TinyMCE plugin (the one that's reserved for the dialog box). I've still got two problems however:

    • die('var a = "' . $a . '";'); won't pass the variable to my script. Having it die with an alert() does work, however, so I don't know whether it's a library issue or a JS issue. Darn Javascript.
    • As far as I can tell, there's no way to get the $post->ID when hooking a function onto wp_ajax (which is necessary because I want to call a custom field).

    Any thoughts, feedback, or violent dissent would be greatly appreciated!

Topic Closed

This topic has been closed to new replies.

About this Topic