1056 posts It's in the pipeline!
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
+7 more
purethemes says

Hi guys,

as we all know, including wp-load.php anywhere in theme is bad . It’s easy now to pass parametrs from WP to Ajax functions, but I have problems with popups in TinyMCE. When you want to extend editor functionality, popup must be in external file, so for example
ed.addCommand('ppTabs', function() {
                ed.windowManager.open({
                    file : url + '/tinymce/tabs.php',
                    width : 500,
                    height : 500,
                    inline : 1
                }, {
                    plugin_url : url
                });
            });
            ed.addButton('pptabs', {title : 'Add Tabs', cmd : 'ppTabs', image: url + '/tinymce/images/tab.png' });
and I’d like to use some WordPress functions in tabs.php, for example to get list of categories or anything else. How do you do that without including wp-load.php? What is your approach to problem like that.

I’d be really thankfull for any tips. Cheers

815 posts
  • Has referred 1+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 1+ items on Envato Market
  • Contributed a free file of the month
+3 more
rvision_ says

I think you’re wrong here: the article discusses the front-end use of “wp-load.php”.

For popups (which are seen only by admins/editors/etc.) I think it’s fine.

1056 posts It's in the pipeline!
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
  • Elite Author: Sold more than $75,000 on Envato Market
  • Sells items exclusively on Envato Market
+7 more
purethemes says
rvision_ said
I think you’re wrong here: the article discusses the front-end use of “wp-load.php”. For popups (which are seen only by admins/editors/etc.) I think it’s fine.

I thought the same, but I’ve got recently some buyers who had 500 Internal Server Error while trying to include wp-load, and nothing I could do helped, so I’m thinking of other way to implement this feature without wp-load.php.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by