Title: Add a tinyMCE plugin   WordPress functionality
Last modified: August 21, 2016

---

# Add a tinyMCE plugin WordPress functionality

 *  [ImanGM](https://wordpress.org/support/users/credo61/)
 * (@credo61)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/add-a-tinymce-plugin-wordpress-functionality/)
 * Hi,
 * I’ve added a button to tinyMCE which loads a php file into the iframe.
    Actually
   it’s a shortcode manager and I need to use some wordpress functionality such 
   as translation functions or getting categories list or …
 * To do this, I need to include wp-load.php and every thing works great with it.
   But I read on the forums that including wp-load.php is not a good practice at
   all!
 * So what’s the best solution for my problem? Is there any way to load tinyMCE 
   plugin without loading it within iframe or is there any other way to use wordpress
   functions in a file which is loaded into iframes or popups?
 * Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/add-a-tinymce-plugin-wordpress-functionality/#post-3862049)
 * I don’t know much about TinyMCE, but anything done in an iframe could be done
   directly on a page. For example, the `wp_editor()` function builds containers
   for the tabs, buttons, content and the rest is handled with javascript, no iframes
   involved.
 * Either way, it does not help you access WP functions without wp-load.php being
   included or required somewhere. You could use AJAX or load your page as a template
   to avoid including wp-load.php, but it’s being included somewhere none the less,
   just not by you.
 * AFAIK, the main issue with including wp-load.php is it’s difficult reliably know
   where it is located on any random installation. If this is for your own site 
   and not for distribution, I personally would go ahead and leave things as they
   are, but do use something like `require_once()` to ensure it is not reloaded 
   unnecessarily.
 *  Thread Starter [ImanGM](https://wordpress.org/support/users/credo61/)
 * (@credo61)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/add-a-tinymce-plugin-wordpress-functionality/#post-3862092)
 * I’ve used admin-ajax.php to load my content into tinyMCE plugin iframe without
   including wp-load.php.
 * thanks
 *  [Ram Ratan Maurya](https://wordpress.org/support/users/mauryaratan/)
 * (@mauryaratan)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/add-a-tinymce-plugin-wordpress-functionality/#post-3862226)
 * Hey credo61,
    I’ve been working on something too similar but for me popup just
   won’t work unless I load wp-load.php. Could you help me with what workaround 
   did you get for this problem?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add a tinyMCE plugin WordPress functionality’ is closed to new replies.

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [iframe](https://wordpress.org/support/topic-tag/iframe/)
 * [popup](https://wordpress.org/support/topic-tag/popup/)
 * [require()](https://wordpress.org/support/topic-tag/require/)
 * [tinymce](https://wordpress.org/support/topic-tag/tinymce/)
 * [wp-load.php](https://wordpress.org/support/topic-tag/wp-load-php/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 3 replies
 * 3 participants
 * Last reply from: [Ram Ratan Maurya](https://wordpress.org/support/users/mauryaratan/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/add-a-tinymce-plugin-wordpress-functionality/#post-3862226)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
