- Has been a member for 4-5 years
- Item was Featured
- Author was Featured
- Bought between 100 and 499 items
- Referred between 200 and 499 users
- Exclusive Author
- Microlancer Beta Tester
- Author had a Free File of the Month
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
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.
- Has been a member for 4-5 years
- Item was Featured
- Author was Featured
- Bought between 100 and 499 items
- Referred between 200 and 499 users
- Exclusive Author
- Microlancer Beta Tester
- Author had a Free File of the Month
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.
