1012 posts It's in the pipeline!
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
  • 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.

1012 posts It's in the pipeline!
  • Has sold $500,000+ on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has been part of the Envato Community for over 6 years
  • 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.

by
by
by
by
by
by