990 posts It's in the pipeline!
  • Elite Author
  • Exclusive Author
  • Europe
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Envato Studio (Microlancer) Beta Tester
+2 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

814 posts
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 1 and 9 items
  • Referred between 1 and 9 users
  • Serbia
  • Has been a member for 5-6 years
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.

990 posts It's in the pipeline!
  • Elite Author
  • Exclusive Author
  • Europe
  • Has been a member for 5-6 years
  • Bought between 100 and 499 items
  • Referred between 200 and 499 users
  • Envato Studio (Microlancer) Beta Tester
+2 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